Create a batch

Create a new batch processing job from an uploaded JSONL file.

Headers

AuthorizationstringRequired

Bearer token. Use Bearer YOUR_API_KEY.

Request

This endpoint expects an object.
input_file_idstringRequired
ID of the uploaded JSONL file. Get from Upload file endpoint.
endpointenumRequired
API endpoint for batch requests.
Allowed values:
completion_windowenumRequired
Processing time frame.
Allowed values:
metadataobjectOptional

Custom key-value pairs for tracking.

customer_identifierstringOptional
End user identifier.
custom_identifierstringOptional
Custom identifier for fast querying.
thread_identifierstringOptional
Conversation thread ID.
environmentstringOptional
Environment tag.

Response

Created batch.
idstring
Batch ID.
statusenum
Batch status.
input_file_idstring
output_file_idstring or null

Output file ID (available when completed).

error_file_idstring or null

Error file ID (if errors occurred).

endpointstring
completion_windowstring
created_atinteger
completed_atinteger or null
request_countsobject
metadataobject

Errors

401
Unauthorized Error