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.

post/generations

Request

  • Base URL: https://api.cut.pro/api/v1
  • URL: https://api.cut.pro/api/v1/generations
  • Auth: API key in header X-Api-Key

Request body

kind'image' | 'video' required
modelstring required

id from GET /generations/models.

mode'text' | 'image' | 'frames' | 'references' required

text: from the prompt alone. image: animates one image, the first frame (video only). frames: goes from a first to a last image (video only). references: borrows a person, product or style from the images, or edits them (image).

resolutionstring

One of the model's resolutions; the model's default when left out.

promptstring required

What to show, in any language.

aspect_ratio'21:9' | '16:9' | '3:2' | '4:3' | '5:4' | '1:1' | '4:5' | '3:4' | '2:3' | '9:16' required
audioboolean

false leaves the sound out of a video whose model has audio: optional.

image_idsstring[]

Response

Response for status 201

idstring required
status'processing' required
credits_chargednumber required

0 when the charge was waived.

Changes

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