Skip to main content
POST
Create a batch

Authorizations

x-api-key
string
header
required

Your workspace API key, leap_.... Create one at https://app.tryleap.ai/go/api, and keep it on your server.

Headers

Idempotency-Key
string

A key you generate for this request, such as a UUID, so a retry never starts a second run. A retry with the same key and body returns the same generation as it is now, marked Idempotent-Replayed: true. The same key with a different body is a 409. A key belongs to your workspace and doesn't expire, so use a new one for each new request.

Required string length: 1 - 255
Pattern: ^[\x21-\x7e]+$
Example:

"7f1c2a9e-3b4d-4e8a-9c21-5d0f6a7b8c90"

Body

application/json
requests
object[]
required

Up to 50 generations, each a model and its input. All are priced and held together.

Required array length: 1 - 50 elements

Response

The batch, with each generation queued.

Up to 50 generations priced and held together, each run on its own.

id
string
required

The batch's ID, bat_....

object
string
required
Allowed value: "batch"
data
object[]
required

Its generations, in the order you sent them.

Last modified on October 4, 2026