Batch Processing
Supported Models
/v1/chat/completions
/v1/embeddings
Preparing Your Batch File
{"custom_id": "request-1", "method": "POST", "url": "/v1/chat/completions", "body": {"model": "gpt-3.5-turbo-0125", "messages": [{"role": "system", "content": "You are a helpful assistant."},{"role": "user", "content": "Hello world!"}],"max_tokens": 1000}}
{"custom_id": "request-2", "method": "POST", "url": "/v1/chat/completions", "body": {"model": "gpt-3.5-turbo-0125", "messages": [{"role": "system", "content": "You are an unhelpful assistant."},{"role": "user", "content": "Hello world!"}],"max_tokens": 1000}}Uploading Your Batch File
Creating the Batch
Curl Example
Python Example
Example response
Checking the Status of a Batch
Curl Example
Python Example
Retrieving the Results
Canceling the Batch
Curl Example
Python Example
Getting a List of All Batches
Curl Example
Python Example
Last updated