v4

latestOpenAPI 3.1.0MIT2026-08-04193459793.6 KB
Batches

Create a batch job

Create a new batch job with the given input file and endpoint

post/batches

Request body

endpoint'/v1/chat/completions' | '/v1/audio/transcriptions' | '/v1/audio/translations' required

The endpoint to use for batch processing. Each line of the uploaded input file is dispatched against this endpoint.

  • /v1/chat/completions — chat completion batches
  • /v1/audio/transcriptions — audio transcription batches (e.g. openai/whisper-large-v3)
  • /v1/audio/translations — audio translation batches
input_file_idstring required

ID of the uploaded input file containing batch requests

completion_windowstring

Time window for batch completion (optional)

priorityinteger

Priority for batch processing (optional)

model_idstring

Model to use for processing batch requests

Example request

{
  "endpoint": "/v1/chat/completions",
  "input_file_id": "file-abc123def456ghi789",
  "completion_window": "24h",
  "priority": 1,
  "model_id": "Qwen/Qwen3.5-9B"
}

Response

Job created (potentially with warnings)

warningstring

Example response

{
  "job": {
    "id": "01234567-8901-2345-6789-012345678901",
    "user_id": "user_789xyz012",
    "input_file_id": "file-input123abc456def",
    "file_size_bytes": 1048576,
    "status": "IN_PROGRESS",
    "job_deadline": "2024-01-15T15:30:00Z",
    "created_at": "2024-01-15T14:30:00Z",
    "endpoint": "/v1/chat/completions",
    "progress": 75,
    "model_id": "Qwen/Qwen3.5-9B",
    "output_file_id": "file-output789xyz012ghi",
    "error_file_id": "file-errors456def789jkl",
    "completed_at": "2024-01-15T15:45:30Z"
  }
}