Skip to main content
Yelu uses standard HTTP status codes and an OpenAI-compatible JSON error envelope for API failures.

Error shape

error
object
required
The top-level error object.

HTTP status codes

Robust error handling

Operational guidance

  • Log HTTP status, error type, error code, endpoint, model, attempt number, and latency.
  • Redact Authorization, prompts, tool arguments, image URLs, audio content, and user data according to your privacy policy.
  • Set connect and total timeouts; a network request without a timeout can consume workers indefinitely.
  • Retry only temporary failures and cap the total time spent retrying.
  • Treat streamed responses as partial until the terminal event or [DONE] marker arrives.
Last modified on July 13, 2026