Errors
Sleepwalker API errors use a detail field.
Simple errors return a string:
{ "detail": "Missing or invalid Authorization header"}Action denials return a structured object:
{ "detail": { "reason": "invalid_request", "action_decision_id": "act_...", "required_scope": "visibility:runs:create", "estimated_credits": "0.00", "probe_count": 0, "errors": ["unsupported_platform"] }}HTTP Status Codes
Section titled “HTTP Status Codes”| Status | Meaning |
|---|---|
400 | Invalid request body, invalid cursor, unsupported value, or missing required field. |
401 | Missing or invalid authentication. |
402 | Insufficient credits for a billable action. |
403 | Key does not have the required scope, the account is suspended, or the action is unavailable. |
404 | Resource was not found or does not belong to the authenticated user. |
503 | The requested action is temporarily unavailable. |
Common Machine-Readable Values
Section titled “Common Machine-Readable Values”Structured action errors may include these reason or errors values:
| Value | Meaning |
|---|---|
missing_scope | The key does not include the required scope. |
user_suspended | The account cannot run actions. |
invalid_request | Request validation failed. See errors. |
insufficient_credits | No billable work could be queued with the current balance. |
unsupported_platform | Platform is not supported. |
too_many_prompts | Prompt count exceeds the visibility run limit. |
too_many_platforms | Platform count exceeds the visibility run limit. |
too_many_probes | Probe count exceeds the visibility run limit. |
too_many_competitors | Competitor count exceeds the visibility run limit. |
prompt_too_long | One prompt exceeds the prompt length limit. |
invalid_cursor | starting_after does not match a visible run. |