Overview
Accelerate high-volume AI workflows with AI21’s Batch API, designed to support enterprise-scale use cases where traditional real-time APIs fall short. Many enterprises need to process tens of thousands of language model requests quickly and cost-effectively. Use cases like product data enrichment, large-scale content classification, and historical knowledge audits demand a solution that’s purpose-built for asynchronous, high-throughput jobs. AI21’s Batch API helps deliver rapid results at scale without the need for complex infrastructure or custom scripting.How it Works
Instead of sending each request individually through a synchronous API, the Batch API allows you to submit a.jsonl
file containing thousands of inputs in a single job. The requests are processed asynchronously, and the results are returned in a downloadable output file.
Workflow
- Prepare your
.jsonl
input file Each line in the file represents a single prompt or input payload. - Submit the batch request Use a simple HTTP request to submit the file along with your desired endpoint.
- Monitor and manage jobs Query the status and progress of your batch jobs and retrieve results. The result file is available once the batch is finished.
- Download results When the batch completes, download your results directly.
Key Advantages of AI21’s Batch API
- Enterprise-scale throughput Submit and process thousands of requests in a single job.
- Simple integration Connect easily to your existing AI workflows via AI21’s SaaS infrastructure.
- Battle-tested in production Built in partnership with our customers, where it has cut processing time for large classification jobs from several hours to under one hour.