dLazy AIdLazy AI
Reference

Error Codes

Stable codes used across CLI failure envelopes and MCP.

All recoverable failures emit the same code whether you're using CLI ({ ok: false, code, message, details? }) or MCP (forwarded to the client as text).

Auth & Account

CodeMeaningResolve
no_api_keyNo key found in --api-key / DLAZY_API_KEY / config / loginRun dlazy login or dlazy auth set <key>
unauthorizedKey is invalid or revokedRe-auth with a fresh key
forbiddenAuthenticated but not allowed (tier / org)Check plan or org membership
insufficient_balanceOrg out of creditsTop up; CLI prints estimate before charging when possible
cli_version_too_lowServer rejected the request because the local CLI is below details.minVersion (HTTP 426)Run details.upgradeCommand (default npm install -g @dlazy/cli@1.2.0) and retry

Input & Validation

CodeMeaningExit
missing_fieldA required field has no value, no --input key, no stdin ref, no default2
invalid_requestSchema validation rejected the payload1
tool_not_foundUnknown cli_name (CLI / MCP)2
bad_refInvalid pipeline reference token2
no_stdinA reference token used (- / @N) but stdin is empty2
input_file_not_found--input @path doesn't resolve to a file2
input_file_bad_json--input JSON is malformed or not an object2

Files & Uploads

CodeMeaning
file_not_foundLocal media flag points to a missing file
file_too_largeFile exceeds 500 MB upload cap
upload_failedObject-storage upload failed; cause in details

Runtime

CodeMeaning
network_errorTransport failure before reaching the API
task_failedProvider rejected or aborted the task; details in details
timeoutAsync polling exceeded --timeout
internal_errorUnexpected CLI error (file a bug)

Branching on Codes

dlazy gpt-image-2 --prompt "..." | jq -e ".ok" >/dev/null \
  || jq -r '.code, .message' < /dev/stderr

On this page