POST
javascript
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 const axios = require('axios'); const fs = require('fs'); const path = require('path'); async function toB64(imgPath) { const data = fs.readFileSync(path.resolve(imgPath)); return Buffer.from(data).toString('base64'); } const api_key = "YOUR API-KEY"; const url = "https://api.segmind.com/v1/grok-imagine-video-1.5-preview"; const data = { "prompt": "A cat surfing a wave at sunset, cinematic slow motion", "image": "toB64('https://segmind-resources.s3.amazonaws.com/input/grok-imagine-video-1.5-preview-input-cat-surf.jpeg')", "duration": 6, "resolution": "480p", "aspect_ratio": "16:9" }; (async function() { try { const response = await axios.post(url, data, { headers: { 'x-api-key': api_key } }); console.log(response.data); } catch (error) { console.error('Error:', error.response.data); } })();
RESPONSE
image/jpeg
HTTP Response Codes
200 - OKImage Generated
401 - UnauthorizedUser authentication failed
404 - Not FoundThe requested URL does not exist
405 - Method Not AllowedThe requested HTTP method is not allowed
406 - Not AcceptableNot enough credits
500 - Server ErrorServer had some issue with processing

Attributes


promptstr *

Describe motion, camera moves and sound. Keep it short and motion-focused.


imageimage *

Image to animate, URL or base64. Match aspect ratio to image orientation.


durationint ( default: 6 ) Affects Pricing

Video length, 1-15 seconds, billed per output second. Use 6-10s for most clips.

min : 1,

max : 15


resolutionenum:str ( default: 480p ) Affects Pricing

Output resolution, 480p or 720p; higher costs more. Use 720p for hero assets.

Allowed values:


aspect_ratioenum:str ( default: 16:9 )

Output aspect ratio. 16:9 landscape, 9:16 social verticals, 1:1 square.

Allowed values:

To keep track of your credit usage, you can inspect the response headers of each API call. The x-remaining-credits property will indicate the number of remaining credits in your account. Ensure you monitor this value to avoid any disruptions in your API usage.

Grok Imagine Video 1.5 (Preview) — Image-to-Video Generation Model

Grok Imagine Video 1.5 Preview is xAI's latest image-to-video AI model. It turns a single still image into a fluid, cinematic video clip — with natively synchronized audio — guided by a natural-language prompt.

What is Grok Imagine Video 1.5?

Released in preview on May 30, 2026, Grok Imagine Video 1.5 animates a starting frame into up to 15 seconds of 24fps video at 480p or 720p. Give it an image and a prompt describing the motion, and it renders camera moves, atmosphere, and physics while staying faithful to the detail and lighting of your source image. It debuted at #1 on the Artificial Analysis Image-to-Video Arena leaderboard, ahead of Runway, Kling, and Veo.

Key Features

  • Native synchronized audio — dialogue, sound effects, ambient sound, and music are generated in the same inference pass, not added afterwards.
  • Source-image fidelity — the output continues your image rather than reinterpreting it, preserving subject, lighting, and composition.
  • Promptable camera direction — describe push-ins, pans, pacing, and sound design in plain language.
  • Flexible output — 1-15 second clips, 480p or 720p, and seven aspect ratios (16:9, 9:16, 1:1, 4:3, 3:4, 3:2, 2:3).
  • Fast generation — a 6-second clip typically renders in about 30 seconds.

Best Use Cases

Animate product shots into lifestyle video ads, turn concept art or storyboards into moving sequences, produce vertical 9:16 social clips with sound, and chain shots together — stage each frame as an image, animate it, and cut the clips into longer scenes with a consistent look.

Prompt Tips and Output Quality

The input image anchors the content, so keep prompts short and motion-focused: describe the camera move, the subject's action, and the soundscape. In our testing, outputs tracked the source image closely with coherent, dynamic motion and a clean synchronized audio track. Match the aspect ratio to your input image orientation for best framing.

FAQs

Does Grok Imagine Video 1.5 support text-to-video? No. An input image is required. Generate a frame with a text-to-image model first, then animate it.

Does it generate sound? Yes — audio is generated natively and synchronized with the video, a standout versus most image-to-video models.

How long can the videos be? 1 to 15 seconds per clip. Chain multiple shots for longer sequences.

What resolutions are supported? 480p and 720p at 24fps, across seven aspect ratios.

Can I control the camera? Yes. Describe camera moves like slow push-ins, pans, or tracking shots directly in the prompt.

How fast is it? A 6-second 480p clip generates in roughly 30 seconds via the Segmind API.