BYOK Provider Setup Guide

Generate a key at each supported provider and add it under Dashboard → BYOK.

Add your own provider key to AnyRouter (BYOK) in three steps. Pick your provider below for where its console hides the key page and what the key looks like.

  1. Generate a key in the provider console and copy it. Many providers show it only once.
  2. Go to Dashboard → BYOK, find the provider under Available, click Add key and paste it.
  3. Click Save. AnyRouter validates the key with the provider first; if validation fails the error is shown and the key is not saved.

Add keys from a script

POST /api/v1/auth/byok takes a management key. Pass source (cli, dashboard or api; anything else returns 400; default api) to tell your scripts' keys apart. The dashboard sets dashboard; the anyr binary does not set cli yet, so its keys report api.

curl -X POST https://anyrouter.dev/api/v1/auth/byok \
  -H "Authorization: Bearer ak_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "provider_id": "openai",
    "api_key": "sk-proj-…",
    "label": "laptop",
    "source": "cli"
  }'

The response, and every GET /api/v1/auth/byok, returns:

{
  "id": "byok_01JQZ…",
  "provider_id": "openai",
  "label": "laptop",
  "key_preview": "sk-p****7c2",
  "enabled": true,
  "route_coverage": "all",
  "kind": "byok",
  "source": "cli"
}

kind is donated while the key is shared with the shared pool (including while paused), otherwise byok. key_preview is the first four and last three characters; the key itself is never returned. Keys are listed per workspace.

Providers

Choose your provider for detailed setup steps:

AnyRouter routes requests to third-party models. Models and outputs are provided as is, with no warranty; you use them at your own risk. Disclaimer