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
Make a request
Send a chat completion request:
Python OpenAI
TypeScript OpenAI
Python Auriko
TypeScript Auriko
cURL
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:
Python OpenAI
TypeScript OpenAI
Python Auriko
TypeScript Auriko
cURL
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:
Python OpenAI
TypeScript OpenAI
Python Auriko
TypeScript Auriko
cURL
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
Endpoint Method Description /v1/chat/completionsPOST Create a chat completion /v1/responsesPOST Create a response (Response API) /v1/modelsGET List available models /v1/models/{model_id}GET Retrieve a model /v1/meGET Get API key identity /v1/registry/providersGET List available providers /v1/registry/modelsGET List canonical models /v1/directory/modelsGET Full model directory with pricing /v1/workspaces/{workspace_id}/billing/balanceGET Credit balance
OpenAI compatibility
Auriko supports the same request/response format as OpenAI. Switch to Auriko by changing two values:
Base URL: https://api.openai.com/v1 → https://api.auriko.ai/v1
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
}
}
}
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"
}
}
}
}
Field Type Limits 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
Every response carries custom headers. See Response headers for the full reference.
Authentication Learn how to authenticate your requests