Basic usage
Create a prediction batch by passing an object to thebatch
field in a predictions
create
request. The create
method’s predictions
field accepts both single prediction objects or a list of objects, but only if batch details are set will a batch get created.
Predictions are asynchronous and take ~20 seconds each to run. Please see the section on handling async results for more details.
Fetch a batch
Prediction responses always contain abatch
field, but only if batch details were provided will a batch be created.
batch
field. Grab this ID and then fetch the batch. The batch response will contain both the batch object and the batch’s predictions.
Choosing population models
require a specific population model ID. Call thelist
method on populations
to get a list of population models available for simulation.

Click to copy the population model's ID
Handling async batch results
Batch prediction simulations run asynchronously. A batch object has a status field which captures the overall prediction status of the batch. In addition, each individual prediction within the batch has its own status field which captures its individual prediction status. The initial batch status will be"Queued"
, and you need to poll for completion.
Initial response
Polling for results
The batch will progress through these statuses:Queued
→ Running
→ Predicted
(or potentially Failed
). Predictions typically take less than 20 seconds, so a batch should take N * ~20 seconds, where N is the number of predictions in the batch.