Rate limits
How Merius rate limits requests, what a 429 means, and how to back off and retry.
Merius protects capacity with rate limiting. When you exceed your allowance — or the service is
momentarily saturated — you get an HTTP 429 with a Retry-After header. Back off and retry.
What counts against a limit
Limits are applied per API key. A 429 is always retryable: it means "too many requests right
now," not "your request was wrong."
Handling a 429
Retry 429 responses with exponential backoff, and honor the Retry-After header (seconds to wait
before retrying). The official OpenAI SDKs already do this — no extra code needed.
from openai import OpenAI
# The SDK automatically retries 429s with backoff. Tune it if you like:
client = OpenAI(
base_url="https://api.merius.ai/v1",
api_key=os.environ["MERIUS_API_KEY"],
max_retries=5, # default is 2
)If you call the API directly, implement backoff yourself: on a 429, wait Retry-After seconds
(or start at ~1s and double each attempt), then retry.
A 429 is not an error in your request — it's a signal to slow down. Distinguish it from a 400
(fix the request) using the status code and the type field. See Errors.
Increasing your limits
Limits scale with sustained, healthy usage. If you have a high-throughput workload and are hitting
429s consistently, contact us to raise your allowance — steady traffic qualifies for higher
limits than sudden bursts.
Reducing 429s
- Spread requests rather than bursting — a steady rate is smoother than spikes.
- Retry with backoff so a brief capacity dip doesn't fail your job.
- Stream long generations (
stream: true) — streamed requests hold a connection efficiently and start returning tokens immediately. See Streaming.