OPENCLAW + IMAGEN 4

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.

one API key · text to image endpoint · async task polling
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"
}
Copy the curl command to test imagen-4
HOW IT WORKS

Use Imagen 4 in OpenClaw in three steps

1

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
2

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
3

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
PARAMETERS

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.

FAQ

Imagen 4 + OpenClaw questions

OpenClaw general setup

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

OpenClaw setup guide →

Imagen 4 model catalog

See all Imagen 4 variants, pricing, and API docs.

Imagen 4 models →

Try Imagen 4 in OpenClaw today.

Get a free RunAPI key, paste the prompt into OpenClaw, and start generating images with Google Imagen 4.