API Docs

Getting Started

We have tried to match OpenAI’s API as closely as possible. You can get started by creating an account on our website
and generating an API key. You can use this API key to authenticate your requests.

Listing Models

You can list the models available to you by sending a GET request to the models endpoint:

curl -X GET \
  https://dev-api.exclusv.ai/v1/models \
  -H "accept: application/json" \
  -H "Authorization: Bearer API_KEY"

This will return a list of models available to you:

{
  "object": "list",
  "data": [
    {
      "id": "Exclusv-AI/Quantum",
      "object": "model",
      "created": 1723259871776,
      "owned_by": "exclusv-ai",
      "root": "Exclusv-AI/Quantum",
      "parent": null,
      "permission": [
        {
          "id": "modelperm-1234567890abcdef",
          "object": "model_permission",
          "created": 1723259871776,
          "allow_create_engine": false,
          "allow_sampling": true,
          "allow_logprobs": true,
          "allow_search_indices": false,
          "allow_view": true,
          "allow_fine_tuning": false,
          "organization": "*",
          "group": null,
          "is_blocking": false
        }
      ]
    }
  ]
}

Chat Completion

Chat Completion is a powerful tool that can help you generate human-like text based on the input you provide. It can be
used to generate responses to user queries, write emails, reports, and even help you with your homework.

curl -X POST \
https: //dev-api.exclusv.ai/v1/chat/completions \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer API_KEY' \
-d '{
"messages": [
{
"role": "system",
"content": "You are Exclusv AI. You are a powerful AI that can help you with your daily tasks. You can write emails, reports, and even help you with your homework. You are a powerful AI that can help you with your daily tasks. You can write emails, reports, and even help you with your homework."
},
{"role": "user",
"content": "Tell me about the Solar System."}
],
"model": "Exclusv-AI/Quantum",
"max_tokens": 512,
"temperature": 0.7,
"top_p": 0.43,
"n": 1,
"stream": false,
"add_generation_prompt": true,
"echo": false
}'

Will get you a response like:

{
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "The Solar System is a vast and complex system comprising of the Sun and everything that orbits around it. This includes eight planets, their moons, and various other celestial bodies such as asteroids, comets, and dwarf planets.\n\n1. **The Sun**: The Sun is the star at the center of the Solar System. It is a nearly perfect sphere of hot plasma, and its gravity holds the Solar System together.\n\n2. **Mercury**: The smallest planet and the closest to the Sun, Mercury is a rocky planet with a heavily cratered surface.\n\n3. **Venus**: Venus is similar in size to Earth, but its atmosphere is extremely thick and toxic, creating a greenhouse effect that makes it the hottest planet in the Solar System.\n\n4. **Earth**: Our home planet, Earth, is the third planet from the Sun. It's the only place we know of so far that's inhabited by living things.\n\n5. **Mars**: Known as the Red Planet due to its reddish appearance from iron oxide (rust) on its surface, Mars is the fourth planet from the Sun.\n\n6. **Jupiter**: The largest planet in the Solar System, Jupiter is a gas giant known for its Great Red Spot, a storm that has been raging on the planet for at least 300 years.\n\n7. **Saturn**: Famous for its extensive ring system, Saturn is a gas giant and the second-largest planet in the Solar System.\n\n8. **Uranus**: A gas giant with a blue-green color due to the methane in its atmosphere, Uranus is unique for its sideways rotation.\n\n9. **Neptune**: The farthest planet from the Sun, Neptune is a gas giant known for its deep blue color and its violent weather patterns.\n\nIn addition to these, the Solar System also includes the asteroid belt between Mars and Jupiter, the Kuiper Belt beyond Neptune, and the Oort Cloud at the very edge of the system. The Solar System is also home to countless comets, asteroids, and meteoroids.\n\nThe Solar System is part of the Milky Way galaxy, and it's located in the Orion Arm, about 26,000 light-year"
      },
      "logprobs": null,
      "finish_reason": "length",
      "stop_reason": null
    }
  ],
  "model": "Exclusv-AI/Quantum",
  "object": "chat.completion",
  "id": "cmpl-13370ade58a647c28fc4ce4b10e4466f",
  "created": 1722840982,
  "usage": {
    "prompt_tokens": 88,
    "total_tokens": 600,
    "completion_tokens": 512
  }
}

Setting "stream": true, will deliver the response in 1 token per chunk with the last chunk having how many tokens were
used in the completion.

data: {"id": "cmpl-dd634e884a6745ffbaee463c74ba58d6", "object": "chat.completion.chunk", "created": 1722841594, "model": "Exclusv-AI/Quantum", "choices":[{"index": 0, "delta": {"content":" "}, "logprobs": null, "finish_reason": null}]}

data: {
"id": "cmpl-dd634e884a6745ffbaee463c74ba58d6", "object":"chat.completion.chunk", "created": 1722841594, "model": "Exclusv-AI/Quantum","choices":[{"index": 0, "delta": {"content":"icy"}, "logprobs": null, "finish_reason": null}]}

data: {
"id": "cmpl-dd634e884a6745ffbaee463c74ba58d6", "object":"chat.completion.chunk", "created": 1722841594, "model": "Exclusv-AI/Quantum","choices":[{"index": 0, "delta": {"content":" bodies"}, "logprobs": null, "finish_reason": null}]}

data: {
"id": "cmpl-dd634e884a6745ffbaee463c74ba58d6", "object":"chat.completion.chunk", "created": 1722841594, "model": "Exclusv-AI/Quantum","choices":[{"index": 0, "delta": {"content":","}, "logprobs": null, "finish_reason": null}]}

data: {
"id": "cmpl-dd634e884a6745ffbaee463c74ba58d6", "object":"chat.completion.chunk", "created": 1722841594, "model": "Exclusv-AI/Quantum","choices":[{"index": 0, "delta": {"content":" and"}, "finish_reason": "length"}], "usage": {"prompt_tokens": 88, "total_tokens":600, "completion_tokens": 512
}
}

Checking Usage

You can check your usage by sending a GET request to the usage endpoint:

curl -X GET \
  https://dev-api.exclusv.ai/v1/usage \
-H "Authorization: Bearer API_KEY"

Which gives a response like:

{
  "apiKey": "API_KEY",
  "usage": {
    "prompt_tokens": 00000,
    "completion_tokens": 00000
  },
  "tokenLimit": 0,
  "lastUsed": "2024-08-05T06:24:01.947Z",
  "friendlyName": "Friendly Name"
}

If your Token Limit is 0, you do not have a limit on the number of tokens you can use. You will be billed monthly
for the number of tokens you use.

If you have any questions or need help, please feel free to reach out to us at [email protected].