grok-media

Generate and edit images and short videos using xAI Grok media APIs.

Updated Jul 16, 2026
One-click install
npx skills add https://github.com/X-manist/Cohmira --skill grok-media-x-manist
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: grok-media
Source: https://github.com/X-manist/Cohmira/tree/main/src/builtin-plugins/openmontage/.agents/skills/grok-media
Command: npx skills add https://github.com/X-manist/Cohmira --skill grok-media-x-manist

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Working with xAI's Grok image and video generation APIs requires knowing the correct endpoints, authentication headers, request fields, polling behavior, and pricing model. This Skill consolidates that operational knowledge so you can generate images, edit images, and create short videos without digging through API documentation. ## 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, including prompt structuring guidance. - Video Generation: Supports text-to-video, image-to-video, and reference-image video through POST /videos/generations with async polling on GET /videos/{request_id}. - Pricing and Failure Handling: Documents per-image and per-second pricing, plus explicit handling of failed and expired polling states. - Use Case: A content team wants a short product video featuring a specific person and jacket. They submit a reference-image video request mapping <IMAGE_1> to the person and <IMAGE_2> to the jacket, then poll until the status is done and download the 720p clip. ## Quick Start Use the grok-media skill to generate a 720p reference-image video from these two image URLs with a slow push-in camera motion.

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 /images/generations with model, prompt, n, aspect_ratio, and resolution fields. Authenticate with an Authorization header containing Bearer $XAI_API_KEY against the base URL https://api.x.ai/v1.

How do I create a video from reference images with Grok?

Submit a POST to /videos/generations with a reference_images array of image URLs, then poll GET /videos/{request_id} until status is done. Reference placeholders like <IMAGE_1> in the prompt map each source image to a role in the video.

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 influence who or what appears without locking the first frame, which suits product placement and identity consistency.

What resolutions and pricing does Grok video generation support?

Grok video outputs at 480p or 720p. Pricing is $0.05 per second at 480p and $0.07 per second at 720p, plus $0.002 per input image for image-conditioned requests.

Why does my Grok video request show an expired status?

The async polling endpoint can return failed or expired states after submission succeeds. Treat an expired status as a provider or runtime issue, preserve the endpoint, mode, and prompt summary in the error, and resubmit rather than silently switching providers.

When is Grok media generation not a good fit?

Grok video is best treated as short-form generation, so it is a weak fit for long-form clips, workflows relying on deterministic seeds, or prompts with multiple scene changes. Keep prompts to one shot, one motion idea, and one emotional beat.