Create a batch

Create an OpenAI-compatible batch processing job from an uploaded JSONL file.

Headers

AuthorizationstringRequired

Bearer token. Use Bearer YOUR_API_KEY for API key auth.

X-Data-Respan-ParamsstringOptional

Base64-encoded JSON object of Respan request parameters. Legacy X-Data-Keywordsai-Params is still accepted.

Request

This endpoint expects an object.
input_file_idstringRequired
Uploaded JSONL file ID.
endpointenumRequired
Endpoint each JSONL request targets.
Allowed values:
completion_windowenumRequired
Allowed values:
metadatamap from strings to anyOptional
Custom metadata for tracking.
customer_identifierstringOptional

End-user identifier for logging.

custom_identifierstringOptional
Custom identifier for querying.
thread_identifierstringOptional
Conversation thread identifier.
environmentstringOptional
Environment tag.

Response

Created batch.
idstring
Batch ID.
statusenum
objectstring
endpointstring
input_file_idstring
output_file_idstring or null
Output file ID, available when the batch completes.
error_file_idstring or null
Error file ID, when provider errors are available.
completion_windowstring
created_atinteger
Unix timestamp.
in_progress_atinteger or null
expires_atinteger or null
finalizing_atinteger or null
completed_atinteger or null
failed_atinteger or null
expired_atinteger or null
cancelling_atinteger or null
cancelled_atinteger or null
request_countsobject
metadatamap from strings to any
errorsany or null
Provider error details, when available.

Errors

400
Bad Request Error
401
Unauthorized Error