Grok

Grok Imagine

Video
Not available
Generate Now

Grok Imagine video extension.

Type
Extend
Billed
per vid
Provider
Grok

Pricing

/ vid
Extend Times: 6$0.27 / vid
Extend Times: 10$0.45 / vid

Supported parameters

modelSettings
  • Promptprompt
  • Task Idtask_id
  • Extend Timesextend_times
  • Extend Atextend_at

Code examples

POST /v1/generations

Generations are async — the request returns immediately with an id; poll for the result.

python
import requests

response = requests.post(
    "https://api.modelstack.cc/v1/generations",
    headers={"Authorization": "Bearer sk_YOUR_API_KEY"},
    json={
        "type": "VIDEO_TO_VIDEO_EXTEND",
        "prompt": "A serene mountain landscape at sunset",
        "model": "grok/imagine"
    },
)
generation_id = response.json()["data"]["id"]

# Poll for the result
result = requests.get(
    f"https://api.modelstack.cc/v1/generations/{generation_id}",
    headers={"Authorization": "Bearer sk_YOUR_API_KEY"},
).json()
print(result["data"]["status"])

Related models

Frequently asked questions

How is Grok Imagine billed on ModelStack?expand_more
Grok Imagine (Extend) is billed at a flat, prepaid rate of $0.27 / img — generation pricing has no tier-based discounts. Final request costs are available in the console.
What other generation types does Grok Imagine support?expand_more
Besides Extend, Grok Imagine also supports: Text to Image, Image to Image, Image Edit, Text to Video, Image to Video, Upscale.
Which parameters does Grok Imagine support?expand_more
Grok Imagine supports: Prompt, Task Id, Extend Times, Extend At.
How can I generate with Grok Imagine?expand_more
Use the Generate composer in your dashboard, or call the API directly with model `grok/imagine` and type `VIDEO_TO_VIDEO_EXTEND` — see the code example above.