stopping before canceled. Returns 409 during payment, billing review, or output writing. Finished runs are returned unchanged.
Signature
Method signature onclient.batchInference:
Parameters
string
required
ID of the batch inference run, with prefix
bir..Returns
Promise<BatchInferenceRun>
A batch inference run with its quote, progress, charge, and output location.
BatchInferenceRunId
required
ID of the batch inference run, with prefix
bir..ProjectId
required
Project ID with prefix
pp..DatasetId
required
Dataset ID with prefix
ds..BatchInferenceModel
required
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.BatchInferenceMode
required
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.object
required
Generation settings used for each model call.
object
required
Dataset and field where this run writes completions.
"preparing" | "awaiting_confirmation" | "queued" | "running" | "writing_outputs" | "stopping" | "blocked" | "completed" | "failed" | "canceled"
required
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.object | null
required
Latest generation progress while running or stopping; null in other states or when progress is unavailable.
"funds" | "payment" | "billing_review" | null
required
Reason the run is blocked:
funds to reserve the budget, payment to settle usage, or billing_review for staff review; otherwise null.string | null
required
Current status or billing explanation, or null when none is available.
object | null
required
Failure or cancellation details, or null when no error is recorded.
object | null
required
Price quote for confirmation, or null before a quote is ready.
string | null
required
Settled charge in US dollars as a decimal string, or null before a charge is recorded.
object | null
required
Output counts and token usage, or null before results are available.
string
required
Time the batch inference run was created, as an ISO 8601 timestamp.
string
required
Time the batch inference run was last updated, as an ISO 8601 timestamp.
Errors
HTTP errors throwPotatoApiError. The endpoint documents these error responses:
HTTP endpoint:
POST /batch-inference-runs/{batchInferenceRunId}/cancel.