51cowork APIDocs
Open docs navigation

API Reference

Errors, status codes, and request_id

Gateway errors distinguish invalid requests, authentication, credit, rate limits, and upstream failures.

Quick answer

Record HTTP status, error code, and request_id first. Fix authentication and validation errors instead of automatically retrying them.

Auth
401
Credit/access
402 / 403
Rate limit
429
Correlation
request_id
01

Status matrix

StatusMeaningAction
400Invalid JSON, field, or model parameterFix, then send again
401Missing, invalid, or disabled KeyRecopy the Key and update clients
402 / 403Insufficient balance or group accessCheck account state in Dashboard
404Path, model, or capability not foundRefresh /v1/models
429Rate limited or temporarily unavailableHonor Retry-After
5xxGateway or upstream failureBounded retry with request_id
02

Minimal diagnosis order

  1. 1Confirm Dashboard signs in.
  2. 2Review account state, balance, and API Key.
  3. 3Recopy Gateway, Key, and model ID.
  4. 4Call /v1/models to verify authentication.
  5. 5Send a minimal non-streaming cURL, then return to the SDK or IDE.
03

Retry boundary