HERMES + GROK IMAGINE

Use Grok Imagine in Hermes Agent.

Grok Imagine is xAI's image and video generation suite — text-to-image, image-to-image, text-to-video, and image-to-video. Hermes Agent calls it through the same RunAPI custom provider and API key used for chat, with no extra plugins to install.

one API key · text to image endpoint · async task polling
Use RunAPI to generate an image with xAI Grok Imagine.

Requirements:
- Use the RunAPI API at https://runapi.ai/v1/text_to_image.
- Read the API key from RUNAPI_API_KEY environment variable.
- Use the custom:runapi provider already configured in Hermes Agent.
- Set the model to "grok-imagine-text-to-image".
- Write a descriptive prompt for the image you want.
- The response returns a task_id. Poll the task status endpoint until the task completes, then retrieve the output URL.
curl -X POST https://runapi.ai/v1/text_to_image \
  -H "Authorization: Bearer $RUNAPI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "grok-imagine-text-to-image",
    "prompt": "a robot hand placing a chess piece on a board, dramatic side lighting, slow motion feel"
  }'
{
  "task_id": "tsk_abc123",
  "status": "pending",
  "model": "grok-imagine-text-to-image"
}
Copy the curl command to test grok-imagine
HOW IT WORKS

Use Grok Imagine in Hermes Agent in three steps

1

Configure RunAPI

Set the RUNAPI_API_KEY environment variable in your shell profile. If the custom:runapi provider is already configured in Hermes Agent for chat, the same key works for Grok Imagine — no additional setup needed.

export RUNAPI_API_KEY=runapi_xxx
2

Call Grok Imagine

Send a POST request to the text_to_image endpoint with the model set to grok-imagine-text-to-image. Include your prompt describing the image. For video, use text_to_video with grok-imagine-text-to-video.

text_to_image
3

Get the result

The API returns a task_id immediately. Poll the task status endpoint until the status changes to completed, then retrieve the output image or video URL from the response.

task_id: tsk_abc123
PARAMETERS

Grok Imagine API parameters

Parameter Type Description
model string Required. E.g. grok-imagine-text-to-image, grok-imagine-image-to-video.
prompt string Text description of the desired output.
image_url string Source image URL for image-to-image or image-to-video.
aspect_ratio string Optional. Output aspect ratio, e.g. 16:9, 1:1.

What is Grok Imagine on Hermes Agent?

Grok Imagine (Aurora) is xAI's image and video generator that covers text-to-image, image editing, and text-to-video with audio sync. Hermes Agent calls it through the custom:runapi provider, making it easy to chain Grok Imagine outputs with other RunAPI models in multi-step workflows -- for example, generating a product photo and then passing it to a video model for animated content.

Grok Imagine use cases

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 with synchronized audio

Generate short video clips with matching audio from text prompts for social media 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 using detailed text prompts.

FAQ

Grok Imagine + Hermes Agent questions

Hermes Agent general setup

Not configured yet? Start with the RunAPI setup guide for Hermes Agent.

Hermes Agent setup guide →

Grok Imagine model catalog

See all Grok Imagine variants, pricing, and API docs.

Grok Imagine models →

Try Grok Imagine in Hermes Agent today.

Get a free RunAPI key, configure the custom:runapi provider, and start generating images and video with xAI Grok Imagine.