Grok Imagine Video 1.5

POST https://api.beatapi.io/v1/videos/tasks

Generate 1–15 second videos from text, one first frame, or up to seven image references at 480p, 720p, or 1080p. 1080p accepts at most one image.

Supported modes

ModeRequired inputRules
Text to videomodel, promptOmit images and reference_images.
First framemodel, prompt, imagesProvide one image URL and omit aspect_ratio.
Reference imagesmodel, prompt, reference_imagesProvide 1–7 URLs; 1080p accepts at most one image.

Async flow: Create the task, save data.id, then poll the Task with GET /v1/tasks/{task_id}. On succeeded, read data.output.media. On failed, read data.error_code and data.error_message, then follow the error and retry policy.

Using a local file? upload a local input first and pass the returned data.url.

Authorization

Authorization   string   required

Send your BeatAPI API key as a Bearer token. Create one on the Dashboard.

Authorization: Bearer <BEATAPI_API_KEY>

Keep permanent API keys on trusted servers. Content-Type: application/json is required for the request body. Idempotency-Key is optional when the endpoint exposes it and is recommended for safe retries with the exact same body.

Request body

model   string   required

Must be grok-imagine-video-1.5.

Value: grok-imagine-video-1.5


prompt   string   required

Video generation instructions.

Length: 1 to 4096 characters


images   string[]   optional

One first-frame image as a public HTTPS URL.

Count: 1 to 1 items


reference_images   string[]   optional

One to seven public HTTPS reference images.

Count: 1 to 7 items


duration   integer   optional

Requested output duration in seconds.

Default: 8
Range: 1 to 15


aspect_ratio   enum<string>   optional

Output video aspect ratio. Omit when one first-frame image is supplied.

Available options: 1:1, 16:9, 9:16, 3:2, 2:3, auto
Default: "16:9"


resolution   enum<string>   optional

Output resolution tier. 1080p accepts at most one image.

Available options: 480p, 720p, 1080p
Default: "480p"

Request examples

Text to video

$curl --request POST \
> --url https://api.beatapi.io/v1/videos/tasks \
> --header 'Authorization: Bearer <BEATAPI_API_KEY>' \
> --header 'Content-Type: application/json' \
> --data '{
> "model": "grok-imagine-video-1.5",
> "prompt": "A cinematic product reveal with a slow orbiting camera.",
> "duration": 8,
> "aspect_ratio": "16:9",
> "resolution": "480p"
>}'

First frame

$curl --request POST \
> --url https://api.beatapi.io/v1/videos/tasks \
> --header 'Authorization: Bearer <BEATAPI_API_KEY>' \
> --header 'Content-Type: application/json' \
> --data '{
> "model": "grok-imagine-video-1.5",
> "prompt": "Animate the performer with a slow push-in and native ambient sound.",
> "images": [
> "https://media.beatapi.io/samples/neon-singer.png"
> ],
> "duration": 8,
> "resolution": "720p"
>}'

Reference images

$curl --request POST \
> --url https://api.beatapi.io/v1/videos/tasks \
> --header 'Authorization: Bearer <BEATAPI_API_KEY>' \
> --header 'Content-Type: application/json' \
> --data '{
> "model": "grok-imagine-video-1.5",
> "prompt": "Keep the supplied identity consistent across a short cinematic shot.",
> "reference_images": [
> "https://media.beatapi.io/samples/neon-singer.png",
> "https://media.beatapi.io/samples/smart-bottle.png"
> ],
> "duration": 8,
> "aspect_ratio": "9:16",
> "resolution": "720p"
>}'

Response

A successful request returns HTTP 201.

1{
2 "data": {
3 "id": "task_8K2qA",
4 "object": "task",
5 "task_kind": "video",
6 "capability_id": "grok-imagine-video-1.5",
7 "capability_version": null,
8 "media_type": "video",
9 "model": "grok-imagine-video-1.5",
10 "status": "queued",
11 "stage": "queued",
12 "created_at": 1782210000,
13 "updated_at": 1782210000,
14 "completed_at": null,
15 "output": null,
16 "usage": {
17 "credits_reserved": 0.2,
18 "credits_charged": 0.2,
19 "billable_duration_seconds": 8,
20 "credits_settled": 0,
21 "credits_refunded": 0
22 },
23 "request_id": "req_abc123",
24 "error_code": null,
25 "error_message": null
26 }
27}

Errors

StatusMeaning
400Invalid request.
401Missing, invalid, or inactive API key.
402Insufficient USD balance
409Idempotency key conflicts with another request body
429Request rate limit exceeded.