latestOpenAPI 3.1.02026-08-163864115.7 MB
c363cb2feb95
Media
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.
post/media/generate
Headers
Idempotency-Keystring
Example:d9105228-4a08-46b1-8b91-42fed586d383
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://assets-2-rough.whop.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"
}