Output resolution
Supports 480p, 720p from the published endpoint schema.
Input image becomes frame 1; animates with motion + camera
curl -X POST https://runapi.ai/api/v1/grok_imagine/image_to_video \
-H "Authorization: Bearer $RUNAPI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "grok-imagine-image-to-video",
"image_url": "https://cdn.runapi.ai/public/samples/image.jpg",
"prompt": "Generate a short video of a robot hand placing a chess piece on a board, dramatic lighting, slow motion."
}'
import { GrokImagineClient } from "@runapi.ai/grok-imagine";
const client = new GrokImagineClient();
const result = await client.imageToVideo.run({
model: "grok-imagine-image-to-video",
image_url: "https://cdn.runapi.ai/public/samples/image.jpg",
prompt: "Generate a short video of a robot hand placing a chess piece on a board, dramatic lighting, slow motion.",
});
import os
import requests
response = requests.post(
"https://runapi.ai/api/v1/grok_imagine/image_to_video",
headers={"Authorization": f"Bearer {os.environ['RUNAPI_API_KEY']}"},
json={"model":"grok-imagine-image-to-video","image_url":"https://cdn.runapi.ai/public/samples/image.jpg","prompt":"Generate a short video of a robot hand placing a chess piece on a board, dramatic lighting, slow motion."}
)
response.raise_for_status()
<?php
$client = curl_init("https://runapi.ai/api/v1/grok_imagine/image_to_video");
curl_setopt_array($client, [
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("RUNAPI_API_KEY"), "Content-Type: application/json"],
CURLOPT_POSTFIELDS => json_encode([
'model' => 'grok-imagine-image-to-video',
'image_url' => 'https://cdn.runapi.ai/public/samples/image.jpg',
'prompt' => 'Generate a short video of a robot hand placing a chess piece on a board, dramatic lighting, slow motion.',
])
]);
$response = curl_exec($client);
RunApi client = new RunApi(System.getenv("RUNAPI_API_KEY"));
Task task = client.imageToVideo().run({"model":"grok-imagine-image-to-video","image_url":"https://cdn.runapi.ai/public/samples/image.jpg","prompt":"Generate a short video of a robot hand placing a chess piece on a board, dramatic lighting, slow motion."});
task.waitForResult();
require "runapi/grok_imagine"
client = RunApi::GrokImagine::Client.new
result = client.image_to_video.run(
model: "grok-imagine-image-to-video",
image_url: "https://cdn.runapi.ai/public/samples/image.jpg",
prompt: "Generate a short video of a robot hand placing a chess piece on a board, dramatic lighting, slow motion."
)
client := runapi.NewClient(os.Getenv("RUNAPI_API_KEY"))
task, err := client.imageToVideo.Run({"model":"grok-imagine-image-to-video","image_url":"https://cdn.runapi.ai/public/samples/image.jpg","prompt":"Generate a short video of a robot hand placing a chess piece on a board, dramatic lighting, slow motion."})
if err != nil { log.Fatal(err) }
task.Wait()
$ runapi generate \
--model grok-imagine-image-to-video \
--endpoint image_to_video \
--wait
7 versions available
Pick any model and generate in seconds.
| Provider | xAI |
| Model ID | grok-imagine-image-to-video |
| Modality | Video |
| Task types | Asynchronous |
| API endpoint | /api/v1/grok_imagine/image_to_video |
| Billing unit | second |
| Input parameters | aspect_ratio, callback_url, duration_seconds, enable_safety_checker, index, model, motion_style, output_resolution, prompt, reference_image_urls, source_image_url, source_task_id |
| Max resolution | 480p, 720p |
| Aspect ratios | 2:3, 3:2, 1:1, 16:9, 9:16 |
| Catalog status | Operational |
Sign up for free and create an API key for grok-imagine-image-to-video from the dashboard.
POST to /api/v1/grok_imagine/image_to_video with the grok-imagine-image-to-video model slug and your parameters.
Poll the task or follow the callback to retrieve the completed grok-imagine-image-to-video result.
Supports 480p, 720p from the published endpoint schema.
Configure 10 documented parameters, including aspect_ratio, duration_seconds, enable_safety_checker, index, motion_style.
Exposes 1 public endpoint(s): image_to_video.
Asynchronous tasks accept a callback URL for completion notifications.
indexZero-based source image index; used only with source_task_id.
promptOptional video generation prompt.
aspect_ratioOutput aspect ratio. (2:3, 3:2, 1:1, 16:9, 9:16)
callback_urlWebhook URL for terminal Task delivery.
motion_styleVideo motion style; spicy requires source_task_id. (fun, normal, spicy)
source_task_idPrior Grok Imagine text-to-image Task ID; provide this or source_image_url, but not both.
duration_secondsOutput duration in seconds.
source_image_urlPublic source image URL; provide this or source_task_id, but not both.
output_resolutionOutput resolution. (480p, 720p)
reference_image_urlsNot accepted by this model.
enable_safety_checkerEnable content safety checks.
Generate product launch clips and short-form ads from a text brief, cutting production from weeks to hours.
Convert lesson scripts into animated explainer videos at scale without a camera or crew.
Produce viral short-form content for social platforms directly from a prompt.
Verified customer feedback is not available for this model yet.
Pass the model ID shown in the quickstart.
Per-key rate limits scale with your usage tier. The pricing page shows current limits. If you need higher throughput, contact support to discuss tier upgrades.
Yes. Variant is a parameter in the request. Switch by changing the model ID — no code changes, no re-authentication, no separate billing setup. All variants share the same API key and request shape.
Where streaming is available, RunAPI streams end-to-end. LLM models support token-level streaming. Media models use async task polling or webhook callbacks for result delivery.
Open an issue on the public GitHub repo or email support at [email protected]. Include the task ID and model ID so the team can investigate the specific generation.
No. Your RunAPI API key is enough to access this variant and every other model in the catalog. You do not need accounts with the underlying provider.
We're here to help with enterprise setup, integrations, and technical questions.
Contact Us