CloudCIX ML API

This page describes a number of stateless ML APIs available to be called from within any CloudCIX project. These API calls are protected by an IP address based access list and cannot be used from outside CloudCIX projects.

An Address based API Key, available from within the CloudCIX Membership App, is required to use these APIs so that billing can be made.

Google Universal Sentence Encoder(USE) 4

Cost: €0.005 per API call.

Sample Usage


import requests

url = 'https://ml.cloudcix.com/use4/'

prompt = 'Put any text here that you want to convert to a Use4 vector'

response = requests.post(
    url=url,
    json={
        'list': [prompt],
        'api_key': 'Put your API key here',
    },
)

if response.status_code == 200:
    print(response.json()['embeddings'][0])
        


Dragon+ Sentence Encoder (query encoder)

Sample Usage


import requests

url = 'https://ml.cloudcix.com/dragonplus_question/'

prompt = 'Put any text here that you want to convert to a Dragon+ vector'

response = requests.post(
    url=url,
    json={
        'list': [prompt],
        'api_key': 'Put your API key here',
    },
)

if response.status_code == 200:
    print(response.json()[0])
        


Dragon+ Paragraph Encoder (chunk/context encoder)

Sample Usage


import requests

url = 'https://ml.cloudcix.com/dragonplus_vector/'

prompt = 'Put any paragraph/chunk here that you want to convert to a Dragon+ vector'

response = requests.post(
    url=url,
    json={
        'list': [prompt],
        'api_key': 'Put your API key here',
    },
)

if response.status_code == 200:
    print(response.json()[0])
        


ChatGPT 3.5 Turbo

Cost: €0.02 per 1,000 tokens.

Sample Usage


import requests

url = 'https://ml.cloudcix.com/chatgpt3/'

prompt = [
    {'role': 'user', 'content': 'Put any text here that you want to use to prompt ChatGPT'},
]

data = {
    'api_key': 'Put your API key here',
    'max_tokens': 100, # Optional, default value is 100
    'prompt': prompt,
    'temperature': 0.0, # Optional, default is 0.0, max is 1.0
}

response = requests.post(
    url=url,
    json=data,
)

for answer in response:
    print(answer.decode('utf-8'), end=' ')
        


LLAMA2-13B

Sample Usage


import requests

url = 'https://ml.cloudcix.com/llama_2_13b/'
data={
    'api_key': 'Put your API key here',
    'max_tokens': 100, # Optional, default value is 100
    'prompt': 'Put any text here that you want to use to prompt LLAMA2-13B',
    'temperature': 0.0, # Optional, default is 0.0, max is 1.0
}
response = requests.post(
    url=url,
    json=data,
)

for item in response:
    print(item.decode('utf-8'), end='')