Skip to main content
The Auriko API is OpenAI-compatible, meaning you can use it as a drop-in replacement for OpenAI’s API.

Base URL

https://api.auriko.ai/v1

Endpoints

Inference API

EndpointMethodDescription
/v1/chat/completionsPOSTCreate a chat completion
/v1/meGETGet API key identity

Discovery API

EndpointMethodDescription
/v1/registry/providersGETList available providers
/v1/registry/modelsGETList canonical models
/v1/directory/modelsGETFull model directory with pricing

Management API

ResourceEndpointsDescription
Workspaces4Create, list, get, update workspaces
Routing2Get and update workspace routing defaults
Budgets5CRUD for spending limits
API Keys4Create, list, revoke keys; usage stats
Billing1Credit balance
Provider Keys7BYOK key management
Management API endpoints use session authentication. Workspace and budget reads also accept API keys. See Authentication.
See also: Team management, Budget management, Bring Your Own Key.

OpenAI Compatibility

Auriko supports the same request/response format as OpenAI. Existing code using OpenAI’s API can switch to Auriko by changing:
  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

In addition to OpenAI-compatible fields, Auriko responses carry:
  • routing_metadata - Information about which provider handled the request
  • routing (request) - Options to optimize for cost, speed, or throughput
  • auriko_metadata (request) - Custom tags and trace IDs for request tracking

Response Extensions

Every chat completion response carries a routing_metadata object:
{
  "routing_metadata": {
    "provider": "openai",
    "provider_model_id": "gpt-5.4",
    "tier": "standard",
    "model_canonical": "gpt-5.4",
    "routing_strategy": "balanced",
    "total_latency_ms": 1234,
    "ttft_ms": 312,
    "candidates_total": 5,
    "candidates_viable": 3,
    "routing_decision_ms": 2.1,
    "cost": {
      "input_tokens": 100,
      "output_tokens": 50,
      "provider_cost_usd": 0.000135,
      "billable_cost_usd": 0.00015
    }
  }
}

Field reference

FieldTypeAlways presentDescription
providerstringyesProvider that served the request (e.g., openai, anthropic)
provider_model_idstringyesProvider’s internal model ID
tierstringnoPricing tier when applicable (e.g., flex, standard). Omitted for providers without tiers.
model_canonicalstringyesCanonical model ID from the request
routing_strategystringyesStrategy used: cost, speed, balanced, ttft, throughput, cheapest, or custom. custom is returned when explicit routing.weights are provided.
candidates_totalnumberyesTotal provider candidates before filtering
candidates_viablenumberyesCandidates remaining after constraint filtering
routing_decision_msnumberyesTime spent on the routing decision (ms)
ttft_msnumbernoTime to first token (ms). Streaming responses only.
total_latency_msnumberyesTotal request latency (ms)
costobjectnoCost breakdown. Present when token usage is available and pricing is token-based.
fallback_chainarraynoFallback attempt history. Present only when the primary provider failed and a fallback was used.
warningsstring[]noWarnings about ignored or unsupported routing configuration. Omitted when empty.
cost fields: input_tokens (number), output_tokens (number), provider_cost_usd (number), billable_cost_usd (number). fallback_chain entries: provider (string), status ("success" or "failed"), reason (string, present on failed entries only).

Request Extensions

Pass routing options to optimize your requests:
{
  "model": "gpt-5.4",
  "messages": [...],
  "routing": {
    "optimize": "cost",
    "max_ttft_ms": 200
  }
}

Request metadata

Attach custom metadata to requests for tracking and observability. Auriko strips auriko_metadata before forwarding to the provider. The auriko_ prefix avoids collision with OpenAI/Anthropic native metadata fields.
{
  "model": "gpt-5.4",
  "messages": [...],
  "auriko_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 organized by category.

Request tracing

HeaderDescription
X-Request-IDUnique request identifier for support and debugging

Routing headers

HeaderDescription
X-Provider-UsedProvider that served the request
X-Model-RequestedModel ID from the original request
X-Model-CanonicalCanonical model ID after alias resolution
X-Model-UsedActual model ID sent to the provider
X-Routing-StrategyStrategy used (cost, speed, balanced, etc.)
X-Routing-Time-MsTime spent on routing decision
X-Api-Key-SourceKey type used (platform or byok)
X-Multi-Model-CountNumber of models in a multi-model request

Fallback headers

HeaderDescription
X-Fallback-EnabledWhether fallback is enabled for this request
X-Fallback-UsedWhether a fallback was triggered
X-Fallback-DepthNumber of fallback attempts made
X-Fallback-Original-ProviderProvider of the first (failed) attempt
X-Fallback-Attempted-ProvidersComma-separated list of all attempted providers
X-Fallback-ReasonReason the primary provider failed
X-Fallback-Total-Time-MsTotal time across all attempts
X-Fallback-Max-AttemptsMaximum fallback attempts configured

Error diagnostic headers

HeaderDescription
X-Error-ProviderProvider that returned the error
X-Error-TypeError classification
X-Error-RetryableWhether the error is safe to retry

Billing headers

HeaderDescription
X-Credits-Balance-MicrodollarsCurrent credit balance in microdollars
X-Credits-TierCurrent billing tier
Per-key rate limit headers are covered in Rate limits.

Budget headers

Returned when budgets are configured. Error headers appear on 402 responses when a budget is exceeded. Spend and limit headers appear on successful responses.
HeaderDescription
X-Budget-Exceededtrue when the request was rejected for exceeding a budget (402 only)
X-Budget-Exceeded-PeriodBudget period that was exceeded: daily, weekly, or monthly (402 only)
X-Budget-Exceeded-ScopeScope of the exceeded budget: workspace, api_key, or byok_provider (402 only)
X-Budget-Daily-SpendCurrent daily spend in USD
X-Budget-Daily-LimitConfigured daily budget limit in USD
X-Budget-Weekly-SpendCurrent weekly spend in USD
X-Budget-Weekly-LimitConfigured weekly budget limit in USD
X-Budget-Monthly-SpendCurrent monthly spend in USD
X-Budget-Monthly-LimitConfigured monthly budget limit in USD
Spend and limit headers appear only for budget periods that are configured. If a workspace has only a monthly budget, daily and weekly headers are omitted.

Cache headers

HeaderDescription
X-Cache-Savings-PercentPercentage of tokens saved via prompt caching

Authentication

Learn how to authenticate your requests