BashBrainTeammatesPricingDevelopersGet a test key

Batches

Many users at once: one ask each, followed together.

Send Authorization: Bearer vk_test_... on every call. Every route of Batches.

GET/v1/batches/{batch_id}Progress: counts by status, spend so far.

Your API key, scope runtime or all. On the card: ask. Every call here is a checked sample.

Request1 field

Path

batch_idstringrequiredThe batch's id (bat_...).
Type
string
Answers 20011 fields
idstringThe batch (bat_...).
Example
bat_7xk
object"batch"Always batch.
Type
"batch"
status"running" | "cancelled" | "completed"running: items are still starting or running. cancelled: you cancelled it, so no new item starts. completed: every item has finished.
Type
"running" | "cancelled" | "completed"
deployment_idstring | nullThe deployment that answers its items (dep_...); null when none applies.
Type
string | null
concurrencyintegerHow many items run at once.
Type
integer
item_countintegerHow many items it has.
Type
integer
countsobjectIts items, by status.
queuedintegerItems not started yet.
Type
integer
runningintegerItems running now.
Type
integer
succeededintegerItems that finished well.
Type
integer
failedintegerItems that failed.
Type
integer
cancelledintegerItems a cancel kept from starting.
Type
integer
spend_usdnumberWhat it has cost so far, in billed US dollars: every item's conversation and all its work.
Example
0.061
metadatamap of stringYour labels, as you sent them; empty when you sent none.
Type
map of string
created_atstringWhen it was made, as an ISO 8601 time.
Type
string
completed_atstring | nullWhen it stopped running, completed or cancelled, as an ISO 8601 time; null while running.
Type
string | null
TypeScript
const batch = vestra.ask([{ user: 'traveller-42', message: 'Is your flight hit by the storm?' }]);const progress = await batch.get();
Python
batch = vestra.ask([{"user": "traveller-42", "message": "Is your flight hit by the storm?"}])progress = batch.get()
CLI
vestra events bat_7xk
HTTP
# Its status and counts, then each item's text: the work's answer.curl "$VESTRA_BASE_URL/v1/batches/bat_7xk" \  -H "Authorization: Bearer $VESTRA_API_KEY" curl "$VESTRA_BASE_URL/v1/batches/bat_7xk/items" \  -H "Authorization: Bearer $VESTRA_API_KEY"
HTTP

No sample in your language for this route, so here it is over HTTP.

# Its status and counts, then each item's text: the work's answer.curl "$VESTRA_BASE_URL/v1/batches/bat_7xk" \  -H "Authorization: Bearer $VESTRA_API_KEY" curl "$VESTRA_BASE_URL/v1/batches/bat_7xk/items" \  -H "Authorization: Bearer $VESTRA_API_KEY"