Overview
This endpoint is part of LemonData’s OpenAI-compatible Batch API. Batch jobs use uploaded JSONL files, run asynchronously, and can return output/error files later.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.
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.
Anthropic Files API Mode
This same/v1/files route also supports the Anthropic Files API path.
- Add
anthropic-beta: files-api-2025-04-14to switch the route into Anthropic mode. - In Anthropic mode, upload the original file directly and do not send
purpose=batch. - The returned
file_idis bound to the same official Anthropic channel/workspace and should be reused from/v1/messagesrequests. - If you plan to reference the uploaded file from Anthropic message content, keep using Anthropic-native headers (
x-api-key,anthropic-version, and the beta header when required).