Errors
The API uses ordinary HTTP status codes. A 2xx means success. Anything else comes with a JSON body that says what went wrong.
The error shape
Every error body has the same shape:
Some errors add fields of their own: requiredScopes and missingScopes on insufficient_scope, and retryAfterSeconds on rate_limited.
Branch on statusCode first, then on error.
Request ids
Every response, success or error, carries an X-Request-Id header such as req_01M726GS2P1N4DCP7FARE8MA4F. Quote it when you contact support. It also finds the request in Developers → Request log.
You can send your own X-Request-Id (up to 64 letters, digits, ., _, : or -). The API keeps it and returns it, so you can match API requests to your own logs. Anything else is replaced with a new id.
Server errors
An unexpected failure answers 500 with a generic message and an errorId, which is the same value as requestId:
The details stay in Rydhm’s logs under that id.
Status codes
Rydhm doesn’t enforce credits or plan limits yet. When it does, routes that start paid work (chats, voice sessions, meetings) can answer 402 payment_required, and creating experts or adding knowledge can answer 403 plan_limit. Handle both now so your integration is ready.
Errors during a stream
A chat reply stream (GET /v1/chat/conversations/{id}/stream) sends its headers before the reply is generated. If the reply fails after that, the stream carries an error frame instead of an HTTP status:
Rate limits
Rate limits stop runaway loops and abuse. They are set well above normal use.
Each limited route counts requests in fixed windows, in two buckets at once:
- the workspace, shared by everyone and every key in it;
- the key, so one integration can’t use up the whole workspace’s budget.
A request is refused when either bucket is full.
Headers
Rate-limited routes return the state of the tightest budget the request touched:
Routes without a limit, such as reading an expert, don’t send these headers.
When you hit a limit
The API answers 429:
Wait Retry-After seconds, then retry. Don’t retry in a tight loop: every retry inside the window is refused too. The SDKs retry 429 responses for you with backoff.
Limits by route
The MCP endpoint also lets one key run at most 3 ask_… questions at the same time. See MCP.
Voice sessions are also capped by how many calls a workspace may run at once. Past the cap, a new session gets 429 with error: "concurrency_limit".
Public routes
The public routes under /v1/public/… need no key. They are limited per visitor IP address and per expert instead. A refused request gets 429 with a Retry-After header and the message “Too many requests. Please wait a moment and try again.” These routes don’t send the X-RateLimit-* headers.