Skip to main content
Both planes return a structured errors array. The inference plane additionally wraps it in the envelope the calling SDK expects, so OpenAI and Anthropic SDK exceptions work unchanged while the Telnyx detail remains available.

Error envelopes

Every response carries an X-Request-ID header. Keep it, together with the code, when reporting a problem. Do not log authorization headers, token keys or full request objects. An error that occurs after a streaming response has started cannot change the HTTP status. On the OpenAI surface it arrives as an error chunk; on the Anthropic surface, as an event: error frame. Consume every stream to completion and handle the SDK’s stream exceptions. A buffered-response delivery failure after JSON headers have been sent aborts the incomplete HTTP response; treat it as a transport failure with potentially completed provider work.

Additional request errors

Pending provisioning

An inference response with HTTP 503, code enforcement_unavailable and the optional header x-ltg-enforcement-reason: provisioning indicates that the request encountered pending provisioning of the token key or its group/user policy. The header does not change the status or error body, and does not guarantee when provisioning will complete. If the header is absent, the provisioning state is unspecified. Retry model discovery with bounded backoff, respecting Retry-After, before sending the first inference request. Stop and surface the failure if provisioning exceeds your application’s deadline. Do not repeatedly create replacement keys or automatically replay inference requests.

Status codes

Error codes

Handling guidance

  • Never resolve an error by escalating credentials. A Telnyx API key, provider secret or any other credential is rejected on the inference plane by design.
  • Retry management mutations with the same idempotency key. A new key on retry can create a duplicate resource.
  • Do not automatically retry inference. A timeout or 502 is not proof that no provider work happened. Retry only errors that occurred before dispatch, and honor Retry-After on 429.
  • Re-read before re-writing. On 412, fetch the resource, review the change that landed, and apply your update to the current version.
  • Fail closed on 503. For inference, the old policy may no longer apply; do not assume the request is authorized. For a BYOK model, check that the group has a provider key attached for that model’s provider.
  • Narrow oversized spend reports before retrying. Reports exceeding 10,000 matching requests return 503 with enforcement_unavailable. Reduce the date range or narrow resource filters; reducing page size or retrying the unchanged query does not resolve this limit. Treat a failed report as unavailable, not zero usage.