---
title: "Create a generation"
description: "Start an async generation job. Generate one Idempotency-Key for the request and reuse it only when retrying the exact same payload. Poll `GET /v1/generations/{id}` for status, or provide a `webhook_url` to be notified on completion."
url: https://docs.roasos.com/api-reference/generations/createGeneration
---

# Create a generation

Start an async generation job. Generate one Idempotency-Key for the request and reuse it only when retrying the exact same payload. Poll `GET /v1/generations/{id}` for status, or provide a `webhook_url` to be notified on completion.

## `POST /v1/generations`

Endpoint: `POST https://api.roasos.com/v1/generations`

**Deprecated.**

Create a generation

Start an async generation job. Generate one Idempotency-Key for the request and reuse it only when retrying the exact same payload. Poll `GET /v1/generations/{id}` for status, or provide a `webhook_url` to be notified on completion.

### Parameters

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

### Request body

Content type: `application/json`

### Responses

- `200`: Side-effect-free generation quote. If authorization.status is approval_required, open authorize_url, approve as a workspace owner/admin, then resubmit quote_id with the same Idempotency-Key. No credits are reserved and no provider work starts.
- `201`: Generation created and processing
- `400`: Validation error
- `402`: Insufficient credits
- `403`: The API key is not authorized for this model or request credit ceiling
- `409`: The idempotency key is already processing, has an unknown outcome, or was reused with different request data
- `410`: The supplied authoritative quote expired and must be replaced using a new idempotency key
- `428`: The supplied quote requires owner/admin spend authorization
- `429`: Rate limit, concurrency limit, or daily/monthly credit budget exceeded
- `503`: The paid request could not be claimed safely or an external billing outcome is unknown

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