# Grok Imagine Video Edit - Core.Today AI API > Edit an existing video with xAI's Grok Imagine Video model. The output inherits the source video's duration, resolution (720p cap), and aspect ratio. - **Provider**: xAI - **Model ID**: xai/grok-imagine-video/edit - **Category**: Video Generation - **Credits**: 2790 per 15s (billing default when duration is omitted) — billed per second (186/s) - **Speed**: Medium - **Quality**: Standard ## Features - Prompt-based editing of an existing video - Output inherits source duration, resolution (720p cap), and aspect ratio - Synchronized audio preserved in output ## Use Cases - Adding effects (weather, lighting, mood) to generated clips - Style transfer on short clips - Iterating on Grok Imagine Video outputs without regenerating from scratch ## API Endpoint Base URL: https://api.core.today/v1 Create Prediction: POST /predictions Get Status: GET /predictions/{job_id} ## Authentication Header: X-API-Key: YOUR_API_KEY ## Input Parameters ### Required - **prompt**: string - Text prompt describing the edit. - **video**: string - Source video URL to edit. Output inherits its duration, resolution (720p cap) and aspect ratio. ### Optional - **duration**: integer (default: 15) - Billing hint - the length of your source video in seconds (1-15). xAI ignores this parameter; output always matches the source length. Omitting it bills the 15-second maximum. ## Examples ### Weather Effect Add falling snow to an existing clip ```json { "model": "xai/grok-imagine-video/edit", "input": { "prompt": "Add gentle falling snow to the scene", "video": "https://example.com/clip.mp4", "duration": 5 } } ``` ## Response Format ```json { "job_id": "abc123", "status": "pending | processing | completed | failed", "result": "URL or data (when completed)" } ``` ## Usage Flow 1. POST /predictions with model and input -> receive job_id 2. GET /predictions/{job_id} -> poll until status is completed or failed 3. Result contains output URL(s) ## Tips - Always pass duration matching your source video - omitting it bills the 15s maximum - Charged at the 720p rate regardless of source resolution (output caps at 720p) - For generating new videos, use xai/grok-imagine-video or xai/grok-imagine-video-1.5