Skip to main content

Errors

Errors come back in this envelope:

{
"error": "validation_error",
"message": "Validation error, check the details for more information.",
"details": [
{"field": "conversation", "message": "Field required", "type": "missing"}
]
}

error is the code to branch on. message is for humans and is omitted for some errors, so {"error": "unauthorized"} is a complete body. details comes only with validation_error, one entry per invalid field, with field as a dotted path into the body.

StatuserrorMeaning
400bad_requestA batch sends both ai_service_description and ai_service_descriptions, or ai_service_descriptions does not match conversations in length.
400bad_requestScopeGuard-2 output_fields contains an unknown name.
400bad_requestEmpty conversation on ClaimExtractor extract-conversation.
401unauthorizedNo X-API-Key, or a key that matches no active key: wrong, truncated or revoked.
404not_foundmodel is not a served model (The specified model was not found.).
410scope_guard_v1_deprecatedA call to the retired ScopeGuard-1 endpoints (/orbitals/scope-guard/...). See What happened to ScopeGuard-1?.
422validation_errorThe body does not fit the schema, or Content-Type: application/json is missing. See details.
422api_ai_service_not_providedScopeGuard-2 called with no ai_service_description.
500internal_server_errorSomething failed on our side.

A 5xx can also arrive without the envelope, as {"detail": "..."} or as plain text. When you write to orbitals@principled-intelligence.com about an error, quote the X-Request-ID header of the response, when present.

From Python, sync clients raise requests.HTTPError, with the envelope in err.response.json(); async clients raise aiohttp.ClientResponseError, without the body.