Batch inference for open models at half price
Submit up to 50,000 requests as one JSONL job through an OpenAI-compatible Batch API. 24-hour window, billed at 50% below Sync, with no per-hour GPU rental.
Four calls, start to finish.
The same workflow as the OpenAI Batch API (upload, create, track, download), so existing batch pipelines port over by swapping the base URL.
Upload a JSONL file
Each line is a full OpenAI-compatible request with a custom_id. Up to 50,000 records per job.
Create the batch
POST /v1/batches with your file id, endpoint, and a 24h completion window. Get back a job id and live request_counts.
Track status or get a webhook
Poll the job through validating → in_progress → completed, or let a webhook ping you when it finishes.
Download results
Pull a JSONL of {custom_id, response} plus a separate error file. Failed rows are isolated, so you re-submit just those.
Keep the SDK. Change one line.
The endpoint shape matches OpenAI's: files.create, batches.create, output and error files, so you point your existing client at OpenRelay and run the same job against open models. No proprietary lock-in, no rewrite.
from openai import OpenAI
client = OpenAI(
base_url="https://inference.openrelay.inc/v1",
api_key="or_••••••••", # same SDK, new base URL
)
# 1. upload the JSONL
f = client.files.create(file=open("batch.jsonl", "rb"), purpose="batch")
# 2. create the batch (24h window, 50% off)
batch = client.batches.create(
input_file_id=f.id,
endpoint="/v1/chat/completions",
completion_window="24h",
)
# 3. poll: validating → in_progress → completed
batch = client.batches.retrieve(batch.id)
print(batch.status, batch.request_counts)
# 4. download {custom_id, response} JSONL
results = client.files.content(batch.output_file_id)The models batch runs today.
Each runs through the same OpenAI-compatible batch endpoint at half the Sync rate. Each batch job targets one model.
Gemma 4 31B
openrelay/gemma-4-31b
$0.035 / $0.15
batch input / output per 1M
Vision-grounded chat
DeepSeek-OCR 2
DeepSeek
openrelay/deepseek-ocr-2
$0.0195 / $0.0195
batch input / output per 1M
Document to markdown, OCR, data extraction
BGE-M3
BAAI
openrelay/bge-m3
$0.0065
batch input per 1M
Embeddings at corpus scale
Batch prices are 50% below the Sync per-token catalog rates. Need a model that is not listed? Request it.
Pick the right inference mode.
Sync, Batch, or dedicated GPU VMs and pods: every surface shares one account and one prepaid balance. Batch trades latency for throughput and a 50% discount.
Sync
/v1/chat/completionsStreaming, lowest-latency inference for chat, agents, and RAG. Token-by-token SSE, tool calls, JSON mode.
Interactive, user-facing traffic
Batch
/v1/batchesAsynchronous, on-demand jobs for millions of prompts. JSONL in/out, 24h window, billed at 50% off Sync. Same model, deferred and discounted.
Evals, embeddings, labeling, bulk generation
GPU VMs & Pods
Bring your own imageRent dedicated GPU VMs or pods by the hour for custom runtimes, fine-tuned weights, or your own serving stack. Stop when idle to pay only for disk storage.
Custom inference servers & private models
Batch inference, without the trade-offs.
OpenAI and Claude batch are great if you only need their models. Bedrock and RunPod mean cloud accounts and S3 or per-second GPU workers. OpenRelay gives you open models on a self-serve, OpenAI-compatible batch API.
| Provider | Open models | OpenAI-compatible | Batch 50% off | Self-serve | Pricing |
|---|---|---|---|---|---|
| OpenRelayYou are here | Gemma · DeepSeek-OCR · BGE-M3 | 24h | Per token | ||
| OpenAI Batch API | GPT only | 24h | Per token | ||
| Anthropic / Claude Batch | Claude only | Messages API | 24h | Per token | |
| Bedrock Batch Inference | Select models | AWS + S3 | Per token | ||
| Together Batch | Per token | ||||
| RunPod Serverless | Bring your own | Worker-defined | Per GPU-sec |
Reflects publicly documented capabilities as of June 2026; verify current features with each provider. OpenRelay also lets you rent GPUs directly for fully custom inference.
Recipes for the jobs people actually run.
Each workload page ships a runnable JSONL example, model picks with batch pricing, and the prompt patterns that separate a good run from a re-run.
LLM-as-a-Judge Batch Evaluation API
Run LLM-as-a-judge evaluation over thousands of outputs with one batch job.
Document Classification: Batch LLM API
Classify documents, tickets, and text at scale with an LLM batch API.
Batch OCR API: DeepSeek-OCR at Scale
OCR thousands of PDFs, scans, invoices, and receipts with DeepSeek-OCR 2 through a batch API.
Synthetic Data Generation: Batch LLM API
Generate synthetic training data and distill models with batch LLM jobs: instruction pairs, teacher outputs, augmentations, at 50% off realtime.
AI Document Summarization: Batch API
Summarize thousands of documents, calls, and threads with one batch LLM job.
Sentiment Analysis API for Bulk Text
Run sentiment analysis over reviews, surveys, and tickets in bulk with an LLM batch API.
AI Content Moderation: Batch API
Moderate user content backlogs with LLM batch jobs: policy-specific labels, severity, and rationale as JSON, at 50% off realtime.
Batch Data Extraction API: Structured Output
Extract structured JSON from documents, emails, and free text with batch LLM jobs.
Provider guides
From JSONL to results.
{"custom_id":"row-1","method":"POST","url":"/v1/chat/completions","body":{"model":"openrelay/gemma-4-31b","messages":[{"role":"user","content":"Classify the sentiment of this review"}]}}
{"custom_id":"row-2","method":"POST","url":"/v1/chat/completions","body":{"model":"openrelay/gemma-4-31b","messages":[{"role":"user","content":"Grade this answer 1-5 and explain why"}]}}curl https://inference.openrelay.inc/v1/batches \
-H "Authorization: Bearer or_••••••••" \
-H "Content-Type: application/json" \
-d '{
"input_file_id": "file_abc123",
"endpoint": "/v1/chat/completions",
"completion_window": "24h"
}'Batch inference, answered.
Is OpenRelay an OpenAI Batch API alternative?
Yes. POST /v1/batches uses the same input_file_id, endpoint, and 24h completion_window contract, returning request_counts plus output and error files. Keep the OpenAI SDK and swap only the base URL to https://inference.openrelay.inc/v1.
Which models can run in batch, and can one job mix models?
Gemma 4 31B, DeepSeek-OCR 2, and BGE-M3 run in batch today. Each batch targets a single model: mixing models inside one JSONL file returns model_mismatch, so submit one job per model.
What file format and limits apply per job?
JSONL in, JSONL out. Each input line is {custom_id, method, url, body} and each output line returns {custom_id, response} or an error. Jobs accept up to 50,000 records and 200 MB per input file.
Do I get webhooks, retries, and expiry protection?
Yes. Jobs are idempotent per (batch, custom_id) with exponential-backoff retries, failed rows go to a separate error file so one bad line never fails the job, and you can poll status or receive completion webhooks. Unfinished work past 24h expires unbilled.
Ship your first batch today.
Grab an API key, upload a JSONL file, and run open models at half the realtime cost. No contract, no minimums. Add a card and make a deposit to start.