Create a batch inference run
Send the dataset, model, sampling settings, and output destination, with an Idempotency-Key header. Returns a run that prepares a quote for frozen input rows. Confirm the quote before funds are reserved or inference starts.
Authorizations
Enter ApiKey <your-api-key> in Authorization, including the ApiKey prefix. In cURL and Python samples, <api-key> means this full value. The TypeScript SDK adds the prefix for you.
Headers
A caller-generated key reused for retries of one logical request.
1 - 128Path Parameters
Project ID with prefix pp..
^pp\.[0-9a-f]{8}-[0-9a-f]{4}-[7][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$Body
Rows of one dataset to answer with one model.
Source dataset ID with prefix ds..
^ds\.[0-9a-f]{8}-[0-9a-f]{4}-[7][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$The model to use: a catalog base model or a model version in this project containing a LoRA adapter or full weights. More model types may be added, so branch on type.
- Option 1
- Option 2
Where completions land: a text field on the source dataset, or a new chat-sft dataset.
- Option 1
- Option 2
Generation settings for every model call: maxOutputTokens caps each answer and bounds the quote, and samplesPerRow is how many answers each row gets.
Filter selecting rows to answer; omit to include all rows.
How each row is processed. Defaults to single_turn: one model call per row, with the answer written as text. More modes may be added, so branch on type.
Response
Batch Inference Run preparing its quote
A batch inference run with its quote, progress, charge, and output location.
Reason the run is blocked: funds to reserve the budget, payment to settle usage, or billing_review for staff review; otherwise null.
funds, payment, billing_review Settled charge in US dollars as a decimal string, or null before a charge is recorded.
^(0|[1-9][0-9]*)(\.[0-9]+)?$Time the batch inference run was created, as an ISO 8601 timestamp.
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$Dataset ID with prefix ds..
^ds\.[0-9a-f]{8}-[0-9a-f]{4}-[7][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$Failure or cancellation details, or null when no error is recorded.
ID of the batch inference run, with prefix bir..
^bir\.[0-9a-f]{8}-[0-9a-f]{4}-[7][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$Current status or billing explanation, or null when none is available.
How each row is processed. Defaults to single_turn: one model call per row, with the answer written as text. More modes may be added, so branch on type.
The model to use: a catalog base model or a model version in this project containing a LoRA adapter or full weights. More model types may be added, so branch on type.
- Option 1
- Option 2
Dataset and field where this run writes completions.
Latest generation progress while running or stopping; null in other states or when progress is unavailable.
Project ID with prefix pp..
^pp\.[0-9a-f]{8}-[0-9a-f]{4}-[7][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$Price quote for confirmation, or null before a quote is ready.
Output counts and token usage, or null before results are available.
Generation settings used for each model call.
Run state from input preparation through confirmation, execution, and output writing; stopping is cancellation in progress, blocked requires action, and completed, failed, or canceled are terminal.
preparing, awaiting_confirmation, queued, running, writing_outputs, stopping, blocked, completed, failed, canceled Time the batch inference run was last updated, as an ISO 8601 timestamp.
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$