Use this file to discover all available pages before exploring further.
Auriko selects a provider for each request based on your routing configuration. Pass routing options in the gateway.routing object to control strategy, constraints, and provider filtering.
Base strategies (cost, ttft, tps) optimize for the named dimension while still considering other quality factors.Focus strategies (cost-focus, ttft-focus, tps-focus) optimize almost entirely for the named dimension. Other factors have minimal influence.
Auriko computes the expected cost of each request at every available provider and routes to the cheapest one. The cost model accounts for caching and pricing tiers.See Cost optimization for configuration, code examples, and the full cost model.
If no provider can meet the latency constraint, Auriko returns a 400 error.
max_ttft_ms evaluates against median (p50) metrics by default. To constrain on worst-case latency, set ttft_percentile to "p95". See Choose metric percentile.
Auriko calculates cost as the average of input and output price per 1M tokens. Providers exceeding this ceiling are excluded from routing.For fine-grained constraints, see Advanced routing and Cost optimization.
Set require_parameters to true to only route to providers that accept all optional parameters you sent (like seed, logit_bias, or top_logprobs). Without this flag, Auriko drops unsupported parameters and adds a warning to the response.
If no provider supports the parameters you sent, Auriko returns a 400 error with code required_params_not_supported. See Filter by parameter support for the full list of parameters this applies to.
prefer is a soft hint. If the preferred provider is available, Auriko routes to it. If not, routing proceeds normally. Unlike providers, a prefer miss doesn’t fail the request.
Force requests to use only BYOK (bring-your-own-key) or only platform-managed keys:
import osfrom openai import OpenAIclient = OpenAI( api_key=os.environ["AURIKO_API_KEY"], base_url="https://api.auriko.ai/v1")# Use only your own provider keysresponse = client.chat.completions.create( model="gpt-5.4", messages=[{"role": "user", "content": "Hello!"}], extra_body={"gateway": {"routing": {"only_byok": True}}})# Use only Auriko platform keysresponse = client.chat.completions.create( model="gpt-5.4", messages=[{"role": "user", "content": "Hello!"}], extra_body={"gateway": {"routing": {"only_platform": True}}})
Both are booleans, default false. Setting both to true returns a 400 error. They’re mutually exclusive.When no key of the requested type is available, the request fails with no fallback. See Bring Your Own Key for BYOK setup.
For routing metadata with the OpenAI SDK, see OpenAI Compatibility.For the complete field reference including fallback chain, warnings, and all optional fields, see Response Extensions.