Error Codes
All errors return HTTP 200 with structured envelope. Checksuccess field and metadata.errors array.
Request Errors
INVALID_REQUEST
Cause: Missing or invalid parameters Example:PAYLOAD_TOO_LARGE
Cause: Input exceeds size limit Limits:- Batch repair: 5MB
- Streaming chunk: 5MB per chunk
Repair Errors
UNRECOVERABLE_SYNTAX_ERROR
Cause: Input contains no recoverable JSON structure after syntax repair Example:SCHEMA_VALIDATION_FAILED
Cause: Repaired JSON doesn’t match provided schema Example:Session Errors
SESSION_NOT_FOUND
Cause: Streaming session expired or doesn’t exist Session TTL: 60 seconds Example:BUFFER_SIZE_EXCEEDED
Cause: Session buffer exceeded limit (possible hallucination loop) Circuit Breaker: 5MB buffer limit Example:Service Errors
SERVICE_UNAVAILABLE
Cause: Server at maximum capacity Example:INTERNAL_ERROR
Cause: Unexpected server error Example:X-Request-ID header
Authentication Errors
INVALID_API_KEY
Cause: API key is invalid or revoked Example:RATE_LIMIT_EXCEEDED
Cause: Exceeded tier rate limit Example:Error Response Structure
All errors follow this structure:Handling Errors
Check Success Field
Retry Logic
Next Steps
Batch Endpoint
API reference for batch repair
Streaming Endpoints
API reference for streaming repair
Error Handling Guide
Best practices for error handling
Rate Limits
Understand tier limits
