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:

ParameterTypeDescription
200OKThe request succeeded.
400bad requestMalformed JSON or an invalid parameter. The error body says which field.
401unauthorizedMissing or invalid API key. Check the Authorization header.
402payment requiredInsufficient credit balance. Add credits in the dashboard.
404not foundUnknown model slug or endpoint. Check the model id and path.
429rate limitedModel briefly saturated or your rate limit reached. Back off and retry; returned in under a second.
500server errorAn 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 body
{
  "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.