OpenAI Batch API rate limits and how a managed job handles 429
OpenAI limits a batch by size, queued tokens and creation rate. AIVAX Batch admits items one at a time, pauses on a 429 and retries only what failed.
In July 2025 a developer submitted two batches of 50,000 requests each to OpenAI's Batch API for gpt-4.1-mini. One ended with 31,675 requests completed and 18,325 failed, every failure carrying the message "You've exceeded the 1000 request/min rate limit" (forum report). The organization's own limit for that model was 10,000 requests a minute and the completion window was 24 hours, so the message read like a contradiction. A reply in the thread said Batch applies a separate limit of 1,000 requests a minute per batch. I could not find that number in OpenAI's Batch guide, so I treat it as a community explanation, since OpenAI does not document it.
The thread shows what a provider batch does with a rate limit: it accepts the whole file, runs it, and reports the limit afterwards as failed lines. AIVAX Batch is built the other way around. The job decides which item runs next, and a rate limit stops admission and leaves the item pending.
OpenAI limits a batch by size, queued tokens and creation rate
The Batch guide lists three limits. A batch holds up to 50,000 requests in an input file of up to 200 MB, and an embeddings batch is also capped at 50,000 inputs. Each model has a maximum of prompt tokens that can wait in the batch queue, shown on the Platform Settings page of your organization. And you can create up to 2,000 batches an hour. These limits live in a pool separate from the per-model limits, so a batch does not spend your standard requests-per-minute or tokens-per-minute. That separate pool is a large part of the appeal, next to the 50% discount and the 24-hour turnaround.
The input is a JSONL file in which each line names an endpoint (/v1/responses, /v1/chat/completions, /v1/embeddings, /v1/completions or /v1/moderations), and one file can target only one model. A batch that does not finish inside 24 hours expires: the completed responses are available and billed, and every other request lands in the error file as batch_expired (what to do then).
For rate limits this means the work happens before you submit: you keep each batch under the per-batch caps and the model's queued-token limit, and you spread submissions so they stay under the hourly creation limit. Once the batch is accepted, you wait for it to end.
AIVAX Batch admits one item at a time
AIVAX Batch separates a reusable workflow from a job and its items. The workflow holds the instruction, the result schema, the model or an AI gateway, an optional validation instruction, built-in tools and the retry policy. A job is one workload under a workflow, and each item keeps its own state, output, confidence, validation result and cost. Jobs are created paused: you import the items, look at them, and start the job with {"state":"Active"}. Put a stable source identifier in each input so exported rows can be matched to your database, and start with a pilot of a few records that includes the ones you expect to fail.
Every item is a chat-style inference call whose answer must match the schema, so Batch fits one kind of work, structured output per record. It has no /v1/batches endpoint, no embeddings and no JSONL file in OpenAI's format. An embeddings run that fits a 24-hour window belongs on the provider's Batch API.
There is no discount and no completion window. Items are billed at the model's token price like any other inference call (pricing), and a workflow that names a model instead of a gateway is routed to the cheapest provider for that model. I ran a three-item job on @openai/gpt-oss-20b: it went from start to finished in seven seconds and cost $0.0000192 in total, about $0.000006 to $0.000007 per item.
Before an item reaches the model, the worker checks the account's operating balance and counts the item against the plan's daily quota: 500 items a day on Free, 25,000 on Pro, 250,000 on Max, no cap on Ultimate (limits). The quota counts each time an item is picked up for processing within 24 hours. Retries inside one item's flow and its validation call share that single count; an item that goes back to pending after a 429, or that you send back for retry, is counted again when it is next picked up.
The worker holds a 4,096-slot buffer and runs up to four jobs at once with up to 16 items each, per worker process. A job can hold far more items than the buffer because the buffer drains into per-job queues. Scheduling prefers higher plan tiers, then accounts without an active job, then arrival order; none of these figures is a throughput promise.
After a rate-limit pause, switch the model and set the job back to Active
A 429, a retryable provider error or a provider overload leaves the item pending and counts as a transient failure. The third one pauses the job with the event paused_transient_failure_threshold. The count belongs to the job since it was last activated and does not reset when an item succeeds in between. These failures never pass through maxRetries, which covers failures inside one item's flow (default 2, range 0–10), so raising it does nothing for a quota window. Item errors have their own counter: consecutive ExecutionError or ValidationError outcomes pause the job at errorStopThreshold (default 5, range 1–100).
I met the pause by accident while testing with three-item jobs. On @amazon/nova-micro and then on @qwen/qwen3.7-flash the job paused about twelve seconds after it started, with all three items pending and none finished, and a direct chat-completion call to the Qwen model with a comparable response schema returned a 503. A later run on the Qwen model finished without a pause, so the provider failure was intermittent. The state is returned as a one-element array, hence the [0] below; WORKFLOW_ID and JOB_ID are the data.id values from the create responses.
ROOT=https://inference.aivax.net/api/v1/batch/workflows/$WORKFLOW_ID
AUTH="Authorization: Bearer $AIVAX_API_KEY"
curl -s $ROOT/jobs/$JOB_ID -H "$AUTH" \
| jq -c '{state: .data.job.state[0], pending: .data.summary.pending, lastEvent: .data.job.updates[-1].eventType}'
curl -s -X PATCH $ROOT -H "$AUTH" -H "Content-Type: application/json" \
-d '{"modelName":"@openai/gpt-oss-20b"}'
curl -s -X PATCH $ROOT/jobs/$JOB_ID -H "$AUTH" -H "Content-Type: application/json" \
-d '{"state":"Active"}'
The first call reported Paused with three items pending. After the workflow's model was switched and the job set back to Active, all three items finished and the job cost $0.0000198; nothing was imported again.
Two pauses resume by themselves. A background job checks paused jobs every five minutes and reactivates one that paused for an empty balance once the account has funds again, and one that hit the plan's daily item limit (paused_rate_limit) once the limit window has reset. Pauses from provider failures wait for your PATCH, and if the cause is still there the job pauses again after three more failures. Items already in flight keep running after a pause, so with 16 items running a few more can finish after the threshold, which makes the threshold a brake and an imprecise spending cap.
Retry the failed items, export the finished ones, and keep the manifest
The retry endpoint takes one of four modes. execution-error and validation-error select items in those states, errors adds refusals to both, and low-confidence selects finished items whose confidence is below 0.3, a score the model assigns to its own answer and that nobody has calibrated as a probability. Retry resets the selected items to pending and clears their output and validation result, and it starts the job if it was not active, so export the evidence before you call it.
Export streams JSONL with each item's ID, state, confidence, input and output. Filter with state=finished or state=errors, and with confidence=high (0.8 and above) or confidence=low. Pending items are never exported, and an export without pending rows does not prove the job is complete: compare the item counts with your source manifest, and ingest the finished outputs the way you would replay-safe tool calls, so a second delivery does not create a second business operation.
Each item carries its own totalCost in the job view. The Consumed-Credits header does not cover asynchronous work such as Batch, so the item list is where per-record cost lives (see how to get the cost of each LLM API call). A failed attempt still costs the work it did, and the PDF extraction post puts numbers on that for documents.
Pick by endpoint and deadline first
I would use the provider's Batch API when it supports the endpoint I need, a 24-hour wait is acceptable and the 50% discount matters, with a large embeddings run as the clear case. I would use an AIVAX Batch job when each record needs a structured answer that gets validated, when I want to retry the few percent that failed instead of resubmitting a file, and when I want admission to stop the moment a limit appears. The limit you will meet first is usually the daily quota: a 20,000-row list is 40 days of quota on Free and fits inside one day on Pro. The job picks up again on its own each time the window resets, so a large list on a small plan finishes late rather than stalling, but compare your row count with the plan figure before you import. When the work is a handful of independent calls instead of a list of records, such as one long request that would outlive the connection, an async generation queues the call itself and stores its response.
Ran against the live AIVAX API on November 12, 2026: workflow, job, import, pause, workflow edit, resume, export and delete, with every resource named zz-blog-batch and deleted afterwards. Checked against OpenAI's Batch guide and the AIVAX implementation on the same date.