Skip to main content
POST
/
v1
/
batches
Create Batch
curl --request POST \
  --url http://localhost:8080/v1/batches \
  --header 'Content-Type: application/json' \
  --data '
{
  "provider": "<string>",
  "model": "<string>",
  "input_file_id": "<string>",
  "requests": [
    {
      "custom_id": "<string>",
      "method": "<string>",
      "url": "<string>",
      "body": {}
    }
  ],
  "endpoint": "/v1/chat/completions",
  "completion_window": "24h",
  "metadata": {}
}
'
{
  "id": "<string>",
  "object": "<string>",
  "endpoint": "<string>",
  "input_file_id": "<string>",
  "completion_window": "<string>",
  "status": "validating",
  "request_counts": {
    "total": 123,
    "completed": 123,
    "failed": 123
  },
  "created_at": 123,
  "expires_at": 123,
  "extra_fields": "<unknown>"
}

Body

application/json
provider
string
required

The model provider (e.g., openai, anthropic, azure, bedrock, gemini)

model
string

Model identifier for batch routing

input_file_id
string

ID of the uploaded JSONL file containing batch requests (OpenAI/Azure style)

requests
object[]

Array of inline request items (Anthropic style)

endpoint
enum<string>

Target endpoint for batch requests

Available options:
/v1/chat/completions,
/v1/embeddings,
/v1/completions,
/v1/messages
completion_window
string
default:24h

Time window for completion (e.g., 24h)

metadata
object

User-provided metadata

Response

200 - application/json

Batch created successfully

id
string

Unique batch ID

object
string

Object type (batch)

endpoint
string

Target endpoint

input_file_id
string

Input file ID

completion_window
string

Completion window

status
enum<string>

Batch status

Available options:
validating,
failed,
in_progress,
finalizing,
completed,
expired,
cancelling,
cancelled
request_counts
object
created_at
integer

Unix timestamp of creation

expires_at
integer

Unix timestamp of expiration

extra_fields
any