Gateway
Bring your own key
Route requests with your own provider credentials, either as a stored connection or a per-request header.
Bring your own key (BYOK) lets requests run on your provider account instead of Seldon's. The provider bills you directly, and Seldon does not debit your workspace credits for those calls.
Two ways to supply a key
Stored connections
Add a connection under Providers, verify it, and choose which models it may serve. Requests covered by your BYOK policy route to eligible connections in your saved order. If no connection can serve the requested model and features, the request returns 422 byok_no_eligible_connection.
For Functions with JSON Schema output, enter the logical and upstream model identifiers and select Allow JSON Schema responses for this model when adding the connection. This grants json_schema access without changing the existing text and streaming defaults. It does not verify provider support or enable Functions: the mapped deployment must support JSON Schema, and Seldon checks qualification separately. Existing connections can add json_schema to their model mapping in advanced controls.
You can set BYOK budgets in Billing. A request that would exceed one returns 402 byok_budget_exceeded.
Per-request header
curl "$SELDON_BASE_URL/chat/completions" \
-H "Authorization: Bearer $SELDON_API_KEY" \
-H "x-byok-key: $PROVIDER_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"model": "openai/gpt-5.4-nano",
"messages": [{"role": "user", "content": "Hello"}],
"provider": {"only": ["openai"]}
}'provider.onlymust name exactly one provider that accepts a key header, or the request returns400byok_provider_requiredorbyok_credential_unsupported.- The header is used for this request and not stored.
- Don't combine the header with a stored BYOK policy (
400byok_credential_conflict).
What changes with BYOK
- Spend limits on workspace credits exclude BYOK usage.
- Response-cache entries are scoped to the credential that produced them.
- Functions can use a separately authorized stored reference connection when that capability is enabled. Only reference answers use customer credentials; optimization, candidate evaluation, hosted calls and fallback use workspace credits. Reference estimates have their own spending cap.
- A gateway BYOK policy does not authorize Function reference use. Hosted aliases require a managed-compatible Seldon API key; incompatible BYOK policies and transient headers return
400function_requires_managed_funding.
See Errors for every BYOK code.