Responses API
/v1/responsesUse Responses for reasoning models, multimodal inputs and Lazu file_id dereferencing. This is the recommended endpoint when a request needs uploaded files or newer OpenAI response features.
When to use it
Use Responses
Uploaded files, reasoning controls, document workflows, and multimodal inputs that should be normalized server-side.
Use Chat completions
Simple chat, SDK compatibility, tool calling, and existing apps already
built around /v1/chat/completions.
Request body
modelstringModel ID from /api/models/catalog. Prefer models where
supported_endpoint_types includes responses.
inputstring | object[]Text input or an array of response input messages.
instructionsstringSystem-level instructions for the response.
reasoningobjectReasoning effort controls for supported models, for example
{"effort":"medium"}.
toolsobject[]Tool definitions using the OpenAI-compatible Responses shape.
streambooleanStreams response events when supported by the selected model.
max_output_tokensintegerUpper bound for generated output tokens.
Content parts
input_textcontent partText content sent to the model.
input_imagecontent partImage content. Lazu can dereference uploaded file_id values
with purpose vision.
input_filecontent partUploaded file reference. Lazu dereferences file content server-side before forwarding the request upstream.
File dereferencing
Upload via Files, then reference the resulting
file_id. Lazu adds X-Lazu-File-Dereference: 1 when the
request dereferenced files.
Limits:
- Single file purpose limit still applies.
- Total dereferenced files in one Responses call must stay under 64 MB.
- Chat completions does not auto-dereference
file_id.
Response
idstringResponse ID.
outputobject[]Output messages, reasoning items, tool calls, or other response events.
usage.input_tokensintegerInput token count when the upstream reports usage.
usage.output_tokensintegerOutput token count when the upstream reports usage.
usage.input_tokens_details.cached_tokensintegerCache read tokens for providers that expose response-level cache usage.
For full reconciliation, use
GET /api/usage/requests/{request_id} with the same API key.