xAI · Video

Hermes Agent 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 Hermes Agent + Grok Imagine

  • AI-generated product photos

    Create product photography from text descriptions for e-commerce listings, catalogs, or ad campaigns without a physical photo shoot.

  • Video clips for social media

    Generate short video clips from text prompts for social reels, product teasers, or content marketing.

  • Character generation for creative projects

    Produce consistent character designs in photorealistic or anime styles for games, stories, or branding projects.

Why Use Grok Imagine Through RunAPI + Hermes Agent

  • 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.

Hermes Agent + Grok Imagine Questions

Can I use Grok Imagine in Hermes Agent?

Yes. If RunAPI is already configured as a provider in Hermes Agent, the same API key works for Grok Imagine. 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 Hermes Agent use Grok Imagine alongside other image models?

Yes. Hermes Agent can generate a first draft with Grok Imagine, then pass the output to an editing or upscaling model in the same workflow, all with one RunAPI key.

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 Hermes Agent

Building with a team?

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

Contact Us