Errors¶
| Status | When | Body |
|---|---|---|
200 |
Success, including requests stopped by a reject rule (see rejected in the response). |
Response object |
400 |
The request is well-formed JSON but cannot run: invalid schema, unknown field reference, disallowed host, missing secret, invalid messages, image sent to a text-only model, thinking on a model without it. |
{"detail": "..."} |
422 |
The body does not match the parameter types: missing schema, a value out of range (for example max_new_tokens > 512), wrong type. |
{"detail": [ {"loc": [...], "msg": "...", "type": "..."} ]} |
500 |
Unexpected server error. | – |
Examples (real responses).
400, unknown type:
{"detail": "schema tidak valid: field 'a': tipe 'money' tidak dikenal (pilih dari ['bool', 'call', 'compute', 'enum', 'list', 'number', 'string'])"}
422, missing schema:
{"detail": [{"type": "missing", "loc": ["body", "schema"], "msg": "Field required", "input": {"context": "x"}}]}
422, value out of range:
{"detail": [{"type": "less_than_equal", "loc": ["body", "max_new_tokens"], "msg": "Input should be less than or equal to 512", "input": 9999}]}
400 texts are in Indonesian and name the field that caused the problem.
Errors during streaming¶
Everything that can be checked before the model runs (schema, hosts,
secrets, messages) is returned as a normal 400 before the stream starts.
A failure after the stream has started arrives as a final event:
Failed tool calls¶
A failing HTTP call is not an HTTP error of the API. It follows the field's
on_error (null, review or reject) and is recorded in trace with its
status and error text. See Tool calls.