Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.auriko.ai/llms.txt

Use this file to discover all available pages before exploring further.

The Auriko API is OpenAI-compatible. You can use the OpenAI SDK with a base URL change.

Base URL

https://api.auriko.ai/v1

Make a request

Send a chat completion request:
import os
from openai import OpenAI

client = OpenAI(
    api_key=os.environ["AURIKO_API_KEY"],
    base_url="https://api.auriko.ai/v1"
)

response = client.chat.completions.create(
    model="gpt-4o",
    messages=[{"role": "user", "content": "What is the capital of France?"}]
)

print(response.choices[0].message.content)
To stream the response, set stream to true:
stream = client.chat.completions.create(
    model="gpt-4o",
    messages=[{"role": "user", "content": "Explain quantum computing in one paragraph."}],
    stream=True
)

for chunk in stream:
    if chunk.choices and chunk.choices[0].delta.content:
        print(chunk.choices[0].delta.content, end="", flush=True)
To optimize for cost, add routing options:
response = client.chat.completions.create(
    model="gpt-4o",
    messages=[{"role": "user", "content": "Summarize the benefits of cloud computing."}],
    extra_body={"gateway": {"routing": {"optimize": "cost"}}}
)

print(response.choices[0].message.content)

Endpoints

EndpointMethodDescription
/v1/chat/completionsPOSTCreate a chat completion
/v1/responsesPOSTCreate a response (Response API)
/v1/modelsGETList available models
/v1/models/{model_id}GETRetrieve a model
/v1/meGETGet API key identity
/v1/registry/providersGETList available providers
/v1/registry/modelsGETList canonical models
/v1/directory/modelsGETFull model directory with pricing
/v1/workspaces/{workspace_id}/billing/balanceGETCredit balance

OpenAI compatibility

Auriko supports the same request/response format as OpenAI. Switch to Auriko by changing two values:
  1. Base URL: https://api.openai.com/v1https://api.auriko.ai/v1
  2. API Key: Use your Auriko API key (starts with ak_)

Auriko extensions

Auriko responses carry additional fields beyond the OpenAI format.

Response extensions

Every chat completion response includes a routing_metadata object with routing and cost details:
{
  "routing_metadata": {
    "provider": "openai",
    "provider_model_id": "gpt-4o-2024-08-06",
    "model_canonical": "gpt-4o",
    "routing_strategy": "balanced",
    "ttft_ms": 312,
    "cost": {
      "usd": 0.00015
    },
    "warnings": []
  }
}
When the gateway had to modify or ignore part of the request, warnings carries one or more structured entries:
{
  "routing_metadata": {
    "provider": "openai",
    "provider_model_id": "gpt-4o-2024-08-06",
    "model_canonical": "gpt-4o",
    "routing_strategy": "balanced",
    "warnings": [
      {
        "type": "unsupported_parameter",
        "code": "seed",
        "message": "Parameter 'seed' is not supported by the selected provider."
      }
    ]
  }
}
See Response metadata for the full field reference.

Request extensions

Pass routing options to optimize your requests via the gateway field:
{
  "model": "gpt-4o",
  "messages": [{"role": "user", "content": "Hello!"}],
  "gateway": {
    "routing": {
      "optimize": "cost",
      "max_ttft_ms": 1000
    }
  }
}

Request metadata

Attach custom metadata to requests for tracking and observability via gateway.metadata. Auriko strips this metadata before forwarding to the provider.
{
  "model": "gpt-4o",
  "messages": [{"role": "user", "content": "Hello!"}],
  "gateway": {
    "metadata": {
      "tags": ["production", "chatbot"],
      "user_id": "user_abc123",
      "trace_id": "trace_xyz789",
      "custom_fields": {
        "environment": "production",
        "feature": "customer-support"
      }
    }
  }
}
FieldTypeLimits
tagsstring[]Max 100 tags, each max 50 chars
user_idstringMax 255 chars
trace_idstringMax 255 chars
custom_fieldsRecord<string, string>Max 10 fields, keys max 50 chars, values max 200 chars

Response headers

Every response carries custom headers. See Response headers for the full reference.

Authentication

Learn how to authenticate your requests