Overview
This endpoint primarily serves AI Sonar’s OpenAI-compatible Batch API file objects. When the request opts into Anthropic Files compatibility mode, the same route can also return Anthropic-style file metadata for the bound workspace. Without Anthropic headers, this route can return either a batch file object or an AI Sonar image/reference file object.Notes
- Batch input files must use
purpose=batch. completion_windowis currently24h.- Output ordering is not guaranteed; always match by
custom_id. - Streaming is not supported inside batch items.
Example
Request / Response
Use the interactive OpenAPI panel above for the exact schema.Operational Tips
- Use
custom_idfor idempotent downstream reconciliation. - Expect
output_file_idanderror_file_idonly after the worker finalizes the batch. - Batch pricing may differ from synchronous pricing because
isBatchRequest=truediscount rules apply.
Response example
Important fields
string
File identifier used by related APIs.
string
Original or generated file name.
string
File purpose used by the owning workflow, such as
batch, batch_output, user_data, or vision.