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.
You can set BYOK budgets in Billing. A request that would exceed one returns 402 byok_budget_exceeded.
Per-request header
Shell
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 run on workspace credits only; BYOK requests to a function alias return
400function_requires_managed_funding.
See Errors for every BYOK code.