API reference · Schema
CreateBatchRequest
input_file_idstringrequiredA file uploaded with purpose `batch`
ID with prefix file_
endpointstringrequiredThe route every request goes to: /v1/chat/completions, /v1/completions, /v1/embeddings, /v1/responses
up to 64 characters
completion_windowstringrequiredTime allowed to run every request: 24h
up to 16 characters
metadataobject | nullUp to 16 string pairs (keys ≤ 64, values ≤ 512 characters)
output_expires_afterobjectHow long the output and error files are kept after they are written (3600–2592000 s; default 2592000 s)
ShowHide 2 fields of
output_expires_afteranchorstringrequiredMust be `created_at`: the time counts from when each result file is created
up to 32 characters
secondsintegerrequiredSeconds the result files are kept before they are deleted
Example
{
"input_file_id": "file_01jz8x3y4z5a6b7c8d9e0f1g2h",
"endpoint": "/v1/chat/completions",
"completion_window": "24h"
}