أساس · التوثيق

Errors

RFC 9457 problem+json error envelope, status codes, and error code catalog.

الأخطاء

تُعاد جميع الأخطاء بصيغة موحّدة application/problem+json وفق معيار RFC 9457، مع رمز خطأ ومعرّف طلب لتتبّعه مع فريق الدعم.

Every ASAS error is returned as a single, consistent envelope: application/problem+json (RFC 9457), with an ASAS code and a request_id you can quote to support.

Error envelope

{
  "type": "about:blank",
  "title": "Text exceeds the maximum length",
  "status": 422,
  "detail": "text must be at most 500 characters",
  "code": "text_too_long",
  "request_id": "req_9f2c1a7b3e"
}
FieldMeaning
statusHTTP status code (also on the response).
titleShort, human-readable summary.
detailSpecifics for this occurrence.
codeStable machine-readable ASAS error code — branch on this, not on title.
request_idCorrelates the request across ASAS logs. Include it in support tickets.

Error bodies never leak upstream hostnames, paths, or stack traces. Upstream FLITC errors are normalized into this envelope.

Status codes

StatusMeaningWhat to do
400Malformed requestFix the request body / headers.
401Missing or invalid API keyCheck the Authorization header.
403Key lacks the required scopeGrant the scope, or use a key that has it.
404Resource not foundCheck the id / path.
409Conflict / not ready (e.g. RAG tenant provisioning)Retry after the indicated delay.
422Validation failedRead detail; fix the field.
429Rate limit or quota exceededBack off; see Rate limits.
500Gateway errorRetry with backoff; contact support with request_id.
502 / 504Upstream error / timeoutRetry with backoff. Do not auto-retry synthesis blindly.

Common error codes

codeStatusMeaning
unauthorized401No valid key on the request.
insufficient_scope403Key is valid but not scoped for this endpoint.
text_too_long422TTS text over 500 characters.
validation_error422A field failed schema validation.
rate_limited429Request-rate limit hit. Honor Retry-After.
quota_exceeded429Out of credits. Top up / contact sales.
concurrency_limit429Too many concurrent streams for your tier.
rag_not_provisioned409RAG entitlement not yet provisioned.
rag_resuming409RAG tenant is resuming from idle; retry after Retry-After.
upstream_timeout504Upstream model timed out.

Handling errors well

  • Branch on code, never on title or detail (those may be localized or reworded).
  • Respect Retry-After on 409/429 — it tells you exactly how long to wait.
  • Log request_id on every failure so support can trace it end to end.

On this page