Batch API

Batch API: the same models for less

−25%

Send up to 50,000 requests in one job with the OpenAI or Anthropic SDK you already use. Results arrive within 24 hours, billed at batch rates up to 25% below real-time.

Lower price per token

Batch rates are below real-time rates on every model that offers them; the exact price for each model is in the table below.

Drop-in for OpenAI and Anthropic

OpenAI Files + Batches and Anthropic Message Batches, request for request. Change the base URL and your existing batch code runs unchanged.

One key, many model families

GPT, Claude and open models such as DeepSeek, Llama and Qwen, with one balance and one invoice trail.

Pay for what succeeds

The worst case is reserved when you submit; when the batch ends you pay only for requests that completed, and the rest of the reservation returns to your balance.

No pressure on your rate limit

A batch of 50,000 requests counts as one API call against your key's requests-per-minute limit.

Results kept for you

Poll the job, then download results as JSONL through the same API, with each line matched to your custom_id.

Batch prices

ModelReal-time in / outBatch in / outYou save
claude-fable-5$12.00 / $60.00$9.00 / $45.00−25%
claude-opus-5-5$4.80 / $24.00$3.60 / $18.00−25%
claude-sonnet-5-5$2.40 / $12.00$1.80 / $9.00−25%
deepseek-v4-flash-0731$0.072 / $0.216$0.054 / $0.162−25%
deepseek-v4-flash-vision-exp$0.528 / $1.584$0.396 / $1.188−25%
glm-5.3$1.08 / $4.80$0.81 / $3.60−25%
llama-guard-4-12b$0.216 / $0.216$0.162 / $0.162−25%
mimo-v2.6-pro$0.516 / $1.044$0.387 / $0.783−25%
nvidia-nemotron-3-ultra-550b-a55b$0.60 / $2.64$0.45 / $1.98−25%
qwen3.8-flash$0.1356 / $0.4584$0.1017 / $0.3438−25%
seed-1.8$0.30 / $2.40$0.225 / $1.80−25%
seed-2.0-code$0.60 / $3.60$0.45 / $2.70−25%
seed-2.0-pro$0.60 / $3.60$0.45 / $2.70−25%
deepseek-v4-pro-0813$1.56 / $3.12$1.17 / $2.34−24%
deepseek-v4.1-flash$0.24 / $0.72$0.18 / $0.54−24%
deepseek-v4.1-flash-1017$0.24 / $0.72$0.18 / $0.54−24%
gemini-3.5-flash$1.80 / $10.80$1.35 / $8.10−24%
gemini-3.7-flash$0.90 / $4.50$0.675 / $3.375−24%
glm-5.3-flash$0.18 / $0.60$0.135 / $0.45−24%
gpt-oss-120b-ultra$0.24 / $1.14$0.18 / $0.855−24%
llama-3.3-70b-instruct$0.12 / $0.384$0.09 / $0.288−24%
llama-4-scout-17b-16e-instruct$0.12 / $0.36$0.09 / $0.27−24%
meta-llama-3.1-70b-instruct$0.48 / $0.48$0.36 / $0.36−24%
meta-llama-3.1-8b-instruct$0.024 / $0.048$0.018 / $0.036−24%
mimo-v2.6-flash$0.168 / $0.336$0.126 / $0.252−24%
muse-glimmer-30b$0.36 / $1.44$0.27 / $1.08−24%
nvidia-nemotron-3-super-120b-a12b$0.102 / $0.48$0.0765 / $0.36−24%
qwen3.8-27b$0.24 / $3.00$0.18 / $2.25−24%

USD per 1M tokens.

How it works

  1. Write one request per line (JSONL), or build a list of requests in code.
  2. Create the batch. We reserve its worst-case cost from your balance.
  3. Poll its status; most batches finish well within the 24-hour window.
  4. Download the results. You're charged for completed requests at batch rates.

Batch quick start

from openai import OpenAI
import json

client = OpenAI(base_url="https://mytenon.com/v1", api_key="sk-tx-...")

# requests.jsonl: one request per line
with open("requests.jsonl", "w") as f:
    for i, text in enumerate(["first document", "second document"]):
        f.write(json.dumps({
            "custom_id": f"doc-{i}",
            "method": "POST",
            "url": "/v1/chat/completions",
            "body": {"model": "gpt-oss-120b-ultra",
                     "messages": [{"role": "user", "content": f"Summarise: {text}"}]},
        }) + "\n")

file = client.files.create(file=open("requests.jsonl", "rb"), purpose="batch")
batch = client.batches.create(input_file_id=file.id,
                              endpoint="/v1/chat/completions",
                              completion_window="24h")

# later
batch = client.batches.retrieve(batch.id)
if batch.status == "completed":
    print(client.files.content(batch.output_file_id).text)

Good fits

Model evaluationsData labelling and classificationDocument summarisationTranslation at scaleEmbedding backfillsSynthetic data generation

Limits

Up to 50,000 requests per batch and 4.5 MB per upload; one model per OpenAI-format batch; results within 24 hours. Streaming isn't available in batches.

Questions

Is a batch slower?

Yes, by design: results arrive asynchronously within 24 hours instead of in seconds. Use real-time requests for anything a user is waiting on.

What if some requests fail?

Failed requests aren't charged. They appear in the error file (OpenAI format) or as errored results (Anthropic format) with the reason.

Can I cancel?

Yes. Requests that already completed are billed; the rest of the reservation is returned.

Run it as a batch and pay up to 25% less

Create a free account