Docs pages

Authentication

Every /v1 request carries one of your API keys. Reading these docs needs no key.

Send your key

Send the key as a Bearer token:

http
Authorization: Bearer YOUR_API_KEY
  • x-api-key: YOUR_API_KEY is accepted too, which is what the Anthropic SDK sends.
  • When both are sent, Authorization: Bearer wins. An Authorization header with another scheme is ignored and x-api-key is used.
  • On /v1/messages, the one in the Steerwise key format is used, x-api-key first, so Claude Code works with either.

Key format

A key is sw_live_, 32 random letters and digits, and a 6-character checksum. A mistyped key is refused without a lookup, and secret scanners can tell a key from a lookalike. Keys made on a development deployment start with sw_test_.

Older keys keep working: aip_live_ and aip_test_ keys made before the Steerwise name, and sk-live- keys made before this format.

Scopes

A key has one or both scopes. A key created with no scope chosen gets both.

Key scopes
ScopeEndpoints
inferenceChat completions, Responses, Messages and count_tokens
models:readGET /v1/models and GET /v1/models/{id}

A key without the scope an endpoint needs gets 403 missing_scope.

Allowed models

A key can be limited to some of your plan’s models. With no limit it can call every model of the plan, including ones added later.

  • To use auto, the list must include auto. Other models checked next to it narrow what auto picks from.
  • A model outside the list is 403 model_not_allowed_for_key; a model outside the plan is 403 model_not_allowed.

Keep keys safe

  • The key is shown once, when you create or rotate it. Steerwise stores only its hash and a short prefix for display.
  • Give each person, bot or service its own key, so each has its own caps and its own line in Usage.
  • Rotate or revoke a key in the Console under API keys. A key can also expire on a date you set when you create it.
  • Never put a key in client-side code or in a file you commit.

Key errors

Key errors
StatusCodeWhen
401missing_api_keyNo key was sent.
401invalid_api_keyThe key is malformed, unknown, revoked or expired.
403key_pausedThe key is paused, usually by the runaway-spend detector after its spend jumped far past its usual rate.
403missing_scopeThe key lacks the scope this endpoint needs.
403model_not_allowed_for_keyThe key’s allowed models exclude this model.