Image · xAI

Grok Imagine

Image and video generation from text — text-to-image, image-to-video, and editing with audio.

Operational · 4 variants · desde $0.020
# Works with Claude Code, Codex, Gemini CLI, Cursor, and 50+ agents
npx skills add runapi-ai/grok-imagine -g
The -g flag installs globally so every project picks it up.
Or paste this prompt to your AI agent:
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.
RESUMEN

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
  • Las generaciones fallidas no se cobran
VARIANTES

Variantes

Variant Billing From
grok-imagine-edit-image call $0.040 Ver →
grok-imagine-image-to-video second $0.020 Ver →
grok-imagine-text-to-image call $0.040 Ver →
grok-imagine-text-to-video second $0.020 Ver →
PRECIOS

Utility endpoints

Shared endpoints for this model line, such as extension, enhancement, or conversion actions.

Extend video
$0.10-$0.30 / video
Extension length: 6s · Output resolution: 480p $0.10
Extension length: 6s · Output resolution: 720p $0.20
Extension length: 10s · Output resolution: 480p $0.20
Extension length: 10s · Output resolution: 720p $0.30
Upscale image
$0.10 / image
AGENT USAGE

Use this model from your agent

Prompt + SDK example
# 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.',
});
@runapi.ai/grok-imagine npm
CÓMO FUNCIONA

How to call this model

01

Install the skill

Add the model skill to your agent or install the SDK package.

02

Authenticate once

Use your RunAPI key for every supported model.

03

Send a request

Use the unified schema for the endpoint you need.

04

Receive output

Poll by task ID or handle the callback when the generation completes.

SDK QUICKSTART

SDK quickstart

runapi.ai
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."
)
@runapi.ai/grok-imagine v1
CONTEXTO

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.

Provider
xAI
Modality
Image
POR QUÉ RUNAPI

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.

FAQ

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?

Las generaciones fallidas no se cobran

Can agents use it directly?

Yes. Install the model skill and your agent gets the docs, schema, and examples.

EMPEZAR

Start building with Grok Imagine.