Lookio Docs
Lookio websiteOpen Lookio
CLICLI exit codes
CLI

CLI exit codes

The exit codes of the lookio CLI and the API error codes behind each one, so a script can decide between retrying, fixing and stopping.

A script can branch on the exit code without reading a message.

CodeMeaningWhat to do
0Success.Continue.
1A server, network or unexpected failure.Retry later. If it continues, report it.
2Bad usage, or a request that the API refused as not valid.Fix the command. Do not retry it as it is.
3Authentication or permission failure.Sign in again, or ask for a wider scope.
4Not found in this workspace.Stop. The id does not exist here.
5Rate limited.Wait for Retry-After, then retry.
6State conflict.Read the state, then decide.
7Out of credits.Stop and tell a person. Do not retry.

A resource of another workspace gives 4, like one that does not exist.

API errors and exit codes

Exit codeAPI error codes
1internal_error, service_unavailable
2invalid_request, unknown_field, invalid_parameter, invalid_cursor, request_too_large, request_too_large_for_plan, method_not_allowed
3authentication_required, invalid_api_key, api_key_expired, api_key_revoked, insufficient_scope, feature_not_available, admin_required, permission_denied
4resource_not_found
5rate_limited
6conflict, assistant_has_no_resources
7insufficient_credits

insufficient_credits has its own code, 7, because a job without credits must stop and tell a person. A 402 with an unknown code also gives 7.

The CLI uses error.code first. For an unknown code, it uses the HTTP status.

Cancelled confirmations

When you answer “no” to a confirmation, the command exits 0.

Use these docs with your AI tools

An AI agent can read this documentation directly. You do not need an account or an API key. Everything here is public and read-only.

Query these docs via MCP

Recommended

Add this server to Claude, Claude Code, Cursor, Mistral, or any tool that supports MCP. Your agent can then search Lookio Docs documentation and read it in full, instead of answering from memory.

https://lookio.app/docs/mcp
  • searchFind the passages that answer a question.
  • fetchRead one page in full, as Markdown.
  • list_pagesSee every page in this documentation.

Query these docs over HTTP

The same tools also work as plain web requests. Use this for scripts, or for any tool that does not support MCP. There is one endpoint per tool. Arguments go in the query string, and the answer comes back as JSON.

https://lookio.app/docs/api/docs/search?query=custom+domain

Read the OpenAPI description. It is built from the same definitions as the tools, so it always matches what the endpoints do.

Read these docs as Markdown

Add .md to any page URL to get its Markdown source. You can also send the headerAccept: text/markdown to the page URL itself.

To read the whole documentation in one file, open llms-full.txt. For a short index of every page, open llms.txt.