Generate media with AI
Starts generating an image or a sound effect from a text prompt with the same AI generators the editor's media panels use. Generation is asynchronous: the response is a generation whose id is the private library item the result is saved as. Poll GET /v1/library/generations/{id} every few seconds (images usually take 30-90 seconds, sound effects 10-30) until status is completed, then pass item.sourceId anywhere a source is accepted — POST /v1/videos/{id}/clips/{clipId}/overlays for an image overlay, POST /v1/videos/{id}/clips/{clipId}/layouts with media for b-roll, POST /v1/videos/{id}/clips/{clipId}/sound-effects for a sound effect. The finished item also appears in GET /v1/library?scope=private. Each generation counts against the caller's weekly AI generation allowance, which depends on the plan; exceeding it answers 403 with the reset time.
Request body
Example request
{
"prompt": "A watercolor illustration of a lighthouse at dawn",
"referenceSourceId": "su_abc123def456",
"type": "image"
}Response
Accepted
Example response
{
"generation": {
"id": "mi_abc123def456",
"item": {
"category": "Everyday",
"durationMs": 4200,
"id": "media_abc123def456",
"name": "Intro camera take",
"presetId": "cha-ching",
"scope": "private",
"sourceId": "su_abc123def456",
"type": "video"
},
"prompt": "A watercolor illustration of a lighthouse at dawn",
"status": "completed",
"type": "image"
},
"limit": 20,
"remaining": 19,
"resetAt": 1760000000000
}Changes
Changed in 3 of the 19 revisions of this API.101
- ●
added the new
edit_conflictenum value to theresponse property for the response statusresponse-property-enum-value-added
- ●
added the new
edit_conflictenum value to theresponse property for the response statusresponse-property-enum-value-added
- ●
added the new
edit_conflictenum value to theresponse property for the response statusresponse-property-enum-value-added
- ●
added the new
edit_conflictenum value to theresponse property for the response statusresponse-property-enum-value-added
- ●
added the new
edit_conflictenum value to theresponse property for the response statusresponse-property-enum-value-added
- ●
added the new
edit_conflictenum value to theresponse property for the response statusresponse-property-enum-value-added
- ●
added the new
edit_conflictenum value to theresponse property for the response statusresponse-property-enum-value-added
- ●
added the new
edit_conflictenum value to theresponse property for the response statusresponse-property-enum-value-added
- ●
added the new
edit_conflictenum value to theresponse property for the response statusresponse-property-enum-value-added
- ●
- ●
added the new
screenshotenum value to the//////response property for the response statusresponse-property-enum-value-added
- ●
- ○
endpoint added
endpoint-added
- ○
Of the 19 revisions, 1 has no diff computed.