Errors & rate limits
When a call fails, Lynxin returns a standard HTTP status with a structured error body. For validation errors (422), detail is an array — each item carries loc / msg / type. A 402 insufficient-credits error returns a structured billing_error (below).
| Code | Meaning | What to do |
|---|---|---|
400 | Malformed request (JSON/params) | Check the request body |
401 | Missing/invalid key, or bypassed gateway | Check your key and routing |
402 | Not enough credits (envelope shape below) | Branch on HTTP 402, not on code; to add balance, see Billing |
403 | The key is valid but not allowed to make this call (the response body is empty) | Common causes: the key lacks a required permission; a client key called an account-management or delete endpoint; the HTTP method is wrong, or the path has an extra or missing trailing slash; the service isn't enabled for you yet; the source IP isn't on the list; the request origin isn't on the allowed list. |
404 | Not found, or cross-tenant access (out-of-tenant = 404) | Confirm the ID is yours |
410 | Called a retired endpoint | This endpoint has been retired: use the endpoints in these docs instead; if you use the SDK, upgrade to the current version. |
422 | Validation failed (detail is an array, one entry per offending field) | Read detail[].loc for the field and detail[].msg for the reason |
429 | Over concurrency / rate limit | Back off exponentially (1s→2s→4s), then retry |
503 | The authentication service is temporarily unavailable | Retry shortly |
5xx | Server error | Back off; if persistent, contact support |
When you report a problem, include the X-Request-Id response header; when a business endpoint returns an error, the error body also carries error.request_id. A 401 or 403 rejected by the gateway has an empty body, so the header is the only place to find it.
The root-level _schema envelope
Every JSON response body from a /v1 business endpoint carries a root-level _schema key — including 4xx and 5xx error responses. It is additive and changes no existing field. Operational endpoints (/healthz, /openapi.json) and very large responses (CSV exports) are excluded. Seeing it while parsing an error body is expected. Requests the gateway rejects outright (401 for a missing or invalid key, and 403) have an empty, non-JSON body without this key; check the status code before you parse the body.
402: not enough credits
code is insufficient_credits. The 402 returns a structured billing_error carrying remaining, estimated_cost, action, docs_url. These are credits, not money.
Branch on the HTTP 402 status, not on code.
Where 402 occurs
402 only occurs on direct calls to Lynxin Affect / Lynxin Persona: when your credit balance isn't enough for the call, the platform rejects it before the analysis starts.
Rate limits
Limits are set by your key tier: Lite 5 req/s (concurrency 1) · Standard 20 req/s (concurrency 3) · Pro 50 req/s (concurrency 8).
429); the per-second figures are reference values, not a guarantee.Polling
Poll status every 3–5 seconds with exponential backoff; long videos may take minutes. status network retries are safe.