Groq Batch API Guide: Asynchronous JSONL Workloads and Result Retrieval
Answer in brief
Groq Batch API enables developers to execute high-volume inference asynchronously by uploading JSONL batch request files with a 50% cost discount compared to synchronous endpoints. The service isolates batch jobs from standard API rate limits while allowing a configurable processing window between 24 hours and 7 days.
Key facts at a glance
| Product / model | Current ID or version | Use case | Evidence |
|---|---|---|---|
| groq | No product-specific selectable model ID has been verified for this entry. | Confirm the current product surface | Official source Official source |
Failure modes and verification
| Failure mode | Verification action |
|---|---|
| Stale model or version reference | Compare the model name and ID with the official source before release. |
| Unstructured or incomplete output | Validate the response against the documented contract and a deterministic fixture. |
| Unverified factual claim | Keep the claim qualified or remove the claim when the official source does not support it. |
FAQ
What is the primary cost benefit of utilizing the Groq Batch API?
Workloads executed through Groq Batch API receive a 50% price discount compared to standard synchronous endpoints, as documented on the official Groq Batch Documentation.
How does batch processing affect an organization’s synchronous rate limits?
Batch processing runs asynchronously and has zero impact on your standard synchronous API rate limits, permitting large-scale execution without blocking interactive production traffic.
Does the 50% batch discount stack with prompt caching discounts?
No, the batch discount does not stack with prompt caching discounts. All batch tokens are billed strictly at the 50% batch rate regardless of cache status.
What is the configurable time window for processing a batch job?
Groq allows developers to set a completion window ranging from 24 hours to 7 days, with longer windows recommended to avoid job expiration during high demand.
Which endpoints are supported inside the batch JSONL request file?
The JSONL batch file currently supports /v1/chat/completions, /v1/audio/transcriptions, and /v1/audio/translations via HTTP POST, detailed in the Groq API Reference.
Sources and freshness
- Official source
- Official source
- Last verified: 2026-09-05
Extended guide
Overview of the Groq Batch API
Groq Batch API provides an asynchronous processing framework designed for large-scale workloads that do not require real-time execution, such as bulk dataset enrichment, offline evaluations, and batch media processing. Workloads submitted through the Batch API receive a 50% cost discount compared to standard synchronous endpoints and operate independently without consuming standard API rate limits. Official documentation details the entire lifecycle at Groq Batch Documentation and Groq API Reference.
No product-specific selectable model ID has been verified for this entry. Documented model IDs in official guides serve as non-exhaustive examples rather than fixed defaults or universal requirements.
Batch File Format and Supported Endpoints
Every batch submission requires a JSON Lines (JSONL) file where each individual line represents a standalone HTTP POST request. Every JSON record must include four core keys:
custom_id: A unique string identifier supplied by the client to correlate responses with requests.method: The HTTP verb for the operation, strictly set toPOST.url: The target API endpoint, supporting/v1/chat/completions,/v1/audio/transcriptions, or/v1/audio/translations.body: A JSON payload identical in structure to the corresponding synchronous API request parameters.
Asynchronous Batch Lifecycle and Operational Steps
Executing workloads through Groq Batch API follows a structured sequence from preparation to retrieval:
- Prepare JSONL Request File: Assemble query payloads into a single JSONL file, ensuring each line specifies a unique
custom_id,POSTmethod, and valid endpoint URL. - Upload File: Upload the formatted JSONL file using the Groq Files API endpoints.
- Create Batch Job: Submit the batch request by referencing the uploaded file ID and defining a completion window between 24 hours and 7 days.
- Poll Processing Status: Query batch status using retrieve batch endpoints to inspect execution progression, queued state, or terminal states.
- Retrieve Output: Once the job reaches completed status, download output files containing results mapped to each
custom_id.
Documented Batch Model Examples
The following table outlines model examples documented across Groq asynchronous endpoints:
| Endpoint URL | Example Model Selection | Supported Modality |
|---|---|---|
/v1/chat/completions |
llama-3.1-8b-instant, llama-3.3-70b-versatile, openai/gpt-oss-20b, openai/gpt-oss-120b, meta-llama/llama-guard-4-12b |
Text & Vision Generation |
/v1/audio/transcriptions |
whisper-large-v3, whisper-large-v3-turbo |
Audio Transcription |
/v1/audio/translations |
whisper-large-v3 |
Audio Translation |
Pricing, Caching, and Expiration Handling
Groq applies a flat 50% discount to all batch inference tokens compared to synchronous pricing. This discount does not stack with prompt caching discounts; batch tokens are billed strictly at the 50% batch rate regardless of cache status. Batches that do not complete within the designated 24-hour to 7-day window expire, so developers are advised to set longer completion windows for large workloads.
Production Readiness Checklist
- Ensure all input requests are compiled into standard JSONL format with valid JSON on every single line.
- Assign unique and traceable
custom_idstrings across all items to map output results reliably. - Select a processing window between 24 hours and 7 days matched to dataset sizing.
- Verify that discount expectations account for non-stacking prompt caching policies.
- Consult Groq API Reference for the latest endpoint structures and operational status polling.
Evidence and freshness
Evidence level: Documentation-verified
AI-assisted editorial content; verify current product details against the linked official sources.
Last verified: