Appearance
Error codes
Every error response has the same body (see Errors):
json
{ "code": "MISSING_SCOPE", "message": "The API key lacks the scope runs:read.", "params": { "scope": "runs:read" }, "requestId": "…" }code is stable: branch on it, not on message. Words in {braces} below are filled from params. Codes marked as recorded on runs are not HTTP responses: they appear in the error of a failed run, node run or webhook payload.
This page lists 84 codes and is generated from the API source at build time.
Common
| Code | HTTP status | Message |
|---|---|---|
VALIDATION_FAILED | 400 | The request is invalid. |
UNAUTHENTICATED | 401 | Authentication required. |
INVALID_API_KEY | 401 | The API key is invalid, revoked or expired. |
FORBIDDEN | 403 | You are not allowed to do this. |
CSRF_REJECTED | 403 | Cross-site request refused: the request did not come from the console. |
AGENT_NOT_ALLOWED | 403 | This API key is restricted to other agents and may not use this one. |
MISSING_SCOPE | 403 | The API key lacks the scope {scope}. |
NO_ACTIVE_ORGANIZATION | 403 | Select an organization first. |
ORG_SUSPENDED | 403 | This organization is suspended. |
NOT_FOUND | 404 | Not found. |
CONFLICT | 409 | This conflicts with existing data. |
RATE_LIMITED | 429 | Too many requests. Retry after {retryAfter} seconds. |
QUOTA_EXCEEDED | 402 | The monthly spend limit of this organization is reached. |
INTERNAL | 500 | Something went wrong. |
PROVIDER_ERROR | 502 | The model provider failed: {reason} |
Runs
RUN_CANCELLED (499) is recorded on cancelled runs and sent in run.failed webhooks; it is never an HTTP status.
| Code | HTTP status | Message |
|---|---|---|
INPUT_INVALID | 400 | The input does not match the agent’s input schema. |
INPUT_TOO_LONG | 400 | {reason} |
INPUT_REJECTED | 400 | {reason} |
INPUT_LANGUAGE_NOT_ALLOWED | 400 | The input language ({language}) is not accepted by this agent; allowed: {allowed}. |
ASYNC_STREAM_CONFLICT | 400 | A run cannot be both async and streamed. |
AGENT_GONE | 404 | The agent was archived before the run started. |
RUN_NOT_CANCELLABLE | 409 | Only queued or running runs can be cancelled. |
AGENT_TYPE_NOT_SUPPORTED_YET | 400 | Running {type} agents is not supported yet. |
AGENT_TYPE_MISMATCH | 400 | This endpoint needs a {expected} agent. |
CONVERSATION_NOT_FOUND | 404 | The conversation does not exist. |
IDEMPOTENCY_KEY_REUSED | 409 | This Idempotency-Key was already used for a different request. |
IDEMPOTENCY_IN_PROGRESS | 409 | A run with this Idempotency-Key is still in progress. |
OUTPUT_SCHEMA_MISMATCH | 502 | The model output does not match the output schema. |
RUN_CANCELLED | 499 | The run was cancelled. |
Agents and versions
| Code | HTTP status | Message |
|---|---|---|
AGENT_CONFIG_INVALID | 400 | The agent configuration is invalid. |
TEMPLATE_TYPE_MISMATCH | 400 | The template is for {templateType} agents, not {type}. |
VERSION_NOT_FOUND | 404 | Version {version} of this agent does not exist. |
AGENT_NOT_PUBLISHED | 409 | The agent has no published version yet. |
Files
| Code | HTTP status | Message |
|---|---|---|
FILE_REQUIRED | 400 | Send a file in the multipart field "file". |
FILE_TOO_LARGE | 413 | The file is larger than {maxMb} MB. |
FILE_TYPE_NOT_SUPPORTED | 415 | Files of this type are not supported. |
FILE_TYPE_NOT_ACCEPTED | 400 | The agent does not accept {mimeType} files. |
FILE_TOO_MANY_PAGES | 400 | The file has {pages} pages; the limit is {maxPages}. |
PDF_PAGE_COUNT_UNKNOWN | 422 | The number of pages of this PDF cannot be determined (damaged or unusual file), so it cannot be checked against the page limit. |
FILE_NOT_FOUND | 404 | The file {fileId} does not exist. |
FILE_IN_USE | 409 | The file belongs to a data source document; delete the document instead. |
STORAGE_LIMIT_REACHED | 402 | The organization reached its storage limit of {maxMb} MB. |
Data sources
| Code | HTTP status | Message |
|---|---|---|
DATA_SOURCE_CONFIG_INVALID | 400 | The data source configuration is invalid. |
DATA_SOURCE_LIMIT_REACHED | 402 | The organization reached its limit of {max} data sources. |
EMBEDDING_MODEL_UNAVAILABLE | 400 | The embedding model {modelId} is not available. |
DATA_SOURCE_NOT_INDEXED | 400 | This is a live data source; it has no index. |
DATA_SOURCE_NOT_LIVE | 400 | This is not a live data source. |
DOCUMENT_UPLOAD_NOT_SUPPORTED | 400 | Documents cannot be added to {type} data sources; they are synced from the source. |
Workflows
The 4xx codes are request errors of the workflow endpoints. The 500 codes are recorded on failed workflow runs and node runs (error.code); they are not returned as HTTP errors.
| Code | HTTP status | Message |
|---|---|---|
NOT_A_WORKFLOW_RUN | 409 | This is not a workflow run. |
RUN_NOT_RETRYABLE | 409 | Only failed workflow runs can be retried. |
RUN_ENDED_AT_FAIL_NODE | 409 | The run ended at its fail node {nodeId} by design; a retry would end there again. Start a new run instead. |
APPROVAL_NOT_FOUND | 404 | No approval is waiting at node {nodeId}. |
EVENT_NOT_EXPECTED | 409 | The run is not waiting for the event {name}. |
WORKFLOW_NO_OUTPUT | 500 | The workflow ended without reaching an output node. |
WORKFLOW_STEP_LIMIT | 500 | The workflow run exceeded {limit} node executions. |
WORKFLOW_TIMEOUT | 500 | The workflow run exceeded {hours} hours. |
WORKFLOW_FAILED | 500 | {message} |
NODE_TIMEOUT | 500 | The node did not finish within {ms} ms. |
EXPRESSION_ERROR | 500 | Expression error: {reason} |
AGENT_NOT_AVAILABLE | 500 | The agent {agentId} does not exist, is archived or has no published version. |
DEPTH_LIMIT | 500 | The maximum run nesting depth ({limit}) was reached. |
CHILD_RUN_FAILED | 500 | The agent run failed: {reason} |
HTTP_STATUS | 500 | The HTTP request answered {status}. |
ITEMS_NOT_ARRAY | 500 | The map items expression must give an array. |
INVALID_TIME | 500 | The wait time expression must give an ISO timestamp. |
ITEM_FAILED | 500 | Item {iteration} failed: {reason} |
FILE_REF_INVALID | 500 | The {field} expression must give file ids or file objects with an id: {reason} |
FILE_NOT_AVAILABLE | 500 | The file {fileId} does not exist in this project or has expired. |
DOCUMENT_STEP_FAILED | 500 | Document processing failed: {reason} |
Realtime (HTTP)
| Code | HTTP status | Message |
|---|---|---|
AGENT_NOT_REALTIME | 400 | The agent {agent} is not a realtime agent. |
REALTIME_NOT_CONFIGURED | 400 | The agent has no usable realtime settings: {reason} |
REALTIME_SESSION_LIMIT | 429 | The organization reached its limit of {limit} concurrent realtime sessions. |
Models
| Code | HTTP status | Message |
|---|---|---|
MODEL_UNAVAILABLE | 400 | The model {modelId} is not available. |
MODEL_OUTPUT_INVALID | 502 | The model did not return output matching the schema. |
Tools (runtime)
| Code | HTTP status | Message |
|---|---|---|
TOOL_NOT_AVAILABLE | 400 | The tool {tool} is not available: {reason} |
Tools (configuration)
| Code | HTTP status | Message |
|---|---|---|
TOOL_CONFIG_INVALID | 400 | The tool configuration is invalid. |
TOOL_ARGS_INVALID | 400 | The arguments do not match the tool parameters. |
HTTP calls
| Code | HTTP status | Message |
|---|---|---|
SECRET_MISSING | 400 | The project secret {name} does not exist. |
HTTP_CALL_FAILED | 502 | The HTTP request failed: {reason} |
SECRET_ORIGIN_NOT_FIXED | 400 | A request that uses secrets needs a fixed scheme, host and port in its URL; placeholders and expressions are only allowed in the path and query. |
SECRET_ORIGIN_CHANGED | 400 | The request was not sent: it carries secrets and its URL does not point to the fixed origin of its URL template. |
Document processing
| Code | HTTP status | Message |
|---|---|---|
DOCUMENT_PROCESSING_FAILED | 422 | The document could not be read: {reason} |
DOC_WORKER_UNAVAILABLE | 503 | Document processing is temporarily unavailable. |
Webhooks
| Code | HTTP status | Message |
|---|---|---|
WEBHOOK_URL_NOT_ALLOWED | 400 | The webhook URL is not allowed: {reason} |
Realtime WebSocket
Sent as error events on WS /v1/realtime (see Realtime voice). Token errors are followed by close code 4401, provider and server errors by 4500.
| Code | Message |
|---|---|
TOKEN_INVALID | The realtime token is invalid. |
TOKEN_EXPIRED | The realtime token has expired; create a new session. |
TOKEN_USED | The realtime token was already used; create a new session. |
INVALID_EVENT | The message is not a valid realtime client event. |
UNSUPPORTED | This provider does not support {what}. |
PROVIDER_ERROR | The model provider failed: {reason} |
SESSION_LIMIT | The session was ended: {reason}. |
INTERNAL | Something went wrong. |
SDK-only codes
Raised by @hevkar/sdk without an HTTP response (see SDK errors).
| Code | Meaning |
|---|---|
CONNECTION_ERROR | network failure |
TIMEOUT | no response within timeoutMs |
ABORTED | the request was aborted with its signal |
STREAM_INTERRUPTED | the connection dropped before the streamed run ended |
STREAM_CONSUMED | a RunStream was iterated twice |
WAIT_TIMEOUT | runs.waitForCompletion ran out of time |
INVALID_SIGNATURE | webhook signature verification failed |
CONFIG_MISSING | no API key or base URL configured |