Auriko exposes an OpenAI-compatible API. Your existing chat completions, streaming, and tool calling code works with minimal changes.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.
Get started
Only the client initialization changes:What’s compatible
Standard OpenAI API features work through Auriko. Some features have model-specific constraints noted below.| Feature | Status |
|---|---|
| Chat completions | Compatible |
| Streaming | Compatible |
| Tool calling | Compatible |
Legacy functions/function_call | Auto-converted to tools/tool_choice |
Structured output (json_schema) | Compatible |
Structured output (json_object) | Model-dependent. See Structured output. |
| Models list | Compatible |
| Async client | Compatible |
| Error classes | Compatible |
| Retry logic | Built-in (max 2 retries, exponential backoff) |
What’s new
Auriko adds capabilities on top of the OpenAI-compatible interface:- Routing options — optimize for cost, latency, or throughput across providers. See Routing options.
- Cost optimization — save 30-70% with cost-optimized routing across providers. See Cost optimization.
- Prompt caching — automatic cache injection for all supported providers. See Prompt caching.
- Budget management — set spending limits per workspace, API key, or BYOK provider. See Error codes for budget enforcement behavior.
- Response headers — every response carries
request_id, rate limit headers, and credit usage. See Python SDK.
Use OpenAI SDK directly
You don’t need theauriko package at all. The OpenAI SDK works with a base_url override:
Error mapping
When using the OpenAI SDK directly, convert errors to typed Auriko errors withmap_openai_error():
map_openai_error() is Python-only. See Error Handling for the full error handling guide.Access routing metadata
Auriko offers three ways to access routing metadata, ordered from most to least ergonomic.With the native Auriko SDK
auriko.Client and auriko.AsyncClient expose routing_metadata as a typed property directly on each response:
With AurikoAsyncOpenAI (experimental)
AurikoAsyncOpenAI (experimental) is a drop-in AsyncOpenAI subclass that captures routing metadata automatically on every response. Use it when a framework (OpenAI Agents SDK, LangChain, LlamaIndex, or similar) needs to be given an external AsyncOpenAI instance:
pip install "auriko[openai-compat]". See AurikoAsyncOpenAI for framework wiring details.
With parse_routing_metadata
When you’re using the OpenAI SDK directly (no Auriko client at all), extract routing metadata from responses with parse_routing_metadata(). This function returns None if routing metadata is absent or unparseable, and None on Auriko SDK responses — use response.routing_metadata directly instead.
All three options are Python-only. TypeScript consumers can use
@auriko/ai-sdk-provider with the Vercel AI SDK, or the OpenAI TS SDK with baseURL: 'https://api.auriko.ai/v1'.