---
title: &quot;Use Imagen 4 in OpenClaw via RunAPI — Image API Guide&quot;
url: &quot;https://runapi.ai/openclaw-imagen-4.md&quot;
canonical: &quot;https://runapi.ai/openclaw-imagen-4&quot;
locale: &quot;en&quot;
model: &quot;imagen-4&quot;
---

# Use Imagen 4 in OpenClaw.

Imagen 4 is Google DeepMind&#39;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.

## API example

```bash
curl -X POST https://runapi.ai/v1/text_to_image \
  -H &quot;Authorization: Bearer $RUNAPI_API_KEY&quot; \
  -H &quot;Content-Type: application/json&quot; \
  -d &#39;{
    &quot;model&quot;: &quot;imagen-4&quot;,
    &quot;prompt&quot;: &quot;A ceramic coffee mug on a wooden table with morning light, the text HELLO printed on the side in serif font, photorealistic&quot;
  }&#39;

```

### Response

```json
{
  &quot;task_id&quot;: &quot;tsk_abc123&quot;,
  &quot;status&quot;: &quot;pending&quot;,
  &quot;model&quot;: &quot;imagen-4&quot;
}

```

## How it works

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

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

## FAQ

### Can I use Imagen 4 in OpenClaw?

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.

### Do I need a separate API key for Imagen 4?

No. The same RUNAPI_API_KEY works for all 113+ models across chat, image, video, and music. One key, one billing account.

### Is Imagen 4 async or sync?

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.

### What does Imagen 4 cost through RunAPI?

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.

### When should I use Imagen 4 Fast vs Standard vs Ultra?

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.

### How strict are Imagen 4&#39;s content filters?

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.


## Links

- [OpenClaw setup guide →](https://runapi.ai/openclaw)
- [Imagen 4 models →](https://runapi.ai/models/imagen-4)
- [Model catalog](https://runapi.ai/models)
- [API docs](https://runapi.ai/docs)
