Create batch
/v1/batchesCreate an asynchronous batch job from a previously uploaded JSONL input file (purpose=batch). Token360 validates the file, ensures a single body.model across all lines, pins one provider route, and queues upstream submission.
MVP supports only endpoint=/v1/chat/completions and completion_window=24h.
See Batch Jobs for JSONL format and constraints.
Authentication
Authorization Bearer
Request Body
input_file_idstringrequiredFile ID from POST /v1/files with purpose=batch.
endpointstringMust be /v1/chat/completions (default if omitted).
completion_windowstringMust be 24h (default if omitted).
callback_urlstringOptional HTTPS URL for terminal-state webhook. Overrides account default batch webhook when set.
metadataobjectOptional key/value metadata stored on the batch object.
Response
idstringBatch ID (batch_ prefix).
objectstringbatch
endpointstring/v1/chat/completions
statusstringvalidating, then in_progress, etc.
input_file_idstringInput file ID.
output_file_idstringSet when completed.
error_file_idstringSet when partial failures or errors are written.
completion_windowstring24h
request_countsobjecttotal, completed, failed counts when available.
request_counts.totalintegerTotal number of requests in the batch.
request_counts.completedintegerNumber of completed requests.
request_counts.failedintegerNumber of failed requests.
created_atintegerUnix timestamp.
expires_atintegerUnix timestamp (created + 24h).
metadataobjectEcho of request metadata.
Common errors
batch_multiple_models | More than one distinct body.model in the input file. |
batch_invalid_jsonl | Malformed line or invalid fields. |
batch_model_not_supported | Model has no batch-capable provider route. |
batch_routing_unavailable | No active SKU for the model. |