Skip to content
中文
Grok · Model API

Grok Imagine API

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

Text to VideoImage to VideoText to ImageImage to Image

Grok Imagine API documentation

Integrate Grok Imagine 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.

Get Task Details

GET/api/v1/jobs/recordInfo

Model IDs: grok-imagine/text-to-image

ParameterLocationType
taskId *querystring
Request example
curl -X GET 'https://api.vezapi.com/api/v1/jobs/recordInfo?taskId=YOUR_TASK_ID' \
  -H 'Authorization: Bearer YOUR_VEZAPI_KEY'
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, 433, 455, 500, 501, 505

msg
optional
string

Response message, error description upon failure

data
required
object
data.taskId
required
string

The task ID can be used with the "Get Task Details" endpoint to query the task status.

data.model
optional
string

The model used for this task (e.g., grok-imagine/text-to-image, seedream-4.0, kling-1.0)

data.state
optional
string

Current state of the task. Check state to determine the outcome.

Values: "waiting", "queuing", "generating", "success", "fail"

data.param
optional
string

JSON string containing the original request parameters used to create the task. Its `input` is itself a JSON string — parse it twice.

data.resultJson
optional
string

Result JSON string. Present when state is success; on failure it may be null or an empty string. The structure is as follows: - For images/media/videos: {resultUrls: []} - If return_last_frame is enabled on Seedance 2.x models: {resultUrls: [], lastFrameUrl: []} - For text output: {resultObject: {}} For OmniHuman series models: - OmniHuman 1.5 Subject Detection (subject detection model): response structure is {resultObject: {mask_urls: ["url1", "url2", ...]}}, returning a list of mask image URLs corresponding to the detected subjects. The URLs returned by this model are valid for 1 hour. - OmniHuman 1.5 Human Identification (human identification model): response structure is {resultObject: {subject_status: 1}}, where `subject_status` means 0 = no subject detected, 1 = subject detected, indicating whether a human subject is detected in the image.

data.response
optional
object

Parsed form of resultJson. Present only when state is success.

data.failCode
optional
string

Failure code (numeric string, e.g. "500"). Present when state is fail; on success it may be null or an empty string.

data.failMsg
optional
string

Failure reason. Present when state is fail; on success it may be null or an empty string.

data.costTime
optional
integer

Processing time in seconds. Present for both successful and failed tasks.

data.completeTime
optional
integer

Completion timestamp (Unix timestamp in milliseconds)

data.createTime
optional
integer

Creation timestamp (Unix timestamp in milliseconds)

data.creditsConsumed
optional
number

Credit consumption details for this task, indicating the actual number of credits deducted during task execution.

HTTP 401

Unauthorized - Invalid or missing API key

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, 433, 455, 500, 501, 505

msg
optional
string

Response message, error description upon failure

data
required
object
data.taskId
required
string

The task ID can be used with the "Get Task Details" endpoint to query the task status.

HTTP 422

Validation error.

ParameterTypeDescription & constraints
code
required
integer
msg
required
string
data
required
null

HTTP 429

Rate Limited - Too many requests

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, 433, 455, 500, 501, 505

msg
optional
string

Response message, error description upon failure

data
required
object
data.taskId
required
string

The task ID can be used with the "Get Task Details" endpoint to query the task status.

HTTP 500

Server error.

ParameterTypeDescription & constraints
code
required
integer

Response status code - **200**: Success - Request has been processed successfully - **401**: Unauthorized - Authentication credentials are missing or invalid - **402**: Insufficient Credits - Account does not have enough credits to perform the operation - **404**: Not Found - The requested resource or endpoint does not exist - **408**: Timeout - No result has been returned for over 10 minutes. - **422**: Validation Error - The request parameters failed validation checks - **429**: Rate Limited - Request limit has been exceeded for this resource - **455**: Service Unavailable - System is currently undergoing maintenance - **500**: Server Error - An unexpected error occurred while processing the request - **501**: Generation Failed - Content generation task failed - **505**: Feature Disabled - The requested feature is currently disabled

msg
required
string

Response message, error description when failed

data
required
object

Grok Imagine - Video Extend

POST/api/v1/jobs/createTask

Model IDs: grok-imagine/extend

ParameterTypeDescription & constraints
model
required
string

The model name to use for generation. Required field. - Must be `grok-imagine/extend` for this endpoint

Values: "grok-imagine/extend"

Default: "grok-imagine/extend"

callBackUrl
optional
string

Receive the URL for the update of the video extension task completion. It is optional but recommended to use in a production environment. - When the video expansion is completed, the system will POST the task status and results to this URL. - The callback includes the generated extended video URL and task information. - Your callback endpoint should accept a POST request with a JSON payload containing the video results. - Alternatively, you can poll the task status using the task details retrieval endpoint. - To ensure the security of the callback, please refer to the [Webhook Verification Guide] (/common-api/webhook-verification) for the implementation method of signature verification.

input
required
object

Input parameters for the video extension task

input.task_id
required
string

Task ID from a previously successful video generation task. Required field. - task_id must be a successful grok-imagine/text-to-video or grok-imagine/image-to-video task. - The original video generation must have completed successfully - Only VezAPI AI–generated task IDs are supported

maxLength: 100

input.prompt
required
string

Text instructions describing the required movement of the video. Required field. - Provide a detailed description of how you would like the video to expand and continue. - You can specify camera movements, scene changes, object actions, etc. - The more specific the prompt words are, the more likely the generated effect will match your expectations. - Supports input in both Chinese and English.

input.extend_at
required
number

Required. Time point in the source video, in seconds (minimum 2), from which the extension starts.

Default: 2

minimum: 2

input.extend_times
required
string

6 or 10 (seconds).

Values: "6", "10"

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/extend",
  "callBackUrl": "https://example.com/input.png",
  "input": {
    "task_id": "task_grok_12345678"
  }
}'
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, 433, 455, 500, 501, 505

msg
optional
string

Response message, error description upon failure

data
required
object
data.taskId
required
string

The task ID can be used with the "Get Task Details" endpoint to query the task status.

Grok Imagine - image to image

POST/api/v1/jobs/createTask

Model IDs: grok-imagine/image-to-image

ParameterTypeDescription & constraints
model
required
string

The model name to use for generation. Required field. - Must be `grok-imagine/image-to-image` for this endpoint

Values: "grok-imagine/image-to-image"

Default: "grok-imagine/image-to-image"

callBackUrl
optional
string

The URL to receive generation task completion updates. Optional but recommended for production use. - System will POST task status and results to this URL when generation completes - Callback includes generated content URLs and task information - Your callback endpoint should accept POST requests with JSON payload containing results - Alternatively, use the Get Task Details endpoint to poll task status - To ensure callback security, see [Webhook Verification Guide](/common-api/webhook-verification) for signature verification implementation

input
optional
object

Input parameters for the generation task

input.prompt
optional
string

A text description specifying the desired content or style of the generated image. (Max length: 390000 characters)

maxLength: 390000

input.image_urls
required
array

1–5 image URLs. (Use file URLs after upload, not raw file content. Accepted types: image/jpeg, image/png, image/webp. Max size: 10.0MB per image.) In your prompt, reference the uploaded image by typing @image(n) followed by a space (for example: @image1 a sunset over the ocean).

maxItems: 5

input.nsfw_checker
optional
boolean

Defaults to false. When false, no additional content filtering is applied and results are returned directly by the model.

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/image-to-image",
  "input": {
    "prompt": "Recreate the Titanic movie poster with two adorable anthropomorphic cats in the same romantic pose at the bow of the ship. The male cat is an orange tabby wearing a vest, standing behind a white long-haired female cat in a lace dress, holding her paws as they stretch forward in the wind. Both cats are photorealistic with detailed fur, wind-swept hair, and dramatic sunset lighting (warm golden highlights, cool blue shadows). Background: the Titanic ship at dusk with four smokestacks, glowing deck lights, calm ocean, and orange-pink sunset sky. Center title: “CATANIC” in the same gold metallic serif style as Titanic, same size and position.",
    "image_urls": [
      "https://example.com/input.png"
    ]
  }
}'
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, 433, 455, 500, 501, 505

msg
optional
string

Response message, error description upon failure

data
required
object
data.taskId
required
string

The task ID can be used with the "Get Task Details" endpoint to query the task status.

Grok Imagine Image to Video

POST/api/v1/jobs/createTask

Model IDs: grok-imagine/image-to-video

ParameterTypeDescription & constraints
model
required
string

The model name to use for generation. Required field. - Must be `grok-imagine/image-to-video` for this endpoint

Values: "grok-imagine/image-to-video"

Default: "grok-imagine/image-to-video"

callBackUrl
optional
string

The URL to receive video generation task completion updates. Optional but recommended for production use. - System will POST task status and results to this URL when video generation completes - Callback includes generated video URLs and task information - Your callback endpoint should accept POST requests with JSON payload containing video results - Alternatively, use the Get Task Details endpoint to poll task status - To ensure callback security, see [Webhook Verification Guide](/common-api/webhook-verification) for signature verification implementation

input
required
object

Input parameters for the video generation task

input.image_urls
optional
array

Provide an external image URL as a reference for video generation. Up to 7 images are supported. Do not use it simultaneously with task_id. In your prompt, reference an uploaded image by typing @image(n) followed by a space (for example: @image1 a sunset over the ocean). - Supports JPEG, PNG, and WEBP formats - Maximum file size for each image: 10MB - The Spicy mode is not available when using external images - The array can contain a maximum of seven URLs - Only one is supported when the resolution is 1080p.

maxItems: 7

input.task_id
optional
string

Task ID from a previously generated Grok image. Use with index to select a specific image. Do not use with image_urls. - Use task ID from grok-imagine/text-to-image generations - Supports all modes including Spicy - Maximum length: 100 characters

maxLength: 100

input.index
optional
integer

When using task_id, the 0-based index of the image to use. A grok-imagine/text-to-image task returns 2 images, so valid values are 0 and 1. Default 0. - Ignored if image_urls is provided

Default: 0

minimum: 0

maximum: 1

input.prompt
optional
string

Text prompt describing the desired video motion. Optional field. - Should be detailed and specific about the desired visual motion - Describe movement, action sequences, camera work, and timing - Include details about subjects, environments, and motion dynamics - Maximum length: 5000 characters - Supports English language prompts

input.mode
optional
string

Specifies the generation mode affecting the style and intensity of motion. Note: Spicy mode is not available for external image inputs. - **fun**: More creative and playful interpretation - **normal**: Balanced approach with good motion quality - **spicy**: More dynamic and intense motion effects (not available for external images) Default: normal

Values: "fun", "normal", "spicy"

Default: "normal"

input.duration
optional
string

The duration of the generated video (in seconds) (6-30). (Minimum: 6, Maximum: 30, Step: 1)

input.resolution
optional
string

The resolution of the generated video.

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

Default: "480p"

input.aspect_ratio
optional
string

Image ratio selection only applies to multi-image generation mode. In single-image mode, the video width and height are referenced to the image width and height.

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

Default: "16:9"

input.nsfw_checker
optional
boolean

Defaults to false. When false, no additional content filtering is applied and results are returned directly by the model.

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/image-to-video",
  "callBackUrl": "https://example.com/input.png",
  "input": {
    "image_urls": [
      "https://example.com/input.png"
    ],
    "prompt": "POV hand comes into frame handing the girl a cup of take away coffee, the girl steps out of the screen looking tired, then takes it and she says happily: \"thanks! Back to work\" she exits the frame and walks right to a different part of the office.",
    "mode": "normal"
  }
}'
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, 433, 455, 500, 501, 505

msg
optional
string

Response message, error description upon failure

data
required
object
data.taskId
required
string

The task ID can be used with the "Get Task Details" endpoint to query the task status.

Grok Imagine - Text to Image

POST/api/v1/jobs/createTask

Model IDs: grok-imagine/text-to-image

ParameterTypeDescription & constraints
model
required
string

The model name to use for generation. Required field. - Must be `grok-imagine/text-to-image` for this endpoint

Values: "grok-imagine/text-to-image"

Default: "grok-imagine/text-to-image"

callBackUrl
optional
string

The URL to receive image generation task completion updates. Optional but recommended for production use. - System will POST task status and results to this URL when image generation completes - Callback includes generated image URLs and task information - Your callback endpoint should accept POST requests with JSON payload containing image results - Alternatively, use the Get Task Details endpoint to poll task status - To ensure callback security, see [Webhook Verification Guide](/common-api/webhook-verification) for signature verification implementation

input
required
object

Input parameters for the image generation task

input.prompt
required
string

Text prompt describing the desired image. Required field. - Should be detailed and specific about the desired visual elements - Describe composition, style, lighting, mood, and other visual details - Maximum length: 5000 characters - Supports English language prompts

input.aspect_ratio
required
string

Required. Aspect ratio of the output image: 2:3, 3:2, 1:1, 16:9, 9:16.

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

input.nsfw_checker
optional
boolean

Defaults to false. When false, no additional content filtering is applied and results are returned directly by the model.

input.enable_pro
optional
boolean

Controls the request processing strategy. - `false`: Corresponds to **speed mode**. The system prioritizes response time and throughput, suitable for latency-sensitive scenarios. - `true`: Corresponds to **quality mode**. The system prioritizes processing quality and precision, suitable for scenarios requiring higher accuracy.

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/text-to-image",
  "callBackUrl": "https://example.com/input.png",
  "input": {
    "prompt": "Cinematic portrait of a woman sitting by a vinyl record player, retro living room background, soft ambient lighting, warm earthy tones, nostalgic 1970s wardrobe, reflective mood, gentle film grain texture, shallow depth of field, vintage editorial photography style.",
    "aspect_ratio": "3:2"
  }
}'
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, 433, 455, 500, 501, 505

msg
optional
string

Response message, error description upon failure

data
required
object
data.taskId
required
string

The task ID can be used with the "Get Task Details" endpoint to query the task status.

Grok Imagine Text to Video

POST/api/v1/jobs/createTask

Model IDs: grok-imagine/text-to-video

ParameterTypeDescription & constraints
model
required
string

The model name to use for generation. Required field. - Must be `grok-imagine/text-to-video` for this endpoint

Values: "grok-imagine/text-to-video"

Default: "grok-imagine/text-to-video"

callBackUrl
optional
string

The URL to receive video generation task completion updates. Optional but recommended for production use. - System will POST task status and results to this URL when video generation completes - Callback includes generated video URLs and task information - Your callback endpoint should accept POST requests with JSON payload containing video results - Alternatively, use the Get Task Details endpoint to poll task status - To ensure callback security, see [Webhook Verification Guide](/common-api/webhook-verification) for signature verification implementation

input
required
object

Input parameters for the video generation task

input.prompt
required
string

Text prompt describing the desired video motion. Required field. - Should be detailed and specific about the desired visual motion - Describe movement, action sequences, camera work, and timing - Include details about subjects, environments, and motion dynamics - Maximum length: 5000 characters - Supports English language prompts

input.aspect_ratio
optional
string

Specifies the width-to-height ratio of the generated video. Controls the aspect ratio of the output. - **2:3**: Portrait orientation (vertical) - **3:2**: Landscape orientation (horizontal) - **1:1**: Square format - **16:9**: Wide screen format - **9:16**: Tall screen format Default: 2:3

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

Default: "2:3"

input.mode
optional
string

Specifies the generation mode affecting the style and intensity of motion. - **fun**: More creative and playful interpretation - **normal**: Balanced approach with good motion quality - **spicy**: More dynamic and intense motion effects Default: normal

Values: "fun", "normal", "spicy"

Default: "normal"

input.duration
optional
number

The duration of the generated video (in seconds) (6-30). (Minimum: 6, Maximum: 30, Step: 1)

input.resolution
optional
string

The resolution of the generated video.

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

Default: "480p"

input.nsfw_checker
optional
boolean

Defaults to false. When false, no additional content filtering is applied and results are returned directly by the model.

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/text-to-video",
  "callBackUrl": "https://example.com/input.png",
  "input": {
    "prompt": "A couple of doors open to the right one by one randomly and stay open, to show the inside, each is either a living room, or a kitchen, or a bedroom or an office, with little people living inside.",
    "aspect_ratio": "2:3",
    "mode": "normal"
  }
}'
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, 433, 455, 500, 501, 505

msg
optional
string

Response message, error description upon failure

data
required
object
data.taskId
required
string

The task ID can be used with the "Get Task Details" endpoint to query the task status.

Grok Imagine - Video Upscale

POST/api/v1/jobs/createTask

Model IDs: grok-imagine/upscale

ParameterTypeDescription & constraints
model
required
string

The model name to use for generation. Required field. - Must be `grok-imagine/upscale` for this endpoint

Values: "grok-imagine/upscale"

Default: "grok-imagine/upscale"

callBackUrl
optional
string

The URL to receive video upscaling task completion updates. Optional but recommended for production use. - System will POST task status and results to this URL when upscaling completes - Callback includes generated upscaled video URLs and task information - Your callback endpoint should accept POST requests with JSON payload containing video results - Alternatively, use the Get Task Details endpoint to poll task status - To ensure callback security, see [Webhook Verification Guide](/common-api/webhook-verification) for signature verification implementation

input
required
object

Input parameters for the video upscaling task

input.task_id
required
string

Task ID from a previously successful video generation task. Required field. - task_id must be a successful grok-imagine/text-to-video or grok-imagine/image-to-video task. - The original video generation must have completed successfully - Only VezAPI AI–generated task IDs are supported

maxLength: 100

input.resolution
optional
string

Video generation resolution.

Values: "720p", "1080p"

Default: "720p"

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/upscale",
  "callBackUrl": "https://example.com/input.png",
  "input": {
    "task_id": "task_grok_12345678"
  }
}'
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, 433, 455, 500, 501, 505

msg
optional
string

Response message, error description upon failure

data
required
object
data.taskId
required
string

The task ID can be used with the "Get Task Details" endpoint to query the task status.

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 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/extend, 10s 720p45per video$0.45
grok-imagine/extend, 10s 480p24per video$0.24
grok-imagine/extend, 6s 720p27per video$0.27
grok-imagine/extend, 6s 480p14.4per video$0.144
grok-imagine, upscale, 720P → 1080P20per upscale$0.2
grok-imagine, upscale, 480P → 1080P30per upscale$0.3
grok-imagine, text-to-video, 1080p8per second$0.08
grok-imagine, image-to-video, 1080p8per second$0.08
grok-imagine, text-to-image(quality)5per generation$0.05
grok-imagine, image-to-video, 720p4.5per second$0.045
grok-imagine, text-to-video, 720p4.5per second$0.045
grok-imagine, image-to-video, 480p2.4per second$0.024
grok-imagine, text-to-video, 480p2.4per second$0.024
grok-imagine, image-to-image4per generation$0.04
grok-imagine, text-to-image4.0per 2 images$0.04
grok-imagine, upscale, 480p→720p10.0per upscale$0.1