POST /v2/batches

Creates and executes a batch from an uploaded dataset of requests

Servers

Request headers

Name Type Required Description
Content-Type String Yes The media type of the request body.

Default value: "application/json"

X-Client-Name String No

The name of the project that is making the request.

Request body fields

Name Type Required Description
input_dataset_id String Yes

ID of the dataset the batch reads inputs from.

input_tokens String No

read-only. The total number of input tokens in the batch.

status String No

read-only. Current stage in the life-cycle of the batch.

Valid values:

  • "BATCH_STATUS_QUEUED"
  • "BATCH_STATUS_COMPLETED"
  • "BATCH_STATUS_CANCELING"
  • "BATCH_STATUS_FAILED"
  • "BATCH_STATUS_CANCELED"
  • "BATCH_STATUS_UNSPECIFIED"
  • "BATCH_STATUS_IN_PROGRESS"

Default value: "BATCH_STATUS_UNSPECIFIED"

org_id String No

read-only. Organization ID.

status_reason String No

read-only. More details about the reason for the status of a batch job.

model String Yes

The name of the model the batch uses.

updated_at String No

read-only. Latest update timestamp.

output_tokens String No

read-only. The total number of output tokens in the batch.

num_failed_records Integer No

read-only. The current number of failed records in the batch.

id String No

read-only. Batch ID.

num_records Integer No

read-only. The total number of records in the batch.

name String Yes

Batch name (e.g. foobar).

creator_id String No

read-only. User ID of the creator.

num_successful_records Integer No

read-only. The current number of successful records in the batch.

created_at String No

read-only. Creation timestamp.

output_dataset_id String No

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. Search for the API you want to integrate with and click on the name.
    • This loads the API reference documentation and prepares the Http request settings.
  3. Click Test request to test run your request to the API and see the API's response.