Batch
TheBatch class supports two modes of bulk processing: sync completions for immediate results on small-to-medium datasets, and async batches for large-scale background jobs.
Sync completions
Sync methods process items in-memory and return results directly. Use these for datasets that fit in a single request.Labeling
Extracting
Summarizing
Enriching
Generic operation
Async batches
For large datasets, submit an async batch job and poll for results.Submitting a batch
Monitoring progress
Retrieving output
Canceling a batch
Properties
| Property | Type | Description | |
|---|---|---|---|
id | str | Batch UUID | |
status | str | "queued", "processing", "completed", "failed", or "cancelled" | |
progress | float | Completion percentage (0.0 to 1.0) | |
created_at | datetime | When the batch was submitted | |
completed_at | `datetime | None` | When the batch finished |
error | `str | None` | Error message if the batch failed |

