Generate Media Asset
Starts an AI media generation job billed from the account's balance. Generation is asynchronous — poll GET /media/{id} until the asset is ready, then use file.id anywhere attachments are accepted.
Headers
A unique key that makes this request safe to retry. See Idempotent requests.
Request body
Example request
{
"account_id": "biz_xxxxxxxxxxxxxx",
"duration_seconds": 5,
"prompt": "A 9:16 product showcase of a cordless power scrubber",
"reference_media": [
"file_xxxxxxxxxxxxxx"
],
"resolution": "1080p",
"type": "video"
}Response
Generation started.
Example response
{
"amount_charged": 2.5,
"completed_at": "2026-01-01T12:00:00.000Z",
"created_at": "2026-01-01T12:00:00.000Z",
"currency": "usd",
"error_message": "The generation provider rejected the prompt. The charge was refunded.",
"file": {
"id": "file_xxxxxxxxxxxxxx",
"url": "https://whop-assets-example.s3.amazonaws.com/uploads/image/2026-01-01/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
},
"generation": {
"duration_seconds": 5,
"prompt": "A 9:16 product showcase of a cordless power scrubber",
"reference_media": [
"file_xxxxxxxxxxxxxx"
],
"resolution": "1080p"
},
"id": "media_xxxxxxxxxxxxxx",
"media_type": "video",
"source": "generated",
"status": "ready"
}Changes
Changed in 3 of the 74 revisions of this API.4
- ○
added the non-success response with the status
response-non-success-status-added
- ○
- ○
added the optional property
/to the response with the statusresponse-optional-property-added
- ○
added the optional property
/to the response with the statusresponse-optional-property-added
This revision also has 9 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog
- ○
- ○
added the new optional
headerrequest parameterIdempotency-Keynew-optional-request-parameter
This revision also has 1 change that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog
- ○
Of the 74 revisions, 1 has no diff computed.