API reference
Errors & rate limits
Merius uses standard HTTP status codes and returns errors in the OpenAI shape, so your existing error handling works without changes. Each model has dedicated capacity; when one is briefly saturated we return a clean 429 in under a second rather than queuing you into a timeout.
Status codes #
Every response carries one of these status codes:
| Parameter | Type | Description |
|---|---|---|
200 | OK | The request succeeded. |
400 | bad request | Malformed JSON or an invalid parameter. The error body says which field. |
401 | unauthorized | Missing or invalid API key. Check the Authorization header. |
402 | payment required | Insufficient credit balance. Add credits in the dashboard. |
404 | not found | Unknown model slug or endpoint. Check the model id and path. |
429 | rate limited | Model briefly saturated or your rate limit reached. Back off and retry; returned in under a second. |
500 | server error | An error on our side. Safe to retry with exponential backoff. |
The error object #
Errors return a JSON body with an error object: a human-readable message, a type, and where relevant the offending param and a code. This matches OpenAI’s error shape:
{
"error": {
"message": "Unknown model: gpt-foo",
"type": "invalid_request_error",
"param": "model",
"code": "model_not_found"
}
}
Rate limits #
Limits are applied per key. When you exceed your limit, or a model is momentarily saturated, you get a 429 quickly so you can retry rather than blocking. Use exponential backoff with jitter on 429 and 500.
- Retry 429 and 5xx responses with exponential backoff; do not retry 400, 401, or 402.
- Spread bursts over time rather than firing every request at once.
- Need higher, guaranteed throughput? A dedicated endpoint reserves capacity for your workload — see Two ways to run on the home page.
Live status and 90-day uptime history are on the status page, linked in the footer.