openai · OpenAI Platform Docs
Batch API | OpenAI API
Teaches how to use the Batch API to send large volumes of requests asynchronously for lower costs and higher throughput.
Derived skill
Files assembled from official documentation
Viewing SKILL.md
Batch API | OpenAI API
Teaches how to use the Batch API to send large volumes of requests asynchronously for lower costs and higher throughput.
When To Use
Use when you need to process large sets of model requests asynchronously at a reduced cost and do not require immediate real-time responses.
Reference Files
| File | Contains | Use For |
|---|---|---|
SKILL.md | Entry point: scope, routing table, and workflow. | Start here. |
docs/batch-api-openai-workflow-guide.md | A guide explaining how to use the OpenAI Batch API to send asynchronous groups of requests for lower costs and higher rate limits. | Questions about a guide explaining how to use the OpenAI Batch API to send asynchronous groups of requests for lower costs and higher... |
examples/batch-api-openai-openai-batch-api-jsonl-request-format.text | A JSONL formatted file containing multiple batch request objects with custom IDs, HTTP methods, URLs, and chat completion bodies. | Exact payloads, commands, or snippets shown in A JSONL formatted file containing multiple batch request objects with custom IDs, HTTP methods, URLs, and chat comple... |
examples/batch-api-openai-openai-batch-api-request-jsonl-format.text | A JSONL formatted file containing batch request objects with custom IDs, methods, URLs, and request bodies for the OpenAI Batch API. | Exact payloads, commands, or snippets shown in A JSONL formatted file containing batch request objects with custom IDs, methods, URLs, and request bodies for the Op... |
examples/batch-api-openai-openai-batch-api-request-jsonl-format-2.text | A JSONL formatted file containing multiple batch request objects including custom IDs, methods, URLs, and request bodies for the OpenAI Batch API. | Exact payloads, commands, or snippets shown in A JSONL formatted file containing multiple batch request objects including custom IDs, methods, URLs, and request bod... |
examples/batch-api-openai-openai-batch-api-nodejs-upload.text | A Node.js code snippet demonstrating how to upload a JSONL file to the OpenAI Batch API using the OpenAI client library. | Exact payloads, commands, or snippets shown in A Node.js code snippet demonstrating how to upload a JSONL file to the OpenAI Batch API using the OpenAI client library. |
examples/batch-api-openai-openai-batch-api-python-upload.text | A Python script demonstrating how to use the OpenAI client to upload a JSONL file for batch processing. | Exact payloads, commands, or snippets shown in A Python script demonstrating how to use the OpenAI client to upload a JSONL file for batch processing. |
examples/batch-api-openai-openai-batch-api-upload-curl.text | A curl command demonstrating how to upload a JSONL file for batch processing using the OpenAI Files API. | Exact payloads, commands, or snippets shown in A curl command demonstrating how to upload a JSONL file for batch processing using the OpenAI Files API. |
examples/batch-api-openai-openai-batch-api-jsonl-input-format.text | A sample JSONL file containing structured requests formatted for the OpenAI Batch API. | Exact payloads, commands, or snippets shown in A sample JSONL file containing structured requests formatted for the OpenAI Batch API. |
examples/batch-api-openai-openai-batch-api-nodejs-create-batch-request.text | A Node.js code example demonstrating how to create a new batch job using the OpenAI SDK by specifying an input file ID and an endpoint. | Exact payloads, commands, or snippets shown in A Node.js code example demonstrating how to create a new batch job using the OpenAI SDK by specifying an input file I... |
examples/batch-api-openai-openai-batch-api-python-create-batch-request.text | A Python code example demonstrating how to use the OpenAI client to create a new batch job using a file ID and the chat completions endpoint. | Exact payloads, commands, or snippets shown in A Python code example demonstrating how to use the OpenAI client to create a new batch job using a file ID and the ch... |
examples/batch-api-openai-openai-batch-api-create-batch-curl.text | A curl command demonstrating how to create a new batch job using the OpenAI Batch API endpoint. | Exact payloads, commands, or snippets shown in A curl command demonstrating how to create a new batch job using the OpenAI Batch API endpoint. |
examples/batch-api-openai-openai-batch-api-create-batch-request.text | A text example demonstrating the command to create a new batch request using the OpenAI Batch API. | Exact payloads, commands, or snippets shown in A text example demonstrating the command to create a new batch request using the OpenAI Batch API. |
examples/batch-api-openai-openai-batch-api-response-object.text | A text representation of an OpenAI Batch API response object containing batch status, endpoint, and file IDs. | Exact payloads, commands, or snippets shown in A text representation of an OpenAI Batch API response object containing batch status, endpoint, and file IDs. |
examples/batch-api-openai-openai-batch-api-retrieve-nodejs.text | A Node.js code snippet demonstrating how to retrieve the status of an existing batch job using the OpenAI client library. | Exact payloads, commands, or snippets shown in A Node.js code snippet demonstrating how to retrieve the status of an existing batch job using the OpenAI client libr... |
examples/batch-api-openai-openai-batch-api-python-retrieve-batch.text | A Python code snippet demonstrating how to use the OpenAI client to retrieve the status of an existing batch job. | Exact payloads, commands, or snippets shown in A Python code snippet demonstrating how to use the OpenAI client to retrieve the status of an existing batch job. |
examples/batch-api-openai-openai-batch-api-retrieve-batch-status-curl.text | A curl command demonstrating how to retrieve the status of a specific batch using the OpenAI Batch API. | Exact payloads, commands, or snippets shown in A curl command demonstrating how to retrieve the status of a specific batch using the OpenAI Batch API. |
examples/batch-api-openai-openai-batch-api-retrieve-batch-command.text | A text example demonstrating the CLI command to retrieve a specific batch using a batch ID. | Exact payloads, commands, or snippets shown in A text example demonstrating the CLI command to retrieve a specific batch using a batch ID. |
examples/batch-api-openai-openai-batch-api-nodejs-retrieval.text | A Node.js code snippet demonstrating how to retrieve and log the text content of a file using the OpenAI client. | Exact payloads, commands, or snippets shown in A Node.js code snippet demonstrating how to retrieve and log the text content of a file using the OpenAI client. |
examples/batch-api-openai-openai-batch-api-python-retrieve.text | A Python code snippet demonstrating how to use the OpenAI client to retrieve and print the text content of a file via the Batch API. | Exact payloads, commands, or snippets shown in A Python code snippet demonstrating how to use the OpenAI client to retrieve and print the text content of a file via... |
examples/batch-api-openai-openai-batch-api-retrieval-curl.text | A curl command demonstrating how to retrieve the content of a completed batch job file using the OpenAI API. | Exact payloads, commands, or snippets shown in A curl command demonstrating how to retrieve the content of a completed batch job file using the OpenAI API. |
examples/batch-api-openai-openai-batch-api-jsonl-input-format-2.text | A text file demonstrating the JSONL structure required for inputting requests into the OpenAI Batch API. | Exact payloads, commands, or snippets shown in A text file demonstrating the JSONL structure required for inputting requests into the OpenAI Batch API. |
examples/batch-api-openai-openai-batch-api-response-format.text | A JSON object representing the structure of a completed batch API response containing a chat completion result. | Exact payloads, commands, or snippets shown in A JSON object representing the structure of a completed batch API response containing a chat completion result. |
examples/batch-api-openai-openai-batch-api-cancel-request-javascript.text | A JavaScript code snippet demonstrating how to cancel an existing batch job using the OpenAI Batch API. | Exact payloads, commands, or snippets shown in A JavaScript code snippet demonstrating how to cancel an existing batch job using the OpenAI Batch API. |
examples/batch-api-openai-openai-batch-api-cancel-python.text | A Python code snippet demonstrating how to cancel an existing batch job using the OpenAI client. | Exact payloads, commands, or snippets shown in A Python code snippet demonstrating how to cancel an existing batch job using the OpenAI client. |
examples/batch-api-openai-openai-batch-api-cancel-request-curl.text | A curl command demonstrating how to cancel an existing batch job using the OpenAI Batch API. | Exact payloads, commands, or snippets shown in A curl command demonstrating how to cancel an existing batch job using the OpenAI Batch API. |
examples/batch-api-openai-openai-batch-api-cancel-command.text | A text example demonstrating the command to cancel an existing OpenAI Batch API job using a batch ID. | Exact payloads, commands, or snippets shown in A text example demonstrating the command to cancel an existing OpenAI Batch API job using a batch ID. |
examples/batch-api-openai-openai-batch-api-list-batches-nodejs.text | A Node.js code example demonstrating how to list existing batches using the OpenAI client library. | Exact payloads, commands, or snippets shown in A Node.js code example demonstrating how to list existing batches using the OpenAI client library. |
examples/batch-api-openai-openai-batch-api-python-list-batches.text | A Python code snippet using the OpenAI client to list batch jobs with a specified limit. | Exact payloads, commands, or snippets shown in A Python code snippet using the OpenAI client to list batch jobs with a specified limit. |
examples/batch-api-openai-openai-batch-api-list-batches-curl.text | A curl command demonstrating how to list batches using the OpenAI Batch API. | Exact payloads, commands, or snippets shown in A curl command demonstrating how to list batches using the OpenAI Batch API. |
examples/batch-api-openai-openai-batch-api-list-batches-cli.text | A CLI command example demonstrating how to list batches using the OpenAI Batch API with a limit parameter. | Exact payloads, commands, or snippets shown in A CLI command example demonstrating how to list batches using the OpenAI Batch API with a limit parameter. |
examples/batch-api-openai-openai-batch-api-expired-request-response.text | A JSON-formatted text example showing an error response from the OpenAI Batch API when a request expires before completion. | Exact payloads, commands, or snippets shown in A JSON-formatted text example showing an error response from the OpenAI Batch API when a request expires before compl... |
What This Skill Covers
- Learn how to use OpenAI’s Batch API to send asynchronous groups of requests with 50% lower costs, a separate pool of significantly higher rate limits, and a...
- Main sections:
Overview,Getting started,1. Prepare your batch file,Moderations input examples,2. Upload your batch input file.
Workflow
- Open the most relevant file under
docs/for the exact documented workflow and wording. - Open
schemas/files for exact structured contracts. - Open
examples/files for concrete requests, commands, snippets, and manifests. - Do not add behavior or configuration that is not present in the attached source files.
Canonical source: https://developers.openai.com/api/docs/guides/batch
