Authentication

  • Provide your API key in the Authorization header:
    • Authorization: Bearer <api_key>
  • Missing/invalid key → 401:
{"error": {"type": "auth", "message": "missing_or_invalid_auth"}}
  • Revoked/inactive key → 403:
{"error": {"type": "auth", "message": "key_revoked"}}
  • Insufficient credits → 403:
{"error": {"type": "quota", "message": "insufficient_credits"}}

Required/Optional Headers

  • Required (protected routes): Authorization: Bearer <api_key>
  • Required (POST): Content-Type: application/json
  • Optional (idempotency for non‑stream endpoint): Idempotency-Key: <opaque-string>
  • Optional (streaming): Accept: text/event-stream