Use Imagen 4 in OpenClaw.
Imagen 4 is Google DeepMind's image generation model with accurate text rendering and high prompt fidelity. OpenClaw agents call it through the same RunAPI endpoint and API key used for chat — no extra skills to install.
Use RunAPI to generate an image with Google Imagen 4.
Requirements:
- Read the API key from RUNAPI_API_KEY. Do not hardcode the key.
- Send a POST request to https://runapi.ai/v1/text_to_image.
- Set the model to imagen-4.
- Write a descriptive prompt for the image you want.
- The response returns a task_id. Poll the task status endpoint until the task completes.
- When the task is complete, retrieve the image URL from the response.
curl -X POST https://runapi.ai/v1/text_to_image \
-H "Authorization: Bearer $RUNAPI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "imagen-4",
"prompt": "A ceramic coffee mug on a wooden table with morning light, the text HELLO printed on the side in serif font, photorealistic"
}'
{
"task_id": "tsk_abc123",
"status": "pending",
"model": "imagen-4"
}
Use Imagen 4 in OpenClaw in three steps
Configure RunAPI
Set the RUNAPI_API_KEY environment variable. If you already configured RunAPI as an OpenClaw provider for chat, the same key works for image generation.
export RUNAPI_API_KEY=runapi_xxx
Call Imagen 4
Send a POST request to the text_to_image endpoint with model set to imagen-4. Include a descriptive prompt. Add aspect_ratio or negative_prompt as needed.
POST /v1/text_to_image
Get the result
The response includes a task_id. Poll the task status endpoint until status changes to completed. The finished response contains the generated image URL.
task_id: tsk_abc123
Imagen 4 API parameters
| Parameter | Type | Description |
|---|---|---|
model |
string |
Required. imagen-4, imagen-4-fast, or imagen-4-ultra. |
prompt |
string |
Text description of the desired image. |
aspect_ratio |
string |
Optional. E.g. 1:1, 16:9, 9:16. |
negative_prompt |
string |
Optional. What to avoid in the generated image. |
What is Imagen 4 on OpenClaw?
Imagen 4 is Google DeepMind's image model that users call "stunning in seconds" with what reviewers describe as the "best value per pixel" in the API market. It ships in three tiers -- Fast for rapid prototyping, Standard for production work, and Ultra for maximum detail -- with the cheapest tier running around $0.02 per image. OpenClaw agents call all three tiers through the same RunAPI key.
Imagen 4 use cases
Rapid prototyping at scale
Use the Fast tier for quick concept exploration at $0.02 per image, generating dozens of variations before committing to a direction with the Standard or Ultra tier.
UI and label design with readable text
Generate interface mockups, product labels, and signage designs where the embedded text renders cleanly and follows the prompt precisely.
Photorealistic textures and materials
Create photorealistic material textures, vintage travel postcards, and adventurous photography scenes with accurate lighting and surface detail.
Imagen 4 + OpenClaw questions
Yes. OpenClaw agents call Imagen 4 through the RunAPI text_to_image endpoint. Set the model field to imagen-4 and send the request with the same RUNAPI_API_KEY you use for chat. No extra skills or plugins required.
No. The same RUNAPI_API_KEY works for all 113+ models across chat, image, video, and music. One key, one billing account.
Imagen 4 is async. The initial request returns a task_id with status pending. Poll the task status endpoint until the task completes, then retrieve the image URL from the response. RunAPI SDKs handle polling automatically.
Imagen 4 pricing is pay-as-you-go with no monthly minimum. The cost varies by tier: imagen-4-fast is the cheapest, imagen-4 is standard, and imagen-4-ultra is the highest quality. Check the RunAPI pricing page for current per-image rates.
Fast is for draft iterations and concept exploration where speed and cost matter more than detail -- it runs at around $0.02 per image. Standard is the default for production work. Ultra produces the highest-detail output for hero images or print-quality assets. All three use the same prompt format.
Imagen 4 has relatively strict content filters that can sometimes flag innocuous prompts. If a generation is rejected, rephrase to be more explicit about the intended context. The filters are most sensitive around people and brand imagery. All outputs include an invisible SynthID watermark.
OpenClaw general setup
Not configured yet? Start with the RunAPI setup guide for OpenClaw.
OpenClaw setup guide →Try Imagen 4 in OpenClaw today.
Get a free RunAPI key, paste the prompt into OpenClaw, and start generating images with Google Imagen 4.