Grok Imagine
VideoNot available
Grok Imagine text-to-video generation.
- Type
- Text to Video
- Billed
- per sec
- Provider
- Grok
Pricing
/ sec480p$0.02 / sec
720p$0.04 / sec
Default duration: 6s
Supported parameters
modelSettings- Promptprompt
- Aspect Ratioaspect_ratio
- Durationduration
- Modemode
- Resolutionresolution
- Nsfw Checkernsfw_checker
Code examples
POST /v1/generationsGenerations 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": "TEXT_TO_VIDEO",
"prompt": "A serene mountain landscape at sunset",
"model": "grok/imagine",
"modelSettings": {
"aspect_ratio": "16:9",
"duration": "5",
"resolution": "1K"
}
},
)
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
Other generation types for this model
Frequently asked questions
How is Grok Imagine billed on ModelStack?expand_more
Grok Imagine (Text to Video) is billed at a flat, prepaid rate of $0.14 / 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 Text to Video, Grok Imagine also supports: Text to Image, Image to Image, Image Edit, Image to Video, Upscale, Extend.
Which parameters does Grok Imagine support?expand_more
Grok Imagine supports: Prompt, Aspect Ratio, Duration, Mode, Resolution, Nsfw Checker.
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 `TEXT_TO_VIDEO` — see the code example above.