grok-imagine-video/reference-to-videoGeneration type:
image_to_videoEndpoint:
POST /api/asset_generator/
Pricing
Prices are per output. When a request asks for several outputs, the charge is this price times the number of outputs.
Quick start
The example uses sample media from our CDN. Swap in publicly accessible URLs for your own files.Input parameters
Send these fields ininput_params.
string
required
Text prompt describing the video to generate. Use @Image1, @Image2, etc. to reference specific images.Maximum characters:
4096.string[]
required
One or more reference image URLs (1–7) to guide the video generation as style and content references.Minimum items:
1.
Maximum items: 7.string
default:"8"
Duration of the generated video in seconds (1–10).Allowed values:
"1", "2", "3", "4", "5", "6", "7", "8", "9", "10".string
default:"16:9"
Aspect ratio of the generated video.Allowed values:
"16:9", "9:16", "1:1", "4:3", "3:4", "3:2", "2:3".string
default:"480p"
Output video resolution.Allowed values:
"480p", "720p".Complete JSON schema
Complete JSON schema
Response
The request returns the task withstatus: "initializing". Poll GET /api/asset_generator/{id}/ until status is done or failed, or pass a webhook_url to be notified. A finished task lists its files in assets and the credits it charged in credits_used.
