LogoToRouter Docs
LogoToRouter Docs
HomepageWhat is ToRouter5-minute quickstartCore concepts
Common HTTP errorsRate-limited — what to doKey blocked or revokedUpstream provider errors & failoverProduction best practices
Troubleshooting

Key blocked or revoked

Why a previously-working ToRouter key suddenly stops working — and how to recover.

A key that was working yesterday is rejected today. Five things can cause that.

Why a key stops working

Recovery checklist

Read the error body

The type in the error body disambiguates: INVALID_API_KEY, API_KEY_DISABLED, API_KEY_EXPIRED, ACCESS_DENIED, API_KEY_QUOTA_EXHAUSTED, USER_INACTIVE. Match it to the accordions above.

Open the key in /keys

If the key still appears in the list, click it. The detail panel shows expiry, IP allowlist, model whitelist, quota, and last-used IP.

Fix or rotate

  • Restrictive setting wrong → edit the setting and retry.
  • Key revoked / lost / leaked → create a new key, copy it, deploy.
  • Quota too low → raise it, or top up if it's the account that's empty.

Verify with one request

smoke test
curl https://portal.torouter.ai/v1/chat/completions \
  -H "Authorization: Bearer sk-NEW" \
  -H "Content-Type: application/json" \
  -d '{"model":"gpt-5","messages":[{"role":"user","content":"ping"}]}'

Never paste a working key into a chat, log, or screenshot. Keys are shown once at creation — if you lose it, rotate.

Next steps

Create an API key

Sensible defaults for a new production key.

Per-key limits

IP allowlist, model whitelist, RPM, quota, expiry.

Production best practices

Avoid this class of outage in the first place.

Rate-limited — what to do

Three different things produce a 429 from ToRouter. Here is how to tell them apart and fix each one.

Upstream provider errors & failover

How ToRouter retries across channels when an upstream provider has issues — and what you'll see when it can't help.

Table of Contents

Why a key stops workingRecovery checklistRead the error bodyOpen the key in /keysFix or rotateVerify with one requestNext steps