UNAUTHORIZED | 401 | Missing, malformed, unknown or revoked API key. | Check the Authorization header and that the key is active. |
VALIDATION_ERROR | 400 | The body failed schema validation, or none of content/fileBase64/fileUrl was supplied. | Inspect details and fix the offending fields. |
SUBSCRIPTION_REQUIRED | 402 | The workspace has no active subscription. | Resolve billing in the dashboard. |
FEATURE_NOT_AVAILABLE | 403 | The plan doesn’t include API access (Professional and above), or doesn’t include the Agent Builder. | Upgrade the plan. |
NOT_FOUND | 404 | No agent with that slug exists in the workspace. | Check the slug and that the key’s workspace owns the agent. |
AGENT_DISABLED | 403 | The agent exists but is disabled. | Re-enable it in the dashboard. |
NOT_PUBLISHED | 409 | The agent has no published version. | Publish the agent before calling it. |
PAYLOAD_TOO_LARGE | 413 | A fileBase64 exceeds ~10.5 MB once decoded. | Send a smaller file, or use fileUrl. |
RATE_LIMITED | 429 | The agent’s per-minute or per-day throttle was exceeded. | Back off using the Retry-After header. See rate limits. |
RUN_FAILED | 400 or 502 | The run failed. 400: the document couldn’t be opened (a fileUrl that couldn’t be fetched, invalid base64, a password-protected PDF). 502: the document couldn’t be read by the models. | For a 400, fix the document and send it again. For a 502, retry; if it persists, contact support with the runId. |
INTERNAL_ERROR | 500 | An unexpected server error. | Retry with backoff; contact support if persistent. |