Batches

Create a batch

Starts up to 50 generations in one request. They're priced and held together, so either all start or none do, and each then runs as its own generation with this batch's batch_id. Read each one with GET /v1/generations/{id}. One request that would sexualise a real person from a photo you uploaded refuses the whole batch with 422 sexualized_real_person.

Needs an API key with the generations:write scope.

post/v1/batches

Request

  • Base URL: https://api.tryleap.ai
  • URL: https://api.tryleap.ai/v1/batches
  • Auth: one of:
    • API key in header x-api-key
    • HTTP bearer

Headers

Idempotency-Keystring

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.

Example:7f1c2a9e-3b4d-4e8a-9c21-5d0f6a7b8c90

Request body

Response

The batch, with each generation queued.

idstring required

The batch's ID, bat_....

object'batch' required

Changes

No recorded changes to this operation across all 1 revision of this API.