invalid_request | 400 or 422 | Malformed body or parameter, missing required field (such as speaker with an API key), or value out of range. | Read error, fix the request, and do not retry unchanged. |
unauthorized | 401 | Key is missing, malformed, unknown, revoked, or expired, or the person who created a personal key left the organization. | Verify the key. Log the key id (never the secret). |
forbidden | 403 | Valid credential that reaches the agent or project, but its role does not allow the action, or the body sets an undocumented field. | Read error. Use a key whose role allows the call; see Roles and permissions. |
payment_required | 402 | Organization credit balance is zero. Nothing was learned or answered. | Add credits. See Credits. |
not_found | 404 | The id does not exist, or your key cannot reach it. | Check the id and agent access. |
agent_not_found | 404 | Agent does not exist, or your key does not reach it: it is private, or in another project. | Check agent_id and which project your key belongs to. |
thread_not_found | 404 | Thread does not exist, or your key cannot open it. | Check thread_id and X-SP-End-User. |
conflict | 409 | Action conflicts with current state: forgetting a turn that is still learning or belongs to a file (file_piece), deleting a file that is still learning or queued, deleting a picture cut from a document, or reusing an Idempotency-Key with a different payload. | Read error. Wait for learning to finish, delete the parent file instead, or use a new Idempotency-Key. |
agent_not_ready | 409 | Agent is initializing or failed. | Poll GET/v2/agents/ until ready. If failed, delete and recreate the agent. |
agent_quota_exceeded | 409 | The organization holds 100 live agents, across all its projects. | Delete an unused agent or request a higher ceiling. |
duplicate_upload_in_progress | 409 | This agent is already learning or queuing this exact file in another thread. | Do nothing; once committed, its memories are available in every thread. |
document_already_ingested | 409 | This agent already learned these exact bytes in another thread. | Its memories are already searchable. Send allow_duplicate=true only if you intentionally want a second copy. |
document_uploaded_elsewhere | 409 | An upload of these bytes in another thread stopped partway or failed. | Call POST/v2/agents//files//resume, or upload with allow_duplicate=true to read it again in full. |
payload_too_large | 413 | Image exceeds 10 MiB, message attaches more than 10 images, or total image payload exceeds the request cap. | Send fewer or smaller images. |
document_too_large | 413 | File exceeds the 30 MiB cap. | Split the file into smaller parts. |
document_too_many_turns | 413 | File splits into more than 20,000 pieces. | Split the file. |
document_too_complex | 413 | File is under 30 MiB but exceeds converter or OCR complexity limits. | Split the file or upload a version with selectable text instead of a scan. |
document_too_many_pages | 413 | Scanned document has more pages than OCR accepts in one upload. | Split the document. |
document_too_large_for_ocr | 413 | Scanned document is larger than OCR accepts. | Split it or export with selectable text. |
unsupported_document | 400 | File type is not supported (for example, SVG). | Convert to PDF or another supported format. |
empty_document | 400 | Document produced no readable text. | Check the file contents. |
encrypted_document | 400 | Document is password-protected. | Remove the password and upload again. |
malformed_document | 400 | File is truncated or corrupted. | Re-export and upload again. |
document_needs_ocr | 400 | Scanned file needs OCR, which is unavailable for it. | Upload a version containing selectable text. |
ingestion_failed | 400 | Conversion failed for another document reason. | Read error and re-export the file. |
document_service_unavailable | 502 | Document converter did not respond. The file itself is fine. | Wait and upload again with the same Idempotency-Key. |
ocr_failed | 502 | Text recognition failed on a scan. | Wait and retry, or upload a text version. |
document_pages_unexpected | 502 | Text recognition returned mismatched pages; nothing was stored. | Wait and retry. |
ocr_busy | 503 | Text recognition pool is saturated. | Retry in a few minutes. |
rate_limit_exceeded | 429 | Rate window, concurrency cap (2 answers/subject, 4/org, 3 files/org), or single-agent observe slot hit. | Wait Retry-After seconds and retry. |
service_unavailable | 503 | Priors component did not respond, agent is restarting, or personal-key membership check failed. | Wait and retry with exponential backoff. |
answer_model_unavailable | 503 | Answering model did not respond. | Wait and retry with the same Idempotency-Key. |
service_not_configured | 503 | Feature is not enabled for your organization. | Do not retry. |
internal_error | 500 | Server-side defect. | Do not retry in a tight loop. Record request_id. |