Skip to main content
POST
Create a batch

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

Idempotency-Key
string

Makes the request retry-safe. Sail stores a reservation keyed by (organization, API key, Idempotency-Key); retrying with the same value returns the previously stored response instead of re-running inference. Keys are capped at 255 characters. See Idempotent Requests for full semantics.

Maximum string length: 255

Body

application/json
endpoint
enum<string>
required

The API endpoint to use for all requests in the batch. Currently only /v1/responses is supported.

Available options:
/v1/responses
requests
object[]
required

The list of requests in the batch. Min 1, max 100,000 requests. Total request body must not exceed 256 MB.

Required array length: 1 - 100000 elements
label
string

An optional label for the batch. Must be alphanumeric (hyphens and underscores allowed), max 128 characters.

Maximum string length: 128
Pattern: ^[a-zA-Z0-9_-]+$

Response

Batch created.

id
string
required

Unique identifier for the batch.

request_counts
integer
required

Total number of requests in the batch.

created_at
integer
required

Unix timestamp of when the batch was created.

label
string

The label for the batch, if provided.