Skip to main content
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:
To stream the response, set stream to true:
To optimize for cost, add routing options:

Endpoints

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:
When the gateway had to modify or ignore part of the request, warnings carries one or more structured entries:
See Response metadata for the full field reference.

Request extensions

Pass routing options to optimize your requests via the gateway field:

Request metadata

Attach custom metadata to requests for tracking and observability via gateway.metadata. Auriko strips this metadata before forwarding to the provider.
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