img_uuid, and retrieve the completed video by polling or HTTPS callback. GoEnhance is not xAI, and this is not the official xAI API.Grok Imagine API
Access Grok Imagine through the independent GoEnhance API. Submit a prompt with an optional reference image, save the returned
Create an API Key
Two Grok Imagine Video Workflows
Generate Video from a Prompt
Set model to grok_imagine and provide a required prompt. Without image_url, the endpoint runs text-to-video and lets you choose a supported aspect ratio.

Animate a Reference Image
Add one public image_url to guide the generated clip. In image-to-video mode, framing comes from the reference image, so the request's ratio value is ignored.

Build requests from the values documented for the GoEnhance route.
Grok Imagine API Parameters
Unified Endpoint
Send bearer-authenticated POST requests to <code>https://api.goenhance.ai/api/v1/videos/generations</code>.
Exact Model ID
Set the required <code>model</code> field to <code>grok_imagine</code>.
Required Prompt
Provide a text <code>prompt</code> describing the scene and desired motion.
Optional Reference Image
Add one accessible <code>image_url</code> for image-to-video, or omit it for text-to-video.
Duration and Resolution
Choose a 6- or 10-second duration and either <code>480p</code> or <code>720p</code> output.
Aspect Ratio
For text-to-video, choose <code>auto</code>, <code>1:1</code>, <code>16:9</code>, <code>9:16</code>, <code>3:2</code>, or <code>2:3</code>.
Transparent per-second rates for the independent GoEnhance endpoint.
Grok Imagine API Pricing
480p: 0.52 tokens/s
Current GoEnhance documentation lists 480p at 0.52 tokens per generated second, equivalent to $0.0104 per second at $0.02 per token.
720p: 0.975 tokens/s
Current GoEnhance documentation lists 720p at 0.975 tokens per generated second, equivalent to $0.0195 per second at $0.02 per token.
Duration-Based Cost
Estimate Grok Imagine API pricing by multiplying the selected per-second rate by 6 or 10 seconds. Check the live API reference before budgeting a large run.
Integrate Grok Imagine in Three Steps
1
1. Build the Request
Send
model: grok_imagine and a prompt, then select duration and resolution. Add image_url only when you want image-to-video. 2
2. Save the Task ID
Validate the HTTP response and JSON
code/msg, then persist data.img_uuid with your application job. 3
3. Resolve the Result
Poll
/api/v1/jobs/detail?img_uuid=... or provide a public HTTPS custom_callback_url and handle processing, success, and failed states.Apply prompt-driven or reference-guided video generation to repeatable product workflows.
Grok Imagine API Use Cases
Marketing Clips
Generate short landscape, portrait, or square concepts from structured campaign prompts.
Reference Animation
Turn an approved still image into a short motion asset while preserving its initial framing.
Product Prototypes
Create brief motion studies for product concepts before a full production workflow.
Social Variations
Queue separate aspect-ratio and prompt variants for different content placements.
Storyboard Motion Tests
Explore camera movement and scene pacing from concise creative directions.
Automated Creative Pipelines
Submit traceable generation jobs from a backend, then store results when polling or callbacks reach success.
Answers about integration, pricing, async delivery, and the distinction from the official xAI API.
