Grok Imagine
Image and video generation from text — text-to-image, image-to-video, and editing with audio.
# Works with Claude Code, Codex, Gemini CLI, Cursor, and 50+ agents
npx skills add runapi-ai/grok-imagine -g
Install the Grok Imagine skill for me: 1. Clone https://github.com/runapi-ai/grok-imagine 2. Copy the skills/grok-imagine/ directory into your user-level skills directory (e.g. ~/.claude/skills/ for Claude Code, ~/.codex/skills/ for Codex). 3. Verify that SKILL.md is present. 4. Confirm the install path when done.
Grok Imagine is xAI's image and video generation suite covering text-to-image, edit-image, text-to-video, and image-to-video. It integrates with xAI's Grok intelligence to interpret complex, nuanced prompts.
- Installable agent skill
- Unified API key
- SDK examples included
- Gerações com falha não são cobradas
Variantes
Utility endpoints
Shared endpoints for this model line, such as extension, enhancement, or conversion actions.
Use this model from your agent
# User prompt to the agent
"Generate a short video of a robot hand placing a chess piece on a board, dramatic lighting, slow motion."
// Code generated by the agent via @runapi.ai/grok-imagine
import { GrokImagineClient } from '@runapi.ai/grok-imagine';
const client = new GrokImagineClient();
const result = await client.editImage.run({
model: 'grok-imagine-edit-image',
prompt: 'Generate a short video of a robot hand placing a chess piece on a board, dramatic lighting, slow motion.',
});
How to call this model
Install the skill
Add the model skill to your agent or install the SDK package.
Authenticate once
Use your RunAPI key for every supported model.
Send a request
Use the unified schema for the endpoint you need.
Receive output
Poll by task ID or handle the callback when the generation completes.
SDK quickstart
curl -X POST https://runapi.ai/api/v1/grok_imagine/edit_image \
-H "Authorization: Bearer $RUNAPI_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "grok-imagine-edit-image",
"image_url": "https://cdn.runapi.ai/public/samples/image.jpg",
"prompt": "Generate a short video of a robot hand placing a chess piece on a board, dramatic lighting, slow motion."
}'
import { GrokImagineClient } from "@runapi.ai/grok-imagine";
const client = new GrokImagineClient();
const result = await client.editImage.run({
model: "grok-imagine-edit-image",
image_url: "https://cdn.runapi.ai/public/samples/image.jpg",
prompt: "Generate a short video of a robot hand placing a chess piece on a board, dramatic lighting, slow motion.",
});
require "runapi/grok_imagine"
client = RunApi::GrokImagine::Client.new
result = client.edit_image.run(
model: "grok-imagine-edit-image",
image_url: "https://cdn.runapi.ai/public/samples/image.jpg",
prompt: "Generate a short video of a robot hand placing a chess piece on a board, dramatic lighting, slow motion."
)
Where Grok Imagine fits
Grok Imagine is xAI's creative AI suite built on Grok, covering image and video generation. Through RunAPI, all Grok Imagine endpoints share a single API key.
Why use Grok Imagine through RunAPI
One API key
Use the same credentials across models and providers.
Agent-ready
Installable skills include docs and schema for tool calls.
Predictable billing
Usage-based pricing is visible before you call.
Frequently asked questions
How do I call this model?
Use the RunAPI SDK, CLI, or REST endpoint shown on this page.
Do failed generations cost money?
Gerações com falha não são cobradas
Can agents use it directly?
Yes. Install the model skill and your agent gets the docs, schema, and examples.