Overview
The Batch API allows you to submit multiple simulations in a single request. Batches execute simulations in parallel with automatic progress tracking and cost management.Batch Features
- Parallel Execution: Run multiple simulations simultaneously
- Progress Tracking: Monitor individual job and overall batch progress
- Cost Management: Set budget caps and track actual costs
- Fail-Fast Mode: Stop on first failure or continue
- Priority Control: Set batch priority (0-100)
Create Batch
Submit a batch of simulations to run. Returns immediately with batch ID.POST /simulations/batch
Request Body
Array of simulation requests (same format as POST /simulations)
Number of simulations to run in parallel
Stop batch on first failure
Maximum cost for batch (USD)
Batch priority (0-100, higher = more important)
Custom metadata
Response
Status:202 Accepted
Unique batch identifier
Batch status:
PENDING, RUNNING, PARTIAL, COMPLETED, FAILED, or CANCELLEDCreation timestamp
Batch priority
Fail-fast mode enabled
Parallel job limit
Progress tracking
Total jobs in batch
Jobs pending
Jobs running
Jobs completed
Jobs failed
Jobs cancelled
Overall progress percentage
Array of created job IDs
Batch Size Limits
| Tier | Max Batch Size |
|---|---|
| Free | 5 |
| Basic | 20 |
| Pro | 50 |
| Enterprise | 100 |
Get Batch Status
Get details about a specific batch.GET /simulations/batch/{batch_id}
Response
Returns batch object with updated progress and status.Errors
404 Not Found- Batch doesn’t exist403 Forbidden- Not the batch owner
Get Batch with Jobs
Get batch details including all individual job details.GET /simulations/batch/{batch_id}/jobs
Response
Batch metadata
Array of job objects with full details
List Batches
List your batch jobs with optional filtering.GET /simulations/batch
Query Parameters
Filter by status
Page number
Batches per page (1-100)
Response
Array of batch objects
Total batch count
Current page
Page size
Cancel Batch
Cancel a running or pending batch.POST /simulations/batch/{batch_id}/cancel
Request Body
Cancellation reason (optional)
Whether to cancel currently running jobs
Response
Returns batch object with statusCANCELLED.
Get Batch Statistics
Get statistics about your batches.GET /simulations/batch/stats
Response
Total batches created
Batches pending
Batches running
Batches completed
Batches failed
Batches cancelled
Total jobs across all batches
Total cost
Total tokens used
Get Usage Status
Get current usage and quota status.GET /simulations/batch/usage
Response
Your user ID
Your subscription tier
Current billing period (YYYY-MM)
Days remaining in period
API calls used this month
Simulations run this month
Cost accumulated this month
Tokens used this month
API calls limit (-1 = unlimited)
Simulations limit (-1 = unlimited)
Cost limit (-1 = unlimited)
Maximum batch size
Remaining API calls
Remaining simulations
Remaining budget
Whether any quota is exceeded
Reason for quota exceeded (if applicable)
Get Usage History
Get usage history for past billing periods.GET /simulations/batch/usage/history
Query Parameters
Number of past periods to retrieve
Response
Current period usage (same as /usage)
Array of historical period usage

