Skip to Content
Cut.ProDocs
Generate with AI: images, videos, sound and 3D

Generate an image, a video, a sound or a 3D model

Generates an image, a video, a voice, music, a sound, a talking avatar, a 3D model or an edited image or video with a model from GET /models, or with auto, which picks the model that best draws the request for the price. Charges the credits at once; a generation that failed gives them back.

credits is the total price the user agreed to: take it from POST /generations/quote. 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.

Answers the generation. To know when it ends, pass ?wait=60 (the answer is held until it ends or the seconds run out), webhook_url (CutPro posts the generation there, signed), or read GET /generations/{id}?wait=60.

Send an Idempotency-Key header (any unique string, such as a UUID) to retry safely: the same key within 24 hours answers the first result and never charges twice.

Images go in image_ids (from POST /generations/media or the output.image_id of a ready image) or as links in image_urls: none for text, one for image and control, two (first, last) for frames, and up to the model's max_images for references and edit. Sounds go in audio_ids or audio_urls on references, up to max_audios.

edit (redraw, swap a person or object, upscale) and control (move the image with a video's motion) take a video in video_id; the result is as long as the source and is priced by its seconds.

Links are brought into the workspace library before generating and count toward its storage.

A voice (kind: speech) reads prompt word for word in one of the model's voices, passed as voice; the result is an MP3.

Authorization

apiKey
headerX-Api-Key<token>

Query Parameters

wait?|

Seconds to hold the answer while it is processing, up to 60.

Range0 <= value <= 60

Header Parameters

idempotency-key?string

Any unique string; the same key within 24 hours answers the first result instead of generating again.

Length1 <= length <= 255

Request Body

  1. body
kind?string

image, video or speech, needed when model is left out or auto: a model id says its own kind.

Value in"image""video""speech"
model?string

id from GET /models with endpoint: generations, or auto (the same as leaving it out) to let CutPro pick the image or video model that draws the request: the mode, images and sounds sent, the length and shape asked (or written in prompt, such as "15 seconds, 16:9"), sound, and the last two weeks' delivery rate, then the best price for the points at preset. The quote answers the model it picked.

Lengthlength <= 64
preset?string

How auto weighs points against price: best takes the best rated model and its sharpest resolution, balanced (the default) the cheapest within 10 points of the best, fast the quickest within 25. With a model id it only sets the resolution left out.

Value in"fast""balanced""best"
mode?string

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, style, voice or sound from the images and audios, or edits the images (image). edit: redraws a video as the prompt asks, swaps a person or object for the one in the images, or upscales it (video only). control: moves the one image with the motion of a video (video only). A voice takes text only. Left out, it follows the inputs sent: a video_id is control on a model that takes it and edit on the others; nothing is text; on a video one image is image, two are frames and more, or sounds alone, are references; on an image any is references.

Value in"text""image""frames""references""edit""control"
resolution?string

One of the model's resolutions; left out, 720p (best: the sharpest) or the model's only one.

Lengthlength <= 8
prompt?string

What to make, in any language, or the text a voice reads. Required by every image, video and voice model; a tool that only edits a file may take none.

Length1 <= length <= 2000
options?

The model's extra fields from parameters in GET /models, under those names: a music model's lyrics or instrumental, a 3D model's texture or polycount. reference_audio, the voice a model clones, takes a library sound id like audio_ids; a link or any other value is refused with MEDIA_NOT_FOUND. A name no model takes is refused with OPTION_UNKNOWN; one this model does not take is listed in warnings of the quote.

seconds?|

Length of a video. Left out, the one written in prompt or 5. The nearest the model draws is used, and warnings of the quote says seconds when it is not the one asked.

Range1 <= value <= 60
aspect_ratio?string

Left out, the one written in prompt ("16:9", "vertical") or 9:16. A model without it draws the nearest of the same side, and warnings says aspect_ratio. A voice takes none.

Value in"21:9""16:9""3:2""4:3""5:4""1:1""4:5""3:4""2:3""9:16"
audio?boolean

false leaves the sound out of a video whose model has audio: optional, usually for less. Videos have sound by default.

voice?string

Required for a voice: one of the model's voices[].id.

Lengthlength <= 64
image_ids?array<>

From POST /generations/media or the output.image_id of a ready image.

Itemsitems <= 30
image_urls?array<>

Public links to images, read in place of an upload; they go after image_ids and into the library.

Itemsitems <= 30
audio_ids?array<>

Sounds a references video borrows a voice or a beat from, up to the model's max_audios: from POST /generations/media or the output.audio_id of a ready voice.

Itemsitems <= 10
audio_urls?array<>

Public links to sounds, read like audio_ids.

Itemsitems <= 10
video_id?string

The video an edit redraws or a control takes the motion of, up to the model's max_video_seconds: uploaded with POST /generations/media or the output.video_id of a ready video. The result is as long as it.

Lengthlength <= 24
orientation?string

On control: whether the subject faces as in the image (default) or as in the video.

Value in"image""video"
seed?|

The same seed with the same request draws the closest result again; random when left out. Every generation answers its seed.

Range0 <= value <= 2147483647
credits*|

Total price the user agreed to, from POST /generations/quote.

Range0 <= value
webhook_url?string

Public https address CutPro posts to once the generation is ready or failed: a JSON { type, created_at, data } with type generation.ready or generation.failed and data the generation. Signed in the CutPro-Signature header (t=<unix seconds>,v1=<hex>, an HMAC-SHA256 of <t>.<raw body> with the secret from GET /generations/webhook-secret). Answer 2xx within 10 seconds; it is tried again after 1 and 10 minutes, and CutPro-Event-Id tells a retry apart.

Lengthlength <= 2048

Response Body

Response for status 201

application/json
  1. response
id*string
kind*string
Default"image"
Value in"image""video""speech""music""audio""avatar""model3d""tool""videoedit""story"
status*string

processing until it ends ready or failed; a failed one gives the credits back.

Default"processing"
Value in"processing""ready""failed"
model*string
model_name*string
mode*|

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, style, voice or sound from the images and audios, or edits the images (image). edit: redraws a video as the prompt asks, swaps a person or object for the one in the images, or upscales it (video only). control: moves the one image with the motion of a video (video only). A voice takes text only.

Default"text"
Value in"text""image""frames""references""edit""control"null
resolution*string|null
seconds*number|null
aspect_ratio*|

Null for a voice.

Default"21:9"
Value in"21:9""16:9""3:2""4:3""5:4""1:1""4:5""3:4""2:3""9:16"null
voice*|

The voice a speech generation was read in.

prompt*|

What was asked, or the text a voice read.

audio*|

Whether a video was drawn with sound; null for an image or a voice.

voice_name*|

The name of voice, for showing.

image_ids*array<string>
audio_ids*array<string>

The sounds a references video borrowed a voice or a beat from.

video_id*|

The video an edit redrew or a control took the motion of.

seed*|

Send it back as seed with the same request for the closest result again.

credits_charged*number
error_code*|
Default"MEDIA_REJECTED"
Value in"MEDIA_REJECTED""COPYRIGHT_BLOCKED""REAL_FACES_BLOCKED""SAFETY_BLOCKED""MEDIA_FAILED""MEDIA_UNAVAILABLE""INSUFFICIENT_CREDITS""TIMEOUT""OUTPUT_CHECK_FAILED""TARGET_NOT_A_PERSON"null
edit_id*|

Set once a ready video was opened to edit (POST /generations/{id}/edit): pass it to POST /posts to publish or schedule it.

output*|

The first file, set once ready, unless it was deleted from the library. outputs lists every file.

outputs*array<>

Every file the model made, once ready: a 3D model with its textures, several images, a song.

text*|

What the model wrote, for a model that answers text (lyrics, a description).

options*|

The model's own fields as the request ran them, for a model that runs from its parameters.

expected_seconds*|

How long this model usually takes, while processing.

feedback*|
Default"up"
Value in"up""down"null
feedback_reason*|

Set with a down vote.

refund_status*|

Set once the credits were asked back: requested until the team decides, then approved or denied.

Default"requested"
Value in"requested""approved""denied"null
downloaded*boolean

true once the file was taken with GET /generations/{id}/download: its credits can no longer be asked back.

removed*boolean

true when the result was deleted from the library.

created_at*string
POST
/generations
Example Request
curl -X POST 'https://api.cut.pro/api/v1/generations' \  -H 'Content-Type: application/json' \  -d '{  "credits": 0}'
Example Response
{  "id": "string",  "kind": "image",  "status": "processing",  "model": "string",  "model_name": "string",  "mode": "text",  "resolution": "string",  "seconds": 0,  "aspect_ratio": "21:9",  "voice": "string",  "prompt": "string",  "audio": true,  "voice_name": "string",  "image_ids": [    "string"  ],  "audio_ids": [    "string"  ],  "video_id": "string",  "seed": 0,  "credits_charged": 0,  "error_code": "MEDIA_REJECTED",  "edit_id": "string",  "output": {    "image_id": "string",    "video_id": "string",    "audio_id": "string",    "url": "string",    "thumbnail_url": "string"  },  "outputs": [    {      "kind": "image",      "url": "string",      "media_type": "string",      "bytes": 0,      "media_id": "string",      "file_name": "string"    }  ],  "text": "string",  "options": {    "property1": "string",    "property2": "string"  },  "expected_seconds": 0,  "feedback": "up",  "feedback_reason": "string",  "refund_status": "requested",  "downloaded": true,  "removed": true,  "created_at": "string"}