multi-router.aidocs

API Access

Router Access

Limiting an API key's inference requests to specific routers and aliases.

Router access limits which routers an API key can send inference requests to. A key set to Any router reaches every router in the organization; a key set to Specific routers reaches only the routers and aliases in its list. A limited key suits an application with one job, such as a support bot, because a leaked key then reaches only the routers that application uses, with the models, prompts and budgets those routers carry.

Setting the list

API Keys

Bearer tokens used to call /v1/*. Scoped to your account.

New API key
  • support-bot
    Support widget on the help center
    Inferencert_9Hk3Ws7PzQ, production·Modelsread
    sk-mr-xYzQ••••••••••••••••••••••••••••CopyCreated 9/28/2026
    AccessDisableDelete
    Access
    ScopedFull control
    PresetsInference onlyRead everythingNothing
    Data plane
    Inference
    chat/completions · messages · responses · codex
    inference
    NoneAny routerSpecific routers
    rt_9Hk3Ws7PzQ
    production
    Add router
    Direct model access is off for this key. A request naming a provider model, or relying on a bare model name resolving by pattern, is refused — otherwise the key could bypass these routers entirely.
    Model catalog
    list the models available to this organization
    models
    NoneRead
    Control planeone level per resource group
    Routers
    routers, aliases and their configuration
    routers
    NoneReadWriteDelete
    Prompts
    prompt bodies and their revisions
    prompts
    NoneReadWriteDelete
    Prompt repos
    connected repos and tracked prompt files
    prompt_repos
    NoneReadWriteDelete
    GitHub
    connected GitHub accounts
    list and disconnect only — connecting an account is a dashboard step
    github
    NoneReadDelete
    Provider keys
    upstream provider credentials
    read-only over the API — keys are managed from the dashboard
    provider_keys
    NoneRead
    Model groups
    organization-owned model sets and their membership
    model_groups
    NoneReadWriteDelete
    Budgets
    spending limits and their status
    budgets
    NoneReadWriteDelete

    Every row works the same way: pick one level, and each level includes the ones before it. Read lists and inspects. Write adds create and edit. Delete adds removal — the only irreversible one, and on routers it also orphans that router's traffic history. Groups show only the levels the API supports.

    CancelSave
  • deploy-pipeline
    CI job that manages routers and prompts
    Routerswrite·Promptswrite·Model groupsread
    sk-mr-4bTn••••••••••••••••••••••••••••CopyCreated 9/12/2026
    AccessDisableDelete
  • priya-claude-codemanaged
    Provisioned from the onboarding portal
    Inferencert_5Tc7Hn1GsR
    sk-mr-Lp8w••••••••••••••••••••••••••••CopyCreated 8/30/2026
    AccessDisableDelete
  • analytics-readonlydisabled
    Inferenceany router·Modelsread·Routersread·Promptsread·Prompt reposread·GitHubread·Provider keysread·Model groupsread·Budgetsread
    sk-mr-9cRd••••••••••••••••••••••••••••CopyCreated 7/2/2026
    AccessEnableDelete
  • legacy-admin
    Full controlevery capability, including ones added to the API later
    sk-mr-Qe2v••••••••••••••••••••••••••••CopyCreated 3/4/2026
    AccessDisableDelete
A key limited to two entries, a router and an alias, with direct model access off. Select to enlarge.

In the Access editor, the Inference row has three choices: None, Any router and Specific routers. Specific routers shows the key's list with Add router, which opens a search of routers by name or id, and the list can hold routers and aliases. A list holds at least one entry and at most 100. A router list works together with the inference scope, so a key with full control reaches every router; to limit a key's routers, set it to Scoped first.

How requests are matched

A request is allowed when the name it uses, or the router that name leads to, is in the key's list. This makes aliases work in both directions:

List containsRequest namesResult
The alias productionproductionAllowed. When the alias is repointed, the key follows it to the new router.
The router rt_9Hk3Ws7PzQAn alias that points to rt_9Hk3Ws7PzQAllowed, because the alias leads to a router in the list.
The router rt_9Hk3Ws7PzQAnother router, rt_2Lw6Yd8NcVRefused.
Any entryA model name with no router, such as anthropic/claude-sonnet-4.5 or claude-sonnet-4-5Refused. A limited key reaches models through its routers, and the Access editor notes that direct model access is off for the key.

For a fallback or weighted router, the list names the router itself, and the key then reaches every member through it. When an alias is repointed, the Aliases panel notes that keys limited to the alias follow it to its new router. See Alias.

Refusals

A limited key that names a router outside its list receives the same response as for a router that does not exist, which keeps the organization's other routers private. On Chat Completions the response is:

Response 404json
{
  "error": {
    "type": "invalid_request_error",
    "code": "model_not_found",
    "message": "the requested model or router was not found"
  }
}

The other endpoints use their own format with the same meaning:

EndpointStatusResponse
POST /v1/messages404Anthropic format, type not_found_error, message the requested model or router was not found
Claude Proxy Bedrock and Vertex endpoints404Claude Proxy not found

On Chat Completions and Messages, a disabled or missing router also returns this 404 to a limited key. A Claude Proxy, Codex Proxy or Gemini Proxy in the key's list that has been disabled returns 403 with this Claude Proxy is disabled, this Codex Proxy is disabled or this Gemini Proxy is disabled.

What router access covers

Router access applies to inference requests. Managing routers through the API follows the key's control plane scopes, so a key with routers:read lists every router in the organization whatever its router list. See Scope.

ScopeAuthentication
Was this helpful?