Skip to main content

Documentation

Everything you need to integrate Exerati into your applications.

Authentication

All API requests require an API key passed in the Authorization header. Generate keys from your dashboard under API Keys. Keys are shown once at creation — store them securely. Prefix your key with "Bearer " in the header: Authorization: Bearer sk-xxxxxxxxxxxx. Keys can be scoped to specific models and have individual rate limits and budget caps.

bash
curl https://api.exerati.com/v1/models \
  -H "Authorization: Bearer sk-your-api-key"

API keys are shown only once at creation. Store them securely. If lost, you'll need to generate a new key.

Quickstart

Get your first API response in under two minutes. Create an account, generate an API key, and make a POST request to /v1/chat/completions with your model of choice. The API is OpenAI-compatible, so existing OpenAI SDKs work with a simple base_url change to https://api.exerati.com/v1.

1

Create an account at exerati.com/register

2

Navigate to Dashboard → API Keys and create a new key

3

Make a POST request to /v1/chat/completions

bash
curl https://api.exerati.com/v1/chat/completions \
  -H "Authorization: Bearer sk-your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-4",
    "messages": [{"role": "user", "content": "Hello!"}]
  }'

Chat Completions

The chat completions endpoint (POST /v1/chat/completions) is the primary interface for generating responses. Send an array of messages with role (system, user, assistant) and content. Supports streaming via stream: true, function calling, and multi-modal inputs for vision models. Responses include usage metrics (prompt_tokens, completion_tokens) for billing.

Request

POST /v1/chat/completions
{
  "model": "gpt-4",
  "messages": [
    {"role": "system", "content": "You are a helpful assistant."},
    {"role": "user", "content": "What is the capital of France?"}
  ],
  "temperature": 0.7,
  "max_tokens": 256
}

Response

200 OK
{
  "id": "chatcmpl-abc123",
  "object": "chat.completion",
  "model": "gpt-4",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "The capital of France is Paris."
      },
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 25,
    "completion_tokens": 8,
    "total_tokens": 33
  }
}

Parameters

Name Type Required Description
model string Yes Model ID to use for completion
messages array Yes Array of message objects
temperature number No Sampling temperature (0-2). Default: 1
max_tokens integer No Maximum tokens to generate
stream boolean No Enable streaming responses. Default: false

Models

Exerati provides access to a curated catalog of AI models across text, vision, code, and audio modalities. Use GET /v1/models to list all available models with their pricing, context windows, and capabilities. Each model has a unique slug (e.g., gpt-4o, claude-3-opus) used in API requests.

bash
curl https://api.exerati.com/v1/models \
  -H "Authorization: Bearer sk-your-api-key"

Response

200 OK
{
  "object": "list",
  "data": [
    {
      "id": "gpt-4",
      "object": "model",
      "owned_by": "openai"
    },
    {
      "id": "gpt-4-vision-preview",
      "object": "model",
      "owned_by": "openai"
    }
  ]
}

Embeddings

Generate vector embeddings for text using POST /v1/embeddings. Useful for semantic search, clustering, and similarity comparisons. Specify the embedding model and input text (string or array). Returns a list of embedding vectors with their dimensions.

POST /v1/embeddings
{
  "model": "text-embedding-ada-002",
  "input": "The quick brown fox jumps over the lazy dog"
}