grok-media

Generates images and short videos using xAI Grok API endpoints.

Updated Sep 1, 2026
One-click install
npx skills add https://github.com/zamansepeti43/c-rak-agent --skill grok-media-zamansepeti43
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: grok-media
Source: https://github.com/zamansepeti43/c-rak-agent/tree/main/video-engine/.agents/skills/grok-media
Command: npx skills add https://github.com/zamansepeti43/c-rak-agent --skill grok-media-zamansepeti43

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Working with xAI's Grok media models requires knowing the correct endpoints, authentication headers, request fields, polling behavior, and pricing structure, which are easy to get wrong without a consolidated reference. ## Core Features & Use Cases - Image Generation and Editing: Covers text-to-image via POST /images/generations and single or multi-image editing via POST /images/edits with URL or base64 inputs. - Video Generation Modes: Documents text-to-video, image-to-video, and reference-image video using POST /videos/generations with async polling on GET /videos/{request_id}. - Prompting and Pricing Guidance: Provides Grok-specific prompt patterns, resolution constraints (480p/720p), per-image and per-second pricing, and failure-state handling. - Use Case: A developer building a product-placement clip can use reference-image video with placeholders like <IMAGE_1> to keep a character consistent while animating a short scene. ## Quick Start Use the grok-media skill to generate a 720p image-to-video clip from this product photo with a slow push-in camera move.

Frequently Asked Questions about grok-media

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate images with the xAI Grok API?

Send a POST request to https://api.x.ai/v1/images/generations with model grok-imagine-image, a prompt, and optional n, aspect_ratio, and resolution fields. Authenticate with an Authorization header containing Bearer $XAI_API_KEY.

How do I generate video from a reference image with Grok?

Use POST /videos/generations with model grok-imagine-video and a reference_images array of image URLs. Reference images influence who or what appears without locking the first frame, and prompts can cite inputs with placeholders like <IMAGE_1>.

What is the difference between image-to-video and reference-image video in Grok?

Image-to-video uses the image field to anchor the starting frame of the clip. Reference-image video uses reference_images to guide identity, wardrobe, or product appearance while leaving the first frame free.

Does Grok video generation support long-form clips?

No, Grok video is best treated as short-form generation at 480p or 720p resolution. It is a weak fit for long-form clips, deterministic seed control, and prompts with multiple scene changes.

Why did my Grok video request expire after submission?

Video generation is asynchronous, so you must poll GET /videos/{request_id} until status is done. If polling returns failed or expired, treat it as a provider/runtime issue and preserve the endpoint, mode, and prompt summary in the error.

How much does Grok image and video generation cost?

Images cost $0.02 each, plus $0.002 per input image for edits. Video costs $0.05 per second at 480p and $0.07 per second at 720p, plus $0.002 per input image for image-conditioned requests.