Cut.ProDocs
Generations

Generate an image or a video

Generates one image or video with the chosen model from GET /generations/models, from a prompt alone or from images. Charges the credits at once; poll GET /generations/{id} every 10 seconds until it is ready or failed, which gives them back.

credits is the total price the user agreed to: the model's credits for the mode and resolution, times seconds for a video (silent_credits with audio: false). A different current price answers PRICE_CHANGED with the new total and charges nothing. Always tell the user the model and the price and wait for their yes before calling this.

image_ids come from POST /generations/images or from the output.image_id of a ready image: none for text, one for image, two (first, last) for frames, and up to the model's max_images for references.

Authorization

apiKey
X-Api-Key<token>

In: header

Request Body

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

POST
/generations
curl -X POST "https://example.com/generations" \  -H "Content-Type: application/json" \  -d '{    "kind": "image",    "model": "string",    "mode": "text",    "prompt": "string",    "aspect_ratio": "21:9",    "credits": 0  }'
{  "id": "string",  "status": "processing",  "credits_charged": 0}