xAI · Video

OpenClaw x Grok Imagine

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.

7 variants from $0.02 / second Commercial OK

Prerequisite: npx runapi mcp install

Prompt

Prompt models

Use grok-imagine-edit-image when it matches the task: Prompt-guided style transfer and composition editing from one or more source images.

You have access to RunAPI task tools for Grok Imagine.

Available Grok Imagine models:
- grok-imagine-edit-image: Prompt-guided style transfer and composition editing from one or more source images
  endpoints: /api/v1/grok_imagine/edit_image
  request fields: model, source_image_url, prompt
- grok-imagine-image-2-0: Text-to-image, segmentation maps, and targeted image editing
  endpoints: /api/v1/grok_imagine/edit_image, /api/v1/grok_imagine/segment_map, /api/v1/grok_imagine/text_to_image
  request fields: model, prompt, aspect_ratio
- grok-imagine-image-to-video: Input image becomes frame 1; animates with motion + camera
  endpoints: /api/v1/grok_imagine/image_to_video
  request fields: model, source_image_url, prompt
- grok-imagine-text-to-image: Aurora model; 5 aspect ratios; realistic/artistic/anime styles
  endpoints: /api/v1/grok_imagine/text_to_image
  request fields: model, prompt
- grok-imagine-text-to-video: 6–30s video from text with synchronized native audio and lip-sync
  endpoints: /api/v1/grok_imagine/text_to_video
  request fields: model, prompt
- grok-imagine-video-1.5-fast: Fast text- and image-to-video generation for rapid iteration
  endpoints: /api/v1/grok_imagine/image_to_video, /api/v1/grok_imagine/text_to_video
  request fields: model, prompt
- grok-imagine-video-1.5-preview: Video 1.5 preview; text/image input; auto aspect ratio; up to 15s
  endpoints: /api/v1/grok_imagine/image_to_video, /api/v1/grok_imagine/text_to_video
  request fields: model, prompt

Use the model ID and endpoint that match the user's request.
Example prompt: Generate a short video of a robot hand placing a chess piece on a board, dramatic lighting, slow motion.
/api/v1/grok_imagine/edit_image: Submit the task, poll for its status, then verify the completed output. POST /api/v1/grok_imagine/edit_image and save the returned Task id.
GET /api/v1/grok_imagine/edit_image/<task-id> until status is completed or failed.
Verify the completed response contains the endpoint-specific output documented in the API reference.
/api/v1/grok_imagine/segment_map: Submit the task, poll for its status, then verify the completed output. POST /api/v1/grok_imagine/segment_map and save the returned Task id.
GET /api/v1/grok_imagine/segment_map/<task-id> until status is completed or failed.
Verify the completed response contains the endpoint-specific output documented in the API reference.
/api/v1/grok_imagine/text_to_image: Submit the task, poll for its status, then verify the completed output. POST /api/v1/grok_imagine/text_to_image and save the returned Task id.
GET /api/v1/grok_imagine/text_to_image/<task-id> until status is completed or failed.
Verify the completed response contains the endpoint-specific output documented in the API reference.
/api/v1/grok_imagine/image_to_video: Submit the task, poll for its status, then verify the completed output. POST /api/v1/grok_imagine/image_to_video and save the returned Task id.
GET /api/v1/grok_imagine/image_to_video/<task-id> until status is completed or failed.
Verify the completed response contains the endpoint-specific output documented in the API reference.
/api/v1/grok_imagine/text_to_video: Submit the task, poll for its status, then verify the completed output. POST /api/v1/grok_imagine/text_to_video and save the returned Task id.
GET /api/v1/grok_imagine/text_to_video/<task-id> until status is completed or failed.
Verify the completed response contains the endpoint-specific output documented in the API reference.

Public Versions and Endpoints

Model ID Endpoints Price Catalog
grok-imagine-edit-image
/api/v1/grok_imagine/edit_image
$0.04 / call Model detail
grok-imagine-image-2-0
/api/v1/grok_imagine/edit_image /api/v1/grok_imagine/segment_map /api/v1/grok_imagine/text_to_image
$0.04 / call Model detail
grok-imagine-image-to-video
/api/v1/grok_imagine/image_to_video
$0.02 / second Model detail
grok-imagine-text-to-image
/api/v1/grok_imagine/text_to_image
$0.04 / call Model detail
grok-imagine-text-to-video
/api/v1/grok_imagine/text_to_video
$0.02 / second Model detail
grok-imagine-video-1.5-fast
/api/v1/grok_imagine/image_to_video /api/v1/grok_imagine/text_to_video
$0.57 / call Model detail
grok-imagine-video-1.5-preview
/api/v1/grok_imagine/image_to_video /api/v1/grok_imagine/text_to_video
$0.08 / second Model detail

Verify

Poll until the task reaches a terminal status

Select <model-id> to generate verification commands.

Configuration

Guide endpoint: <endpoint>

Select <model-id> to generate a request with the endpoint's public input contract.

Additional operations

These operations do not use a model ID.

  • /api/v1/grok_imagine/extend_video
  • /api/v1/grok_imagine/upscale_image
How it works

Get Started in 3 Steps

  1. Choose a model ID

    Select a public catalog model ID and review its endpoint and current starting price.

  2. Configure RunAPI

    Set RUNAPI_API_KEY before making the endpoint request.

  3. Verify the result

    For asynchronous endpoints, poll the same endpoint until the Task reaches a terminal status.

What to Build with OpenClaw + Grok Imagine

  • Photorealistic portrait generation

    Generate realistic portraits and character images from text descriptions for social profiles, marketing personas, or creative projects.

  • Social media content creation

    Produce images and short video clips for posts, stories, and ads directly from text prompts.

  • Stylized artwork and anime characters

    Create illustration-style and anime character art from detailed prompts, keeping character designs consistent for games, branding, or content series.

Why Use Grok Imagine Through RunAPI + OpenClaw

  • 7 variants, one API key

    Use one RunAPI connection to choose among the live model variants without changing your integration.

  • Clear usage pricing

    See current catalog pricing before you send a request, with no subscription or minimum spend required.

  • Automatic task workflows

    Submit, poll, and collect asynchronous results through a consistent task workflow without writing manual polling code.

OpenClaw + Grok Imagine Questions

Can I use Grok Imagine in OpenClaw?

Yes. If RunAPI is already configured as a provider in OpenClaw, the same API key works for Grok Imagine image and video tasks. Pick the version and endpoint shown on this page.

Do I need a Grok subscription?

No. Through RunAPI, Grok Imagine is billed per task from your RunAPI balance. You do not need a separate Grok plan or account.

Can Grok Imagine generate video as well as images?

Yes. Grok Imagine offers both image and video endpoints. The versions and endpoints section on this page lists what each variant supports.

Which model ID should I use?

Choose a public model ID from the version table. Each ID exposes the endpoints shown for that version.

Does this guide configure a chat model?

No. This Model Line uses the endpoint workflow shown here and is not presented as an agent chat model.

Start using Grok Imagine with OpenClaw

Building with a team?

We're here to help with enterprise setup, integrations, and technical questions.

Contact Us