Skip to content

What you need

  • Base URL: https://api.smouter.ai — Anthropic-style clients append /v1/messages themselves, so no /v1 suffix here.
  • API key: an sk-smouter-… secret from API keys. It is shown once at creation — if you lost it, create a new key.
  • Model id: copied exactly from the live catalog (or GET /v1/models). Ids are matched verbatim — no vendor prefixes, no renaming.

Point Claude Code at Smouter

Claude Code talks the Anthropic Messages protocol, which Smouter serves natively at POST /v1/messages. Two environment variables switch it over — note the base URL has no /v1 suffix; the client appends /v1/messages itself.

export ANTHROPIC_BASE_URL="https://api.smouter.ai"export ANTHROPIC_AUTH_TOKEN="sk-smouter-…"export ANTHROPIC_MODEL="<model-id>"               # a claude-* id from the catalogexport ANTHROPIC_SMALL_FAST_MODEL="<model-id>"    # optional: cheaper id for background work claude
  • ANTHROPIC_AUTH_TOKEN sends your key as a bearer token. A stock ANTHROPIC_API_KEY (sent as x-api-key) authenticates identically — use whichever your setup already has.
  • Set ANTHROPIC_MODEL to an id copied from the catalog. Any chat model works on the Messages surface; Claude-family ids behave best inside Claude Code.
  • Smouter implements the Messages endpoint itself — streaming, tool use, and system prompts included. Auxiliary Anthropic endpoints (token counting, files) aren't proxied; Claude Code's core loop runs entirely over Messages.

Using the Claude Code desktop app or IDE extension instead of the terminal? Shell exports never reach an app launched from the dock — put the same variables in the env block of ~/.claude/settings.json (the second tab above) and restart the app.

Verify outside the tool first

Two commands separate a Smouter problem from a tool problem. If both succeed, your key, credit, and model id are fine — whatever remains is the tool's configuration.

# Which model ids can I use right now? (no auth needed)curl -s https://api.smouter.ai/v1/models | jq -r '.data[].id'

If it doesn't work

  • Wrong base URL shape. For Claude Code the base URL is https://api.smouter.ai — adding /v1 here produces a doubled /v1/v1/messages path and a 404.
  • Base URL wrong or missing /v1. OpenAI-style tools need exactly https://api.smouter.ai/v1 — no trailing /chat/completions, no bare api.smouter.ai. Anthropic-style tools (Claude Code) use https://api.smouter.ai with no suffix.
  • 401 auth — the key was pasted wrong, expired, or revoked. Secrets are shown once; create a fresh key in API keys and paste it whole, including the sk-smouter- prefix.
  • 402 insufficient_quota — your wallet or a per-key cap can't cover the request. Top up in Billing or raise the key's cap.
  • 404 model_not_found — the id doesn't match the catalog. Copy it verbatim from the catalog; ids are case-sensitive and carry no openai/-style prefix (where a tool requires one, the tool strips it before sending).
  • 429 — a rate or tokens-per-minute window is exhausted. Honor retry-after; per-key TPM is adjustable in API keys.
  • Scoped key. If the key has a model allowlist, every model the tool may call — including fallbacks — must be on it. When in doubt, test with an unscoped key.
  • The tool's UI moved. Settings get renamed; the three constants don't. Any field asking for an OpenAI(-compatible) base URL, key, and model name takes the values above.

Still stuck? Open a ticket with the request's x-request-id (or the error body) and we'll trace it — or email support@smouter.ai.