Grok Imagine video
Generate videos with Grok Imagine: models, parameters, task polling, responses, and errors.
grok-imagine-video-1.5 turns text into video, with optional reference images: submit a task, poll its ID, then download the finished clip.
| Item | Value |
|---|---|
| Base URL | https://api.hop-base.com/v1 |
| Submit a task | POST /v1/video/generate |
| Query a task | GET /v1/video/tasks/{task_id} |
| Key group | "Grok Video" |
Grok Imagine images use the synchronous OpenAI Images endpoints, and their parameters do not carry over to video; see Grok Imagine images.
Available models
| Model ID | Resolution | Duration (s) | Official price |
|---|---|---|---|
grok-imagine-video-1.5 | 480p / 720p / 1080p | 1–15 | $0.08from/ second |
grok-imagine-video-1.5 is text-to-video with optional reference images: no first / last frames, and no reference video or audio.
Images and chat are served by the Grok Suite group; video is served by the Grok Video group. They are two separate groups: a key reaches the video model only if it includes Grok Video, and one key can include both groups — confirm with GET /v1/models using the key you actually intend to use.
Official prices for each resolution tier and for reference images are on the model card: grok-imagine-video-1.5. Every video field is listed in the API reference under Submit a video task.
Request parameters
| Parameter | Required | Values | Default |
|---|---|---|---|
model | Required | grok-imagine-video-1.5 | — |
prompt / content | One of the two | text | — |
resolution | Required | 480p / 720p / 1080p | — |
duration | Optional | integer 1–15 (seconds) | 5 |
aspect_ratio | Optional | 1:1 / 16:9 / 9:16 / 4:3 / 3:4 / 3:2 / 2:3 | 16:9 |
reference_images | Optional | array of { "url": "https://..." } | — |
modelmust match exactly.contentis an array oftextitems with non-empty text; it accepts no image / video / audio items.resolutionis billed per second at its tier; withreference_images, only480p/720p.- The
durationandaspect_ratiodefaults are filled by the service, and billing follows the finishedduration_seconds. - Use
aspect_ratiofor the frame;ratiois rejected. reference_imagesis a top-level array, public HTTP(S) only, no Data URL /asset://; each reference image is billed separately.
ratio, frames, seed, camera_fixed, draft, draft_task, service_tier, generate_audio, watermark, and return_last_frame are rejected. Other unlisted fields (such as a top-level image) are not checked and do not act as references.
| Parameter | Values |
|---|---|
priority | integer 0–9 |
execution_expires_after | integer 3600–259200 (seconds) |
callback_url | valid HTTP(S) URL |
safety_identifier | 1–64 ASCII characters |
prioritysets the task priority.execution_expires_afterdoes not change HopBase's 24-hour stale-task cutoff.callback_urldoes not replace task polling; the payload shape is set by the service.safety_identifieris passed through.
The gateway has no count check for reference_images, and the maximum accepted has not been verified. This is not unlimited support; neither the image-edit limit of 2 nor Seedance's 9/30 applies.
Response
Video uses the same task envelope as Seedance; do not read a top-level id as for Kling.
Submit response
A successful submit returns 200 with the task ID in task.id (shaped like vt…):
{
"task": {
"id": "vtEXAMPLE",
"model": "grok-imagine-video-1.5",
"status": "pending",
"outputs": []
}
}Task query fields
Poll GET /v1/video/tasks/{task_id} with task.id.
| Field | Description |
|---|---|
task.id | HopBase task ID, vt… |
task.status | pending / processing / completed / failed |
task.outputs | Video URLs, a string array |
task.duration_seconds | Seconds of finished footage; billing follows it |
task.error.message | Failure reason |
usage.cost / usage.cost_usd / usage.currency | Actual charge once the task ends; see Video overview; cost_usd is the USD amount deducted from your balance and cost is the same charge in CNY |
Only completed and failed are terminal, so treat any other value as still running.
In progress
{
"task": {
"id": "vtEXAMPLE",
"model": "grok-imagine-video-1.5",
"status": "processing",
"outputs": [],
"error": null
}
}Succeeded
A completed task carries duration_seconds and the video URLs in outputs:
{
"task": {
"id": "vtEXAMPLE",
"model": "grok-imagine-video-1.5",
"status": "completed",
"duration_seconds": 5,
"outputs": [
"https://api.hop-base.com/example-signed-video.mp4"
],
"error": null
},
"usage": { "cost": 1.02, "cost_usd": 0.15, "currency": "CNY" }
}Failed
Execution failures still query as HTTP 200; check task.status and task.error.message:
{
"task": {
"id": "vtEXAMPLE",
"model": "grok-imagine-video-1.5",
"status": "failed",
"outputs": [],
"error": { "message": "<English failure reason>" }
}
}Minimal example
# 1. Submit
curl https://api.hop-base.com/v1/video/generate \
-H "Authorization: Bearer sk-your-key" \
-H "Content-Type: application/json" \
-d '{
"model": "grok-imagine-video-1.5",
"prompt": "An orange cat runs across sunlit grass as the camera follows",
"resolution": "720p",
"duration": 5,
"aspect_ratio": "16:9"
}'
# 2. Poll with the returned task.id
curl https://api.hop-base.com/v1/video/tasks/vt-your-task-id \
-H "Authorization: Bearer sk-your-key"Notes
outputsstays valid for 24 hours from completion; querying again does not extend it, and an expired URL returns 410. Download and save results promptly.- A moderated prompt fails the task with
content-moderatedinerror.message. - With
reference_images, the resolution can only be480p/720p. - Reference images must be public HTTP(S) URLs, and the maximum count has not been verified.
- Video is in a different group from images and chat; add the Grok Video group to your key to call it.
Common errors and fixes
Submission errors are 400 with only error.message (no code).
| Error starts with | Fix |
|---|---|
... requires resolution | Send resolution |
... does not support resolution 4k | Use one of the listed resolutions |
... duration must be an integer in 1-15 | Send an integer from 1 to 15 |
... does not support ratio | Use aspect_ratio instead |
aspect_ratio must be one of ... | Pick one of the listed ratios |
... does not support parameter generate_audio | Remove the field |
... only supports text segments in content | Put reference images in reference_images |
reference_images[0] must be a {"url": "..."} object | Write each item as {"url": …} |
reference_images[0].url must be a publicly reachable http(s) address | Use a public HTTP(S) URL |
... reference-to-video supports up to 720p | Remove the reference images, or choose 480p / 720p |
Task fails with content-moderated in error.message | Rewrite the prompt |
Full error texts:
grok-imagine-video-1.5 requires resolution: 480p / 720p / 1080p
model grok-imagine-video-1.5 does not support resolution 4k
grok-imagine-video-1.5 duration must be an integer in 1-15, got 20
grok-imagine-video-1.5 uses aspect_ratio for the frame ratio and does not support ratio
aspect_ratio must be one of 1:1 / 16:9 / 9:16 / 4:3 / 3:4 / 3:2 / 2:3, got 21:9
grok-imagine-video-1.5 does not support parameter generate_audio
grok-imagine-video-1.5 only supports text segments in content; use reference_images for reference images
reference_images[0] must be a {"url": "..."} object
reference_images[0].url must be a publicly reachable http(s) address
grok-imagine-video-1.5 reference-to-video supports up to 720p; remove the reference images or choose 480p/720p
priority must be within 0-9, got 12
execution_expires_after must be within 3600-259200 seconds
callback_url must be a valid http(s) URL
safety_identifier must be an ASCII string of 1-64 charactersBilling
Billing is per second of finished footage, priced by resolution tier; each reference image is billed separately. Failed tasks are not billed.
Once the task finishes, the query's top-level usage also carries cost_usd — the USD amount actually deducted from your balance for this task, 0 for an uncharged failure — cost (the same charge in CNY), and currency (always CNY). For the balance check at submission (402 when it falls short) and the other rules shared by every video task, see Video overview.
Official list prices are on the pricing page. Your own rate is the one shown in the signed-in Model Plaza, and each request's actual charge is on the Usage page in the console.
Next steps
- Grok Imagine images: generate and edit images
- Video overview: compare video families and the shared task flow
- Grok: Grok chat and reasoning models, including long-context pricing, reasoning-token billing, and server-side tool charges
- Error codes and retries: what each error code means and whether to retry