Batch API

Process thousands of requests asynchronously at 50% the cost. Perfect for large-scale data processing, evaluations, and bulk operations.

50%

Cost Savings

1M+

Requests/Batch

24h

Completion Window

99.9%

Success Rate

Why Use Batch API?

๐Ÿ’ฐ

50% Cost Savings

Batch requests are processed at half the cost of synchronous requests. Same quality, half the price.

๐Ÿ“ˆ

Higher Rate Limits

Batch operations have separate, higher rate limits. Process millions of requests without throttling.

โšก

Guaranteed Completion

All batch jobs complete within 24 hours. Automatic retries handle transient failures.

How It Works

1

Create JSONL

Prepare requests as JSONL file

2

Upload File

Upload to Files API

3

Submit Batch

Create batch job

4

Download Results

Retrieve output file

Perfect For

๐Ÿ“Š Data Classification

Categorize millions of documents, support tickets, or product reviews.

๐Ÿงช Model Evaluation

Run large evaluation sets to benchmark model performance.

๐Ÿ“ Content Generation

Generate product descriptions, summaries, or translations at scale.

๐Ÿ” Data Extraction

Extract structured data from unstructured text in bulk.

๐ŸŽฏ Embedding Generation

Create embeddings for millions of documents for vector databases.

๐Ÿ˜Š Sentiment Analysis

Analyze sentiment across large datasets of customer feedback.

๐ŸŒ Translation

Translate content across all your products to 50+ languages.

๐Ÿท๏ธ Tagging & Labeling

Auto-tag products, images, or content for organization.

Simple Integration

Python - Batch Processing
from mythicdot import MythicDot

client = MythicDot()

# 1. Upload your batch file (JSONL format)
batch_file = client.files.create(
    file=open("requests.jsonl", "rb"),
    purpose="batch"
)

# 2. Create the batch job
batch = client.batches.create(
    input_file_id=batch_file.id,
    endpoint="/v1/chat/completions",
    completion_window="24h"
)

print(f"Batch ID: {batch.id}")
print(f"Status: {batch.status}")

# 3. Check status (or poll until complete)
batch = client.batches.retrieve(batch.id)

if batch.status == "completed":
    # 4. Download results
    output = client.files.content(batch.output_file_id)
    with open("results.jsonl", "wb") as f:
        f.write(output.content)

Batch vs Synchronous

Feature Batch API Sync API
Cost 50% OFF Standard pricing
Latency Up to 24 hours Real-time
Max requests Unlimited per batch Rate limited
Best for Bulk processing Interactive apps

Scale Your Processing

Start saving 50% on large-scale AI workloads today.

Read the Docs Get Started Free