# Grok Imagine Video > Generate videos using xAI's Grok Imagine Video model - **Provider**: replicate - **Model ID**: xai/grok-imagine-video - **Category**: video_generation - **Credits**: 580 per request - **Pricing Type**: input_based ## API Endpoint Base URL: https://api.core.today/v1 ### Create Prediction POST /predictions ### Get Status GET /predictions/{job_id} ### Cancel DELETE /predictions/{job_id} ## Authentication Header: `X-API-Key: YOUR_API_KEY` ## Input Parameters - `duration` (integer, optional): Duration of the video in seconds (1-15). Ignored when editing a video. (Default: `5`; Range: min: 1, max: 15) - `video` (string, optional): Input video to edit (video editing mode). Must be a direct link, max 8.7 seconds. Supports mp4, mov, webm. - `prompt` (string, **required**): Text prompt for video generation - `aspect_ratio` (string, optional): Aspect ratio of the video. For text-to-video, defaults to 16:9. For image-to-video, defaults to the input image's native aspect ratio. Ignored when editing a video. (Default: `auto`; Options: `auto`, `16:9`, `4:3`, `1:1`, `9:16`, `3:4`, `3:2`, `2:3`) - `resolution` (string, optional): Resolution of the video. Ignored when editing a video. (Default: `720p`; Options: `720p`, `480p`) - `image` (string, optional): Input image to generate video from (image-to-video). Supports jpg, jpeg, png, webp. ## Example Request ```json { "model": "xai/grok-imagine-video", "input": { "duration": 5, "aspect_ratio": "16:9", "prompt": "a penguin walks away from the camera, towards a large snowy mountaintop in the distance", "resolution": "720p" } } ``` ## Response Format ```json { "job_id": "abc123", "status": "pending", "provider": "replicate", "model": "black-forest-labs/flux-schnell", "created_at": "2026-01-01T00:00:00Z", "result": null, "error": null } ``` Status values: `pending`, `processing`, `completed`, `failed`, `cancelled` ## Usage Flow 1. POST /predictions with model and input → receive job_id 2. Poll GET /predictions/{job_id} until status is `completed` or `failed` 3. Result contains output URL(s) or data ## Output Type url ## Tags xai, grok, video-generation, text-to-video, image-to-video, video-editing ## Documentation https://replicate.com/xai/grok-imagine-video