Video · xAI

Grok Imagine API

Grok Imagine API access for image and video generation from text, including text-to-image, image-to-image, text-to-video, and image-to-video.

Operationeel · 6 variants · vanaf $0.020
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-video-1.5-fast",
  "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-video-1.5-fast",
    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.",
});
<?php

require __DIR__ . "/vendor/autoload.php";

use RunApi\GrokImagine\GrokImagineClient;

$client = new GrokImagineClient();
$result = $client->editImage->run([
        'model' => 'grok-imagine-video-1.5-fast',
        '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-video-1.5-fast",
    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."
)
npx skills add runapi-ai/grok-imagine -g
# Claude Code
claude mcp add runapi -s user -- npx -y @runapi.ai/mcp

# Codex
codex plugin install runapi-mcp@agents

# Cursor / Windsurf / VS Code
npx @runapi.ai/mcp init cursor
@runapi.ai/grok-imagine v1
OVERVIEW

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.

  • Meerdere varianten voor verschillende snelheid-/kwaliteitsniveaus
  • Modelskill bevat docs, schema's en setupnotities
  • Werkt met appgerichte codeerworkflows
  • Mislukte generaties worden niet in rekening gebracht
VARIANTS

Vergelijk alle API-varianten

Variant Billing From
grok-imagine-edit-image call $0.040 Bekijken →
grok-imagine-image-to-video second $0.020 Bekijken →
grok-imagine-text-to-image call $0.040 Bekijken →
grok-imagine-text-to-video second $0.020 Bekijken →
grok-imagine-video-1.5-fast call $0.750 Bekijken →
grok-imagine-video-1.5-preview second $0.020 Bekijken →
PRICING

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 / request
SKILLS

Installeer de Grok Imagine skill voor appontwikkeling

Laad modeldocs, schema's, prijsnotities en setupstappen in je codeworkspace.

# Install the model skill for app development workflows
npx skills add runapi-ai/grok-imagine -g
Installs docs, schemas, pricing context, and setup notes into your developer workspace.
Or use this setup request in your coding tool:
Install the Grok Imagine skill for this app:

1. Add runapi-ai/grok-imagine with the skills installer.
2. Load SKILL.md in this workspace.
3. Use its docs, schemas, pricing notes, and setup steps when adding model features.
4. Confirm the install path when done.
HOE HET WERKT

Van modelskill naar eerste resultaat in vier stappen

01

Kies het model

Kies het model en de variant die passen bij je outputtype, kwaliteitslat en latencydoel.

02

Configureren

Stel je RunAPI-key in en installeer de modelskill in je codeworkspace.

03

Bouwen

Gebruik de skill-instructies om de modelfeature in je applicatie toe te voegen.

04

Ontvangen

Poll op task-ID, stream wanneer ondersteund of verwerk de webhook-callback.

CONTEXT

Wat is de Grok Imagine API?

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
Video
WAAROM RUNAPI

Waarom de Grok Imagine API via RunAPI gebruiken

Eén auth, elke provider

Met één RunAPI-sleutel ontgrendel je de hele catalogus. Geen aparte accounts, geen sleutelrotatie per integratie.

Uniforme prijzen & billing

Prijs per call in USD, maandelijks gefactureerd. Mislukte generaties worden niet in rekening gebracht.

Skill met schema's

Getypeerde schema's en setupnotities zitten in de modelskill, zodat implementatie start vanuit het juiste contract.

FAQ

Veelgestelde vragen

What creative modes does Grok Imagine support?

Text-to-image, edit-image, text-to-video, and image-to-video — covering still images, prompt-guided image edits, and motion generation.

Does Grok Imagine generate audio with video?

Yes — text-to-video generates synchronized native audio including dialogue with lip-sync.

How many reference images can I provide?

The edit-image endpoint accepts one source image for prompt-guided style transfer and composition editing.

What image styles are available?

Realistic, artistic, and anime styles across 5 aspect ratios. Style is controlled via the prompt and style parameter.

How long are generated videos?

6 to 15 seconds per generation (up to 30 seconds on the fast variant) for both text-to-video and image-to-video endpoints.

Met welke variant moet ik beginnen?

Kies de goedkoopste variant die aan je kwaliteitsnorm voldoet. De meeste teams beginnen met de snelle variant en stappen over op pro voor productie.

Is er een gratis tier?

Nieuwe accounts krijgen de eerste calls gratis op elk model. Daarna betaal je per call.

Streamen jullie resultaten?

Waar streaming beschikbaar is, streamt RunAPI end-to-end.

Hoe worden mislukkingen gefactureerd?

Mislukte generations worden niet in rekening gebracht.

Worden outputs gecachet?

Gegenereerde outputs worden opgeslagen en zijn op te vragen via task-ID. Inputs worden niet gecachet.

Mag ik het commercieel gebruiken?

Ja — commercieel gebruik is inbegrepen voor elke variant, tenzij een modellicentie het expliciet beperkt. Dat staat aangegeven op de variantpagina.

Hoe zit het met rate limits?

Rate limits per key schalen mee met je usage tier. Zie de prijzenpagina voor de actuele limieten.

Waar kan ik problemen melden?

Open een issue in de publieke GitHub-repo of mail support.

VERGELIJKBARE MODELLEN

Als je de Grok Imagine API goed vindt, probeer deze dan eens

NU BEGINNEN

Begin met bouwen met de Grok Imagine API.