Start here
Three commands answer most of it before you read any further:Authentication
401 — every request rejected
401 — every request rejected
x-api-key; OpenAI-style endpoints take
Authorization: Bearer. /v1/messages accepts either. Keys start with sdn_.
See Authentication.Claude Code ignores the gateway and talks to Anthropic
Claude Code ignores the gateway and talks to Anthropic
/logout first, then re-run npx sideren. Check
ANTHROPIC_BASE_URL is the bare origin — https://api.sideren.io, with no /v1;
the Anthropic SDK appends the path itself.Claude on Windows rejects my sdn_ key
Claude on Windows rejects my sdn_ key
sdn_; they are not Anthropic sk-ant- credentials.
Configure Claude Code with npx sideren setup --tool claude-code --key sdn_your_key, or set
ANTHROPIC_BASE_URL=https://api.sideren.io and put the key in ANTHROPIC_AUTH_TOKEN from
PowerShell. Do not paste it into the consumer Claude desktop app’s Anthropic key/sign-in field;
that app does not configure a custom gateway. See Claude Code.Codex can't find a key / missing SIDEREN_API_KEY
Codex can't find a key / missing SIDEREN_API_KEY
npx sideren setup --tool codex --key sdn_your_key so the key is stored as
experimental_bearer_token in ~/.codex/config.toml. See Codex CLI.Models
404 — no such model
404 — no such model
GET /v1/models. Unknown ids fail closed
rather than silently becoming something else, and the compatibility handles for foreign
SDK names are a finite list — an invented id is a 404 by design. See
Model routing.A model on the docs isn't in GET /v1/models
A model on the docs isn't in GET /v1/models
GET /v1/models is the live
catalog. A model retired or added since the page was generated shows up there first. Pick
a model from GET /v1/models for anything whose exact behavior you depend on.400 on a request with an image
400 on a request with an image
capabilities.vision on the catalog entry. See
Vision.422 — the model can't guarantee what you asked for
422 — the model can't guarantee what you asked for
tool_choice or a strict
response_format) that no placement of that model can honour exactly. Switch to a model whose supported_parameters includes it, or drop the
requirement.Output
Empty response, or an answer that stops mid-sentence
Empty response, or an answer that stops mid-sentence
finish_reason: "length" — you hit max_tokens. On a reasoning model, hidden
reasoning is charged against the same ceiling and can consume all of it, leaving
nothing for the answer. Raise the budget; 4,000+ is a safe floor on reasoning models.
See Reasoning.Unexpected thinking blocks break my client
Unexpected thinking blocks break my client
thinking, reasoning_effort or reasoning — often an SDK default.
Remove it.The stream just stops
The stream just stops
A different model answered than the one I named
A different model answered than the one I named
delivery field says which ids are pinned and which are compatibility
handles: optimized ids are served by whichever comparable model the gateway picks
today, exact ids keep their own placement. The response always echoes the id you
sent. Pin a delivery: "exact" id for anything whose exact behavior you depend on.
See Model routing.Limits and cost
429 with a short retry-after
429 with a short retry-after
retry-after exactly
and pace off the x-ratelimit-* headers instead of discovering the limit by hitting
it. Parallel agent fleets usually hit concurrency first. A 429 with
concurrency_limit_exceeded can also mean your running requests are holding the tokens
you have left: retry when one finishes. See Pricing & limits.402 allowance_exhausted or a usage limit
402 allowance_exhausted or a usage limit
402 allowance_exhausted. The message says how much of the month you have used, when your usage
renews and which plan has more. In-flight requests finish: nothing is cut off mid-stream, and
your subscription is never billed extra for it. A 402 carries no retry-after, because
waiting a few seconds doesn’t clear it.Every paid plan also has a 5-hour and a weekly usage limit. Past one,
requests return 402 five_hour_limit_reached or 402 weekly_limit_reached with the time the
limit resets (resets_at).Three ways to keep going:- Turn on extra usage on the billing page. Past your monthly usage or a usage limit, requests carry on using purchased credit, with your plan’s model access, when you have enough.
- Use purchased credit in PAYG mode. Add credit on the
billing page, then turn on PAYG mode for your
key or send the
x-sideren-payment-mode: paygheader. The setup helper’snpx sideren setup --payment-mode paygstamps it into the agents it configures. - Upgrade. The higher plan’s usage and limits apply right away. Downgrades take effect at renewal.
402 credit_used_up when it
is used. Purchased credit or a subscription keeps you going.400 plan_upgrade_required
400 plan_upgrade_required
400 payg_required
400 payg_required
x-sideren-payment-mode: payg header, or pick another model.402 credit_used_up with no retry-after
402 credit_used_up with no retry-after
retry-after. Subscribe, or add balance and turn on PAYG mode for your key. Don’t retry
it in a loop. (Before 2026-10-17 this code was credits_exhausted.)402 paid_credit_required
402 paid_credit_required
x-sideren-payment-mode: payg header) and there is no purchased balance left, or it named a
model your plan doesn’t cover and there was nothing to pay for it with. A top-up
clears both, and turning on extra usage lets the second kind carry on by itself. Or turn
PAYG mode off to use your plan’s monthly usage.Requests are slower than expected under load
Requests are slower than expected under load
Usage is burning faster than expected
Usage is burning faster than expected
x-sideren-monthly-used-percent on every response shows how much of the month you have
used. Two levers: move the hot path to a lighter model, and keep the start of your prompts
stable so more of each one is cached input, which costs far less
(Prompt caching).Getting help
support@sideren.io
- What you sent — endpoint, model id, and the request body with secrets removed.
- What came back — the status code and the full
error.message. - When — a rough timestamp with timezone, so the trace can be found.
- The
sideren-modelresponse header, if you have it — it names what actually served the request.