Error Event Format
Errors arrive as SSE events:Error Codes
| Code | HTTP Status | Retryable | Description |
|---|---|---|---|
VALIDATION_ERROR | 400 | No | Invalid request body or parameters |
AUTHENTICATION_ERROR | 401 | No | Invalid or missing API key |
RATE_LIMIT_ERROR | 429 | Yes | Too many requests |
PROCESSING_ERROR | 500 | Yes | Internal processing failure |
TIMEOUT_ERROR | 504 | Yes | Request took too long |
Common Errors
VALIDATION_ERROR
Missing required fields (config, userPrompt), invalid GraphConfig structure, or malformed JSON.
Resolution: Check the request body against the schema.
AUTHENTICATION_ERROR
MissingAuthorization header, malformed header (missing Bearer prefix), or invalid API key.
Resolution: Verify the API key and header format.
RATE_LIMIT_ERROR
Too many requests in a short period. Resolution: Implement exponential backoff and retry.PROCESSING_ERROR / TIMEOUT_ERROR
Internal failure or request took too long. Resolution: Retry with exponential backoff. If persistent, contact support.HTTP Status Codes
Errors may also arrive as HTTP status codes before streaming begins:| Status | Description |
|---|---|
| 400 | Bad Request — Invalid JSON or missing fields |
| 401 | Unauthorized — Invalid or missing API key |
| 429 | Too Many Requests — Rate limit exceeded |
| 500 | Internal Server Error — Processing failure |
| 504 | Gateway Timeout — Upstream timeout |
Retry Strategy
For retryable errors, use exponential backoff:base_delay: 1000msbackoff: 2max_attempts: 3
| Attempt | Delay |
|---|---|
| 1 | 0ms (immediate) |
| 2 | 1000ms |
| 3 | 2000ms |
- Only retry if
retryable: true - Set a maximum retry count
- Treat network failures as retryable
- The API is stateless, so retries are safe

