Skip to content

Errors

Sleepwalker API errors use a detail field.

Simple errors return a string:

{
"detail": "Missing or invalid Authorization header"
}

Schema validation errors return a list. This happens before endpoint logic runs:

{
"detail": [
{
"type": "missing",
"loc": ["body", "url"],
"msg": "Field required",
"input": {}
}
]
}

Action denials and some domain errors return a structured object. Depending on the endpoint, the machine-readable key is reason or error:

{
"detail": {
"reason": "invalid_request",
"action_decision_id": "act_...",
"required_scope": "visibility:runs:create",
"estimated_credits": "0.00",
"probe_count": 0,
"errors": ["unsupported_platform"]
}
}
Status Meaning
400 The request passed schema validation but contains an invalid URL, cursor, filter, or field combination.
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.
422 A required body/query field is missing, has the wrong type, or violates a declared field bound.
429 API key rate limit exceeded.
500 Extraction, provider, or another unexpected server operation failed.
503 The requested action is temporarily unavailable.

API-key requests are limited to 300 authenticated requests per hour by default. Endpoint error tables call out expected domain errors; any authenticated API endpoint can also return 401, 403, or 429, and storage-backed work can return 500 or 503.

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.