Error Codes
Meida uses standard HTTP status codes. Errors include a structured JSON body with a machine-readable code, human-readable message, and optional retry_after_ms.
Status Code Reference
Request completed successfully. The response body contains the completion and router telemetry.
The request body is malformed or missing required fields (e.g., messages array is empty or model field is missing).
The API key is missing, invalid, expired, or does not have permission for the requested resource.
The API key is valid but lacks permission for this action (e.g., using a me_test_ key on a production-only endpoint).
You have exceeded your tier's rate limit (requests per minute). The response includes a Retry-After header.
An unexpected error occurred within the Meida routing engine. This is rare and typically self-recovering.
The selected upstream provider returned an invalid response. Meida's failover engine should have rerouted automatically.
All providers in the requested tier are currently unavailable. This triggers the full failover cascade.
Error Response Format
{
"error": {
"code": "rate_limit_exceeded",
"message": "You have exceeded 1000 RPM for your current tier.",
"type": "rate_limit_error",
"retry_after_ms": 12000
}
}