Skip to content
中文
Grok · Model API

Grok Imagine Video API

Grok Imagine Video 1.5 API with VezAPI. Explore model capabilities, credit pricing, request parameters, and integration examples.

Image to Video

Grok Imagine Video 1.5 API documentation

Integrate Grok Imagine Video 1.5 with your VezAPI key. The operations below share the same authentication and account balance.

Base URL: https://api.vezapi.com
Send Authorization: Bearer YOUR_VEZAPI_KEY. Use a unique Idempotency-Key for each submission; reuse it only when checking the same request.

Grok Imagine Video 1.5 Preview

POST/api/v1/jobs/createTask

Model IDs: grok-imagine-video-1-5-preview

ParameterTypeDescription & constraints
model
required
string

The model name used for generation. This endpoint must use `grok-imagine-video-1-5-preview`.

Values: "grok-imagine-video-1-5-preview"

Default: "grok-imagine-video-1-5-preview"

callBackUrl
optional
string

Optional callback URL for task completion notifications. If provided, the system will send a POST request to this URL when the task completes.

input
required
object

Input parameters for the generation task.

input.prompt
optional
string

Prompt for video generation. Maximum length: 4096 characters. Use `@imageN` in the prompt to reference an image from `image_urls`, where N is the 1-based index of the image. For example, `@image1` refers to the first image in the array.

maxLength: 4096

input.image_urls
required
array

Upload image files to be used as API input. Supported file types: image/jpeg, image/png, image/webp, image/jpg. Maximum file size: 20MB. Supports multi-file upload, up to 1 file.Only one is supported when the resolution is 1080p.

maxItems: 1

input.aspect_ratio
optional
string

Aspect ratio for video generation.

Values: "1:1", "16:9", "9:16", "4:3", "3:4", "3:2", "2:3", "auto"

Default: "auto"

input.resolution
optional
string

Resolution for video generation.

Values: "480p", "720p", "1080p"

Default: "480p"

input.duration
optional
integer

Video duration in seconds. Range: [1, 15]. Default: 8. Minimum: 1. Maximum: 15. Step: 1.

Default: 8

minimum: 1

maximum: 15

input.first_frame_url
optional
string

First-frame image. Can be passed together with image_urls, or sent on its own.

input.last_frame_url
optional
string

Last-frame image.

input.loop_url
optional
string

Loop image used as both the start and end of the video. Cannot be sent together with a different first-frame or last-frame image.

input.keyframes
optional
array

Mid-video keyframes, up to 4. Each item must include url and timestamp_s (in seconds). Each timestamp must be greater than 0 and less than duration, and any two keyframes must be at least 1/3 second apart.

maxItems: 4

input.keyframes[].url
required
string

image url.

input.keyframes[].timestamp_s
required
integer

time stamp.

input.enable_audio
optional
boolean

Whether to generate audio. Defaults to true.

input.nsfw_checker
optional
boolean

Defaults to false. You can set it to false based on your needs. If set to false, our content filtering will be disabled, and all results will be returned directly by the model itself.

Request example
curl -X POST 'https://api.vezapi.com/api/v1/jobs/createTask' \
  -H 'Authorization: Bearer YOUR_VEZAPI_KEY' \
  -H 'Idempotency-Key: your-unique-request-id' \
  -H 'Content-Type: application/json' \
  -d '{
  "model": "grok-imagine-video-1-5-preview",
  "input": {
    "prompt": "Your prompt",
    "image_urls": [
      "https://example.com/input.png"
    ],
    "aspect_ratio": "auto",
    "resolution": "480p",
    "duration": 8
  }
}'
Responses and errors

HTTP 200

Request successful.

ParameterTypeDescription & constraints
code
optional
integer

Status code of the request. The HTTP status is 200 even when the request fails, so always check this field: 200 means success; any other value means the request failed and msg describes the reason. Common values: 401 invalid or missing API key; 402 insufficient credits; 429 rate limit exceeded; 422 or 500 the request could not be processed (read msg and check your parameters before retrying).

Values: 200, 401, 402, 404, 422, 429, 455, 500, 501, 505

msg
optional
string

Response message, error description when failed

data
required
object
data.taskId
optional
string

Task ID, can be used with Get Task Details endpoint to query task status

data.recordId
optional
string

Record ID, can be used to get the record details

Task status and callbacks

For asynchronous tasks, keep the returned taskId. Query GET /api/v1/jobs/recordInfo?taskId=... or provide callBackUrl when creating the task. Only the account that created a task can access it or derive new resources from it.

A timeout can mean the submission was accepted. Inspect the existing request in your dashboard; do not create another task automatically. Callback delivery is retried and may arrive more than once. Deduplicate with X-VezAPI-Event-Id.

Files, logs and billing

Generated media normally follows a 14-day provider lifetime; uploaded files expire after 24 hours. Save the files you need before expiration. VezAPI streams registered files without keeping a permanent media library. Request logs are retained for two calendar months.

Credits are reserved before submission. Final deductions match actual discounted consumption one for one. Unknown usage pauses new paid requests. If available funds cannot cover final usage while protecting other reservations, settlement stays pending until funded; model usage cannot make the wallet negative. Time-based inputs require server-side metadata reads; a failed read prevents submission.

Open full documentation →

Grok Imagine Video 1.5 API pricing

Rates below are reference estimates; final deductions equal actual discounted consumption, one for one. At the standard pack rate, 1,000 credits ≈ $10. Larger packs reduce the effective credit price.

SpecificationCreditsUnitUSD reference
grok-imagine-video-1-5-preview, 1080p8per second$0.08
grok-imagine-video-1-5-preview, 720p4.5per second$0.045
grok-imagine-video-1-5-preview, 480p2.4per second$0.024