X Ai Grok Imagine Video Edit Video
Playground
Try it on WavespeedAI!X-AI Grok Imagine Video Edit enables video editing using xAI’s Grok Imagine Video model. Transform and modify existing videos with text prompts for seamless AI-powered edits. Ready-to-use REST inference API, best performance, no coldstarts, affordable pricing.
Features
Grok Imagine Video Edit
Grok Imagine Video Edit is X-AI’s video editing model that transforms existing videos based on text prompts. Upload your source video and describe the style or changes you want — the model applies edits across all frames with temporal consistency.
Why Choose This?
-
Text-driven video editing Modify videos using natural language instructions for intuitive control.
-
Style transformation Apply artistic styles like anime, cartoon, or cinematic looks to existing footage.
-
Temporal consistency Maintains visual coherence across frames for smooth, flicker-free results.
-
Resolution options Output in 480p or 720p based on your needs.
-
Prompt Enhancer Built-in tool to automatically improve your editing instructions.
Parameters
| Parameter | Required | Description |
|---|---|---|
| prompt | Yes | Text instruction describing the desired edit |
| video | Yes | Source video to edit (URL or upload) |
| resolution | No | Output resolution: 480p (default), 720p |
How to Use
- Upload your video — provide the source video you want to edit.
- Write your prompt — describe the style or changes you want.
- Select resolution — choose 480p or 720p output.
- Run — submit and download your edited video.
Pricing
| Duration | Cost |
|---|---|
| Per second | $0.065 |
Billing Rules
- Minimum charge: 1 second
- Maximum charge: 8 seconds (videos longer than 8s are capped at $0.52)
- Total cost = min(video_duration, 8) × $0.065
Examples
- 1s video → $0.065
- 5s video → $0.325
- 8s video → $0.52
- 10s video → $0.52 (capped at 8s)
Best Use Cases
- Style Transfer — Convert real footage to anime, cartoon, or artistic styles.
- Content Transformation — Apply cinematic looks or visual effects to videos.
- Social Media Content — Create eye-catching stylized videos for posts and reels.
- Creative Projects — Experiment with different visual styles on existing footage.
- Rapid Prototyping — Test style concepts before full production.
Pro Tips
- Use the Prompt Enhancer to refine your editing instructions.
- Be specific about the target style (e.g., “anime style with vibrant colors” instead of just “animate”).
- Use 480p for faster processing and drafts, 720p for final output.
- Keep videos under 8 seconds for cost efficiency.
- Use high-quality source videos for better editing results.
Notes
- Both prompt and video are required fields.
- Maximum billable duration is 8 seconds.
- Ensure uploaded video URLs are publicly accessible.
- For best results, use clear and specific style instructions.
Related Models
- Grok Imagine Image Text-to-Image — Generate images from text prompts.
- Grok Imagine Image Edit — Edit images with text instructions.
Authentication
For authentication details, please refer to the Authentication Guide.
API Endpoints
Submit Task & Query Result
# Submit the task
curl --location --request POST "https://api.wavespeed.ai/api/v3/x-ai/grok-imagine-video/edit-video" \
--header "Content-Type: application/json" \
--header "Authorization: Bearer ${WAVESPEED_API_KEY}" \
--data-raw '{
"resolution": "480p"
}'
# Get the result
curl --location --request GET "https://api.wavespeed.ai/api/v3/predictions/${requestId}/result" \
--header "Authorization: Bearer ${WAVESPEED_API_KEY}"
Parameters
Task Submission Parameters
Request Parameters
| Parameter | Type | Required | Default | Range | Description |
|---|---|---|---|---|---|
| prompt | string | Yes | - | Text description of the desired edit. | |
| video | string | Yes | - | URL of the input video to edit. Video will be resized to max 854x480 pixels and truncated to 8 seconds. | |
| resolution | string | No | 480p | 480p, 720p | Resolution of the output video. |
Response Parameters
| Parameter | Type | Description |
|---|---|---|
| code | integer | HTTP status code (e.g., 200 for success) |
| message | string | Status message (e.g., “success”) |
| data.id | string | Unique identifier for the prediction, Task Id |
| data.model | string | Model ID used for the prediction |
| data.outputs | array | Array of URLs to the generated content (empty when status is not completed) |
| data.urls | object | Object containing related API endpoints |
| data.urls.get | string | URL to retrieve the prediction result |
| data.has_nsfw_contents | array | Array of boolean values indicating NSFW detection for each output |
| data.status | string | Status of the task: created, processing, completed, or failed |
| data.created_at | string | ISO timestamp of when the request was created (e.g., “2023-04-01T12:34:56.789Z”) |
| data.error | string | Error message (empty if no error occurred) |
| data.timings | object | Object containing timing details |
| data.timings.inference | integer | Inference time in milliseconds |
Result Request Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| id | string | Yes | - | Task ID |
Result Response Parameters
| Parameter | Type | Description |
|---|---|---|
| code | integer | HTTP status code (e.g., 200 for success) |
| message | string | Status message (e.g., “success”) |
| data | object | The prediction data object containing all details |
| data.id | string | Unique identifier for the prediction, the ID of the prediction to get |
| data.model | string | Model ID used for the prediction |
| data.outputs | string | Array of URLs to the generated content. |
| data.urls | object | Object containing related API endpoints |
| data.urls.get | string | URL to retrieve the prediction result |
| data.status | string | Status of the task: created, processing, completed, or failed |
| data.created_at | string | ISO timestamp of when the request was created (e.g., “2023-04-01T12:34:56.789Z”) |
| data.error | string | Error message (empty if no error occurred) |
| data.timings | object | Object containing timing details |
| data.timings.inference | integer | Inference time in milliseconds |