Use Grok Imagine in OpenClaw.
Grok Imagine is xAI's image and video generation suite — text-to-image, image-to-image, text-to-video, and image-to-video. OpenClaw agents call it through the same RunAPI key and /v1 endpoint used for chat, with no extra skills to install.
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.
- 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"
}
Use Grok Imagine in OpenClaw in three steps
Configure RunAPI
Set the RUNAPI_API_KEY environment variable in your shell profile. If RunAPI is already configured in OpenClaw for chat, the same key works for Grok Imagine — no additional setup needed.
export RUNAPI_API_KEY=runapi_xxx
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
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
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 OpenClaw?
Grok Imagine (Aurora) is xAI's image and video generator built into the Grok platform. It produces photorealistic portraits, anime-style illustrations, and short video clips with synchronized audio from text prompts. OpenClaw agents call it through RunAPI for text-to-image, image editing, and video generation without needing a Grok or SuperGrok subscription.
Grok Imagine use cases
Photorealistic portrait generation
Generate high-quality realistic portraits and character images from text descriptions, useful for social media profiles, marketing personas, or creative projects.
Social media content creation
Produce images and short video clips for social posts, stories, and ads directly from text prompts, with no watermark on outputs.
Stylized artwork and anime characters
Create illustration-style and anime character art from detailed prompts, generating consistent character designs for games, branding, or content series.
Grok Imagine + OpenClaw questions
Yes. If RunAPI is already configured as an OpenAI-compatible provider in OpenClaw, the same API key and /v1 endpoint work for Grok Imagine. Set the model to grok-imagine-text-to-image and call the text_to_image endpoint.
Through RunAPI, Grok Imagine uses pay-per-task billing -- no Grok subscription or SuperGrok plan required. You pay only for completed generations from your RunAPI credit balance. Check the RunAPI pricing page for current rates.
Yes. Grok Imagine supports text-to-video generation with synchronized audio. Use the text_to_video endpoint with the grok-imagine-text-to-video model. The output includes both video and matching audio in a single file.
Grok Imagine produces strong photorealistic results, especially for portraits and character generation. It also supports video output, which Midjourney and DALL-E do not. Quality varies by prompt -- test with your specific use case to compare.
OpenClaw general setup
Not configured yet? Start with the RunAPI setup guide for OpenClaw.
OpenClaw setup guide →Grok Imagine model catalog
See all Grok Imagine variants, pricing, and API docs.
Grok Imagine models →Try Grok Imagine in OpenClaw today.
Get a free RunAPI key, paste the prompt into OpenClaw, and start generating images and video with xAI Grok Imagine.