Batch API Capabilities Expanded
The Grok Batch API now supports image generation, image editing, and video generation in addition to chat completions. This expansion allows developers to process multiple generative requests efficiently through the batch processing interface.
Key Features
- Multi-modal batch processing: Submit chat, image, and video requests in a single batch
- Tool support: Both server-side tools and client-side function tools are now available in batch requests
- JSONL file uploads: Create batches by uploading JSONL files via the Files API, supporting all batch endpoints in one file
- Simplified management: Consolidate multiple request types without switching between different APIs
Developer Considerations
Generated image and video URLs expire after 1 hour, so developers should plan to download or process results within this timeframe. This makes the Batch API particularly useful for bulk generation workflows that need to process results immediately or store them long-term.
The JSONL file upload feature significantly streamlines batch job creation, especially for large-scale operations combining different generation types. Developers can now structure heterogeneous batch requests more flexibly without manually preparing separate endpoints for each modality.