router.Nyuro.ai

Bring your own key (BYOK)

Use your own provider API keys through the Nyuro router — supported providers, setup, billing (5% of list price), security and troubleshooting.

Add your own OpenAI, Anthropic, Google or other provider key and the router sends that provider's requests through your account. Your provider bills you for the tokens; Nyuro charges a 5% fee on the list price, taken from your credits. Routing, budgets, logs and governance work the same as on Nyuro's keys.

Supported providers

Ten providers:

  • OpenAI
  • Anthropic
  • Google (Gemini)
  • Mistral AI
  • DeepSeek
  • Groq
  • Cohere
  • Together AI
  • xAI (Grok)
  • Perplexity

A key is used when you call a model from our catalog that belongs to that provider. Some models — including current Grok (xAI), Sonar (Perplexity), Mistral, DeepSeek, Groq, Cohere and Together AI models — are available only with your own key (full list): without one, the request fails with a byok_required error rather than running on another account. Nyuro-hosted models such as Luna never use a customer key.

Which models need your key?

The model catalog marks these models Needs your key, and GET /v1/models returns a byok_provider field on them naming the provider whose key they need (for example xai or perplexity). They are only used when you name them: auto, strategies and industry tags never pick them. The dashboard Playground hides them, because it does not use your provider keys.

Add, check and remove a key

In the dashboard, open Settings → Provider Keys.

Choose a Provider and a Role (Primary or Fallback), paste your key into API key, leave Base URL (optional) empty, and click Save key.

The key appears in the table with its provider, role, the last 4 characters (for example …aB3x), the base URL ("default") and the date it was updated. You can change the role from the table.

To replace a key, save a new one for the same provider. To delete it, click remove and confirm; that provider's traffic goes back to Nyuro's account at list price.

There is no separate test button, and saving does not contact the provider. To check a key, send one small request to a model from that provider with your Nyuro API key. If the key is bad, the provider's 401 comes back on that request.

curl https://api.routing.nyuro.ai/v1/chat/completions \
  -H "Authorization: Bearer $NYURO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "claude-sonnet-4-6",
       "messages": [{"role": "user", "content": "Say hi"}]}'

How requests use your key

Chat completions (streamed or not) and embeddings made with any of your Nyuro API keys use your stored key for the matching provider. Keys are personal: they belong to the person who saved them, not to the whole organization.

Primary and Fallback

  • Primary keys are used on the first attempt for every model from that provider.
  • Fallback keys are kept back. On the first attempt, that provider's models run on Nyuro's account. Only if every model in the request fails is the request tried a second time, now with your fallback keys.
  • If your primary key fails (bad key, 401, 429, provider outage) and you have no fallback keys, the request fails with the provider's error. We do not quietly retry it on Nyuro's key.
  • If you have any fallback key, the second attempt retries the request's models. A model whose provider has no fallback key then runs on Nyuro's account and is billed at list price. Models that need your own key (Grok, Sonar) are skipped rather than run on Nyuro's account.
  • Requests that name several models (a models list, auto, an industry or strategy tag) use your key for the models whose provider you have a key for, and Nyuro's account for the rest.

Billing

On your key, the provider bills your tokens directly. Nyuro charges 5% of what the request would cost at our list price, taken from your credits. A response served from our cache costs nothing. Requests that ran on Nyuro's account are billed at list price, as usual.

Worked example: claude-sonnet-4-6

List price $3.00 per million input tokens and $15.00 per million output tokens. A request with 10,000 input and 2,000 output tokens:

  • list cost = 10,000 × $3/1M + 2,000 × $15/1M = $0.03 + $0.03 = $0.06
  • Nyuro fee = 5% × $0.06 = $0.003, from your credits
  • Anthropic bills your Anthropic account for the tokens

List prices are on the Models page and can change; the fee always follows them.

Security

  • Keys are encrypted at rest with Fernet (AES-128 with an HMAC-SHA256 integrity check) before they are written. Tampered data is rejected rather than used.
  • After you save a key we never show it again or write it to our logs; only the last 4 characters are shown back.
  • Your key is decrypted only for the moment it is attached to your request to that provider.
  • Keys can only be added, changed or removed from a signed-in dashboard session, not with an API key, and not by staff viewing your account on your behalf.
  • To rotate, create a new key with the provider, save it here (it replaces the old one), then revoke the old key with the provider. To delete, click remove.

Troubleshooting

What you seeWhat it means and what to do
"BYOK isn't enabled on this deployment yet" when you click Save keyKey storage is switched off on our side (the API answers 503). Nothing was saved. Contact support. While it is off, stored keys are not used and requests run on Nyuro's own provider accounts at list price.
"unsupported provider" or "api_key is required" (400)Pick a provider from the list and paste a non-empty key.
"a custom base_url is limited to platform operators" (403)Leave Base URL empty. Custom endpoints are not self-serve.
401 from the provider on a requestYour key is wrong, revoked or lacks access to that model. We do not check a key when you save it, so this is where a bad key shows up. Save a working key over it.
429 from the provider on a requestYour own provider account hit its rate limit or quota. Raise it with the provider, slow down, or add a Fallback key (see Primary and Fallback).
byok_required (403)You called a current Grok or Sonar model without an xAI or Perplexity key. Add one under Settings → Provider Keys. If the request names other models (a models list), that model is dropped and the rest still run; the error comes back only when nothing is left.
byok_key_unreadable (400)Your stored key for that provider could not be decrypted, so we will not use it, and we do not fall back to Nyuro's key. Save the key again under Settings → Provider Keys. If the request has models from other providers (auto, a models list), that provider's models are dropped and the others still run.
byok_base_url_refused (400)A stored Base URL no longer points at a public address. Remove or replace the key.
402 insufficient creditsThe 5% fee is paid from credits, so a request needs credit left even on your own key. Top up under Credits & Billing.
403 when calling the key settings API with an API keyProvider keys can only be managed from a signed-in dashboard session, never with an API key.

FAQ

On this page