/v2/batchesList batchesList the batches for the current user
Parameters
page_sizeinteger · int32queryThe maximum number of batches to return. The service may return fewer than this value. If unspecified, at most 50 batches will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.
page_tokenstringqueryA page token, received from a previous `ListBatches` call. Provide this to retrieve the subsequent page.
order_bystringqueryBatches can be ordered by creation time or last updated time. Use `created_at` for creation time or `updated_at` for last updated time.
X-Client-NamestringheaderThe name of the project that is making the request.
Responses
Response to a request to list batches.
batchesarray of objectThe batches that belong to the authenticated user.
Show child attributes
Show array items
This resource represents a batch job.
created_atstring · date-timeread-only. Creation timestamp.
creator_idstringread-only. User ID of the creator.
idstringread-only. Batch ID.
input_dataset_idstringrequiredID of the dataset the batch reads inputs from.
input_tokensstring · int64read-only. The total number of input tokens in the batch.
modelstringrequiredThe name of the model the batch uses.
namestringrequiredBatch name (e.g. `foobar`).
num_failed_recordsinteger · int32read-only. The current number of failed records in the batch.
num_recordsinteger · int32read-only. The total number of records in the batch.
num_successful_recordsinteger · int32read-only. The current number of successful records in the batch.
org_idstringread-only. Organization ID.
output_dataset_idstringoutput_tokensstring · int64read-only. The total number of output tokens in the batch.
statusstringThe possible stages of a batch life-cycle. - BATCH_STATUS_UNSPECIFIED: Unspecified status. - BATCH_STATUS_QUEUED: The batch has been queued. - BATCH_STATUS_IN_PROGRESS: The batch is in-progress. - BATCH_STATUS_CANCELING: The batch is being canceled. - BATCH_STATUS_COMPLETED: The batch has been completed. - BATCH_STATUS_FAILED: The batch has failed. - BATCH_STATUS_CANCELED: The batch has been canceled.
status_reasonstringread-only. More details about the reason for the status of a batch job.
updated_atstring · date-timeread-only. Latest update timestamp.
next_page_tokenstringA token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.
{
"batches": [
{
"creator_id": "b5e1ffb9-49a1-4653-9927-94083316309d",
"id": "9439e0e3-49a4-4336-93e3-485fc420bc18",
"input_dataset_id": "my-requests-dataset",
"model": "command",
"name": "my-batch",
"num_records": 5000,
"org_id": "62603116-1750-4c04-b1b6-9d5046764bc4",
"status": "BATCH_STATUS_IN_PROGRESS"
}
]
}Error is the response for any unsuccessful event.
messagestringA developer-facing error message.
{
"message": "string"
}Error is the response for any unsuccessful event.
messagestringA developer-facing error message.
{
"message": "string"
}Error is the response for any unsuccessful event.
messagestringA developer-facing error message.
{
"message": "string"
}Error is the response for any unsuccessful event.
messagestringA developer-facing error message.
{
"message": "string"
}Error is the response for any unsuccessful event.
messagestringA developer-facing error message.
{
"message": "string"
}Error is the response for any unsuccessful event.
messagestringA developer-facing error message.
{
"message": "string"
}