AI Gateway
post/ai/v1/batches

Request

  • Base URL: /api (relative, and the document was published on a file host, not at the API’s origin)
  • URL: /api/ai/v1/batches
  • Auth: HTTP bearer

Request body

completion_windowstring required

Currently only 24h.

endpointstring required

Endpoint every request in the input file targets: /v1/responses, /v1/chat/completions or /v1/embeddings.

input_file_idstring required

A file uploaded through POST /ai/v1/files by the same caller.

metadataobject nullable

Response

Batch created

completion_windowstring
created_atinteger
endpointstring
error_file_idstring nullable

Results of the failed requests.

idstring required
input_file_idstring
modelstring nullable
objectstring required

Always batch

output_file_idstring nullable

Results of the successful requests; download with GET /ai/v1/files/{file_id}/content.

statusstring required

validating, in_progress, finalizing, completed, failed, expired, cancelling or cancelled

Changes