Skip to main content
An error answer has a JSON body with one error object:
Branch on code. type is coarse, and param is present only when one request field is at fault. message is for people and can change.

Every route

Robot models over HTTP

These codes come from POST /v1/chat/completions. With "stream": true, a failure after the stream starts keeps HTTP status 200. It arrives as a data: event with an error object and finish_reason "error". Its code is one of the codes above, for example model_failure or session_expired.

Robot models over WebSocket

The handshake refusals are in Sessions over WebSocket. On an open socket, an error arrives as a {"type":"error"} message with a closing flag. With closing: false, the rejected observation does not advance the session. Other queued observations may still run. An observation error carries its observation_id; frame and session-control errors do not. Fix the message and send it again: With closing: true, the socket closes next:

LLM models

These codes come from POST /v1/responses and GET /v1/responses/{id}. A buffered stream can end with an error event:

Robot runs

These codes come from /v1/robot/runs.

Limits