Skip to main content
Use the Anthropic SDK to call Lume through the Messages format. Change the base URL, API key, and model, then check your tools, media, and optional settings against the supported features below. You keep the Messages conversation format and top-level system instruction for supported requests. This guide covers Messages at POST /v1/messages. It does not enable every Claude platform feature. Code execution, arbitrary MCP tools, named toolsets, and programmatic tool callers are not supported.

Before you start

Create an API key in the dashboard with messages:create. If the key has a model allowlist, include lume-3.5. Keep the key on your server and set it in your shell:
Use one authentication header per request: Authorization: Bearer or x-api-key. Sending both with values returns HTTP 401. The SDK examples configure authentication for you. Install the SDKs for the examples you use:
Run Python examples from a .py file. Save Node.js examples as .mjs files for import and top-level await.

Send a request with your existing SDK

Set the Anthropic SDK base URL to https://api.overcontrolgroup.com, without /v1. The SDK adds /v1/messages. Pass your OverControl key directly to the client and choose a current Lume model.
Answer text is in the content text blocks. Do not assume content[0] is text: tool-enabled requests can return tool calls or results first. Token usage is in usage.input_tokens and usage.output_tokens, with separate cache creation/read counts when present. Responses include X-Request-Id and request-id. Errors also include that identifier as request_id. The error body uses type: "error", error.type, and error.message; there is no Chat-style error.code.

Headers and version hints

anthropic-version is optional. If present, it must be one valid calendar date in YYYY-MM-DD form, such as 2023-06-01 or 2026-10-21. Empty, malformed, impossible dates, and repeated version headers return HTTP 400. The header is a compatibility hint. It does not select a separate Lume feature set or enable a feature that OverControl does not support. SDKs send their own version header; do not force every client to one date to use this endpoint. Depending on SDK version, your key can be sent as x-api-key or Authorization: Bearer. Both are accepted individually. Remove old custom authentication overrides that would cause your client to send both headers. Beta hints do not by themselves enable unsupported request fields.

Choose a current model and output budget

Messages requires a positive integer max_tokens. A value above the model maximum is reduced to that maximum. The budget is reduced further to fit estimated remaining context space. Input that leaves no room for output returns HTTP 400. Lume 3 and Lume 3 Max are retired; use current IDs and update any key allowlist. stop_reason: "max_tokens" means the reply may be incomplete. tool_use means your application needs to execute a client function and return the result. A normal text answer ends with end_turn; configured stop sequences can produce stop_sequence.

Check the features your application uses

thinking.type: "enabled" requires an integer budget_tokens of at least 1,024 and less than the output budget after the model maximum is applied. The value is a compatibility setting, not a separately enforced reasoning-token budget. adaptive selects high effort; disabled selects none unless explicit output effort overrides it. For JSON, output_config.format takes a schema object without a separate format name or strict field. Strict function tools are distinct: their strict boolean applies to function arguments. Structured outputs and Function calling include complete examples of both features.

Use server-side web tools

Lume 3.5, Lume 3.5 Max, and Lume Omni support web search and web fetch through Messages. Your custom functions still execute in your application; OverControl executes these web tools within the request. To require search, add these fields to the Messages request above:
Fetch uses {"type":"web_fetch","max_uses":1} and a named web_fetch choice. Include the URL explicitly in user text or use an accepted server-side search result. Dated search/fetch type names are accepted for compatibility, but only the documented Lume options apply. They do not enable code execution or arbitrary hosted tools. Messages can return server_tool_use, web_search_tool_result, and web_fetch_tool_result blocks, plus answer text and citations. Inspect tool results for errors inside HTTP 200 responses. Preserve the full returned assistant content, including opaque source fields, on follow-up requests. Server-tool history is account-bound and has a seven-day replay lifetime; expired or invalid history is rejected. Web workflows can send SSE comment keepalives while work completes, then emit result events. They do not provide live token-by-token progress during that work. Successful operation counts are in usage.server_tool_use.web_search_requests and web_fetch_requests. Token work and successful tool operations both consume allowance; Pricing covers rates.

Files, usage, and migration errors

Files uploaded to another service are not automatically available in OverControl. Upload PDFs through the OverControl /v1/files API with purpose: "user_data", then pass an OverControl ID in a Messages document source: {"type":"file","file_id":"..."}. Upload needs files:write, inference by file ID needs files:read, and deletion needs files:delete, in addition to messages:create. Ordinary PDF document citations are not currently supported. Chat with files includes the full upload/use/delete workflow. Inference shares your account allowance with Chat Completions and OverControl Chat. It reserves estimated usage before running and releases unused reserved usage afterward. An existing Anthropic billing account or credit balance is not used by OverControl. Once a stream has started, failures use an in-stream error instead of a new HTTP status. Keep the request ID when reporting failures. Test a basic text request first, then check representative tool histories, structured output, media, and error handling used by your application.

Next

Function calling

Complete a Messages function-call round trip.

Structured outputs

Return and validate JSON through Messages.

Web search

Handle native server-tool results and source citations.

Chat with files

Ask Lume Omni about an uploaded or inline PDF.