POST /v2/batches
Creates and executes a batch from an uploaded dataset of requests
Servers
- https://api.cohere.com
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:
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. |
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
- Add HTTP Task to your workflow definition.
- 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.
- Click Test request to test run your request to the API and see the API's response.