---
title: "Run a batch"
description: "Confirm a batch quote to run it. Reserves the batch credits and starts every generation together. Retrying with the same idempotency key returns the same result."
url: https://docs.roasos.com/api-reference/generations/createGenerationBatch
---

# Run a batch

Confirm a batch quote to run it. Reserves the batch credits and starts every generation together. Retrying with the same idempotency key returns the same result.

## `POST /v1/generation-batches`

Endpoint: `POST https://api.roasos.com/v1/generation-batches`

Run a batch

Confirm a batch quote to run it. Reserves the batch credits and starts every generation together. Retrying with the same idempotency key returns the same result.

### Parameters

- `undefined`
- `undefined`
- `undefined`

### Request body

Content type: `application/json`

### Responses

- `201`: Atomically admitted generation batch
- `400`: Invalid confirmation request
- `402`: Insufficient credits
- `403`: Quote approval or API key spend policy denied the batch
- `404`: Batch quote not found
- `409`: Quote, idempotency, materialization, or dispatch authority conflict
- `429`: Write rate or active-generation quota exceeded
- `503`: Billing, database authority, or recovery outcome is temporarily unavailable

Read the full reference at https://docs.roasos.com/api-reference/generations/createGenerationBatch.
