Skip to content

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 ​

CodeHTTP statusMessage
VALIDATION_FAILED400The request is invalid.
UNAUTHENTICATED401Authentication required.
INVALID_API_KEY401The API key is invalid, revoked or expired.
FORBIDDEN403You are not allowed to do this.
CSRF_REJECTED403Cross-site request refused: the request did not come from the console.
AGENT_NOT_ALLOWED403This API key is restricted to other agents and may not use this one.
MISSING_SCOPE403The API key lacks the scope {scope}.
NO_ACTIVE_ORGANIZATION403Select an organization first.
ORG_SUSPENDED403This organization is suspended.
NOT_FOUND404Not found.
CONFLICT409This conflicts with existing data.
RATE_LIMITED429Too many requests. Retry after {retryAfter} seconds.
QUOTA_EXCEEDED402The monthly spend limit of this organization is reached.
INTERNAL500Something went wrong.
PROVIDER_ERROR502The 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.

CodeHTTP statusMessage
INPUT_INVALID400The input does not match the agent’s input schema.
INPUT_TOO_LONG400{reason}
INPUT_REJECTED400{reason}
INPUT_LANGUAGE_NOT_ALLOWED400The input language ({language}) is not accepted by this agent; allowed: {allowed}.
ASYNC_STREAM_CONFLICT400A run cannot be both async and streamed.
AGENT_GONE404The agent was archived before the run started.
RUN_NOT_CANCELLABLE409Only queued or running runs can be cancelled.
AGENT_TYPE_NOT_SUPPORTED_YET400Running {type} agents is not supported yet.
AGENT_TYPE_MISMATCH400This endpoint needs a {expected} agent.
CONVERSATION_NOT_FOUND404The conversation does not exist.
IDEMPOTENCY_KEY_REUSED409This Idempotency-Key was already used for a different request.
IDEMPOTENCY_IN_PROGRESS409A run with this Idempotency-Key is still in progress.
OUTPUT_SCHEMA_MISMATCH502The model output does not match the output schema.
RUN_CANCELLED499The run was cancelled.

Agents and versions ​

CodeHTTP statusMessage
AGENT_CONFIG_INVALID400The agent configuration is invalid.
TEMPLATE_TYPE_MISMATCH400The template is for {templateType} agents, not {type}.
VERSION_NOT_FOUND404Version {version} of this agent does not exist.
AGENT_NOT_PUBLISHED409The agent has no published version yet.

Files ​

CodeHTTP statusMessage
FILE_REQUIRED400Send a file in the multipart field "file".
FILE_TOO_LARGE413The file is larger than {maxMb} MB.
FILE_TYPE_NOT_SUPPORTED415Files of this type are not supported.
FILE_TYPE_NOT_ACCEPTED400The agent does not accept {mimeType} files.
FILE_TOO_MANY_PAGES400The file has {pages} pages; the limit is {maxPages}.
PDF_PAGE_COUNT_UNKNOWN422The number of pages of this PDF cannot be determined (damaged or unusual file), so it cannot be checked against the page limit.
FILE_NOT_FOUND404The file {fileId} does not exist.
FILE_IN_USE409The file belongs to a data source document; delete the document instead.
STORAGE_LIMIT_REACHED402The organization reached its storage limit of {maxMb} MB.

Data sources ​

CodeHTTP statusMessage
DATA_SOURCE_CONFIG_INVALID400The data source configuration is invalid.
DATA_SOURCE_LIMIT_REACHED402The organization reached its limit of {max} data sources.
EMBEDDING_MODEL_UNAVAILABLE400The embedding model {modelId} is not available.
DATA_SOURCE_NOT_INDEXED400This is a live data source; it has no index.
DATA_SOURCE_NOT_LIVE400This is not a live data source.
DOCUMENT_UPLOAD_NOT_SUPPORTED400Documents 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.

CodeHTTP statusMessage
NOT_A_WORKFLOW_RUN409This is not a workflow run.
RUN_NOT_RETRYABLE409Only failed workflow runs can be retried.
RUN_ENDED_AT_FAIL_NODE409The run ended at its fail node {nodeId} by design; a retry would end there again. Start a new run instead.
APPROVAL_NOT_FOUND404No approval is waiting at node {nodeId}.
EVENT_NOT_EXPECTED409The run is not waiting for the event {name}.
WORKFLOW_NO_OUTPUT500The workflow ended without reaching an output node.
WORKFLOW_STEP_LIMIT500The workflow run exceeded {limit} node executions.
WORKFLOW_TIMEOUT500The workflow run exceeded {hours} hours.
WORKFLOW_FAILED500{message}
NODE_TIMEOUT500The node did not finish within {ms} ms.
EXPRESSION_ERROR500Expression error: {reason}
AGENT_NOT_AVAILABLE500The agent {agentId} does not exist, is archived or has no published version.
DEPTH_LIMIT500The maximum run nesting depth ({limit}) was reached.
CHILD_RUN_FAILED500The agent run failed: {reason}
HTTP_STATUS500The HTTP request answered {status}.
ITEMS_NOT_ARRAY500The map items expression must give an array.
INVALID_TIME500The wait time expression must give an ISO timestamp.
ITEM_FAILED500Item {iteration} failed: {reason}
FILE_REF_INVALID500The {field} expression must give file ids or file objects with an id: {reason}
FILE_NOT_AVAILABLE500The file {fileId} does not exist in this project or has expired.
DOCUMENT_STEP_FAILED500Document processing failed: {reason}

Realtime (HTTP) ​

CodeHTTP statusMessage
AGENT_NOT_REALTIME400The agent {agent} is not a realtime agent.
REALTIME_NOT_CONFIGURED400The agent has no usable realtime settings: {reason}
REALTIME_SESSION_LIMIT429The organization reached its limit of {limit} concurrent realtime sessions.

Models ​

CodeHTTP statusMessage
MODEL_UNAVAILABLE400The model {modelId} is not available.
MODEL_OUTPUT_INVALID502The model did not return output matching the schema.

Tools (runtime) ​

CodeHTTP statusMessage
TOOL_NOT_AVAILABLE400The tool {tool} is not available: {reason}

Tools (configuration) ​

CodeHTTP statusMessage
TOOL_CONFIG_INVALID400The tool configuration is invalid.
TOOL_ARGS_INVALID400The arguments do not match the tool parameters.

HTTP calls ​

CodeHTTP statusMessage
SECRET_MISSING400The project secret {name} does not exist.
HTTP_CALL_FAILED502The HTTP request failed: {reason}
SECRET_ORIGIN_NOT_FIXED400A 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_CHANGED400The request was not sent: it carries secrets and its URL does not point to the fixed origin of its URL template.

Document processing ​

CodeHTTP statusMessage
DOCUMENT_PROCESSING_FAILED422The document could not be read: {reason}
DOC_WORKER_UNAVAILABLE503Document processing is temporarily unavailable.

Webhooks ​

CodeHTTP statusMessage
WEBHOOK_URL_NOT_ALLOWED400The 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.

CodeMessage
TOKEN_INVALIDThe realtime token is invalid.
TOKEN_EXPIREDThe realtime token has expired; create a new session.
TOKEN_USEDThe realtime token was already used; create a new session.
INVALID_EVENTThe message is not a valid realtime client event.
UNSUPPORTEDThis provider does not support {what}.
PROVIDER_ERRORThe model provider failed: {reason}
SESSION_LIMITThe session was ended: {reason}.
INTERNALSomething went wrong.

SDK-only codes ​

Raised by @hevkar/sdk without an HTTP response (see SDK errors).

CodeMeaning
CONNECTION_ERRORnetwork failure
TIMEOUTno response within timeoutMs
ABORTEDthe request was aborted with its signal
STREAM_INTERRUPTEDthe connection dropped before the streamed run ended
STREAM_CONSUMEDa RunStream was iterated twice
WAIT_TIMEOUTruns.waitForCompletion ran out of time
INVALID_SIGNATUREwebhook signature verification failed
CONFIG_MISSINGno API key or base URL configured

Hevkar public API v1