Caricamento in corso...
Caricamento in corso...
Last synced: Today, 22:00
Technical reference for the OpenClaw framework. Real-time synchronization with the official documentation engine.
Use this file to discover all available pages before exploring further.
The
image_generatetextCodex OAuth uses the same `openai/gpt-image-2` model ref. When an `openai-codex` OAuth profile is configured, OpenClaw routes image requests through that OAuth profile instead of first trying `OPENAI_API_KEY`. Explicit `models.providers.openai` config (API key, custom/Azure base URL) opts back into the direct OpenAI Images API route.
textThe agent calls `image_generate` automatically. No tool allow-listing needed — it is enabled by default when a provider is available.
| Goal | Model ref | Auth |
|---|---|---|
| OpenAI image generation with API billing | text openai/gpt-image-2 | text OPENAI_API_KEY |
| OpenAI image generation with Codex subscription auth | text openai/gpt-image-2 | OpenAI Codex OAuth |
| OpenAI transparent-background PNG/WebP | text openai/gpt-image-1.5 | text OPENAI_API_KEY |
| DeepInfra image generation | text deepinfra/black-forest-labs/FLUX-1-schnell | text DEEPINFRA_API_KEY |
| OpenRouter image generation | text openrouter/google/gemini-3.1-flash-image-preview | text OPENROUTER_API_KEY |
| LiteLLM image generation | text litellm/gpt-image-2 | text LITELLM_API_KEY |
| Google Gemini image generation | text google/gemini-3.1-flash-image-preview | text GEMINI_API_KEYtext GOOGLE_API_KEY |
The same
image_generateimageimagesqualityoutputFormatbackground| Provider | Default model | Edit support | Auth |
|---|---|---|---|
| ComfyUI | text workflow | Yes (1 image, workflow-configured) | text COMFY_API_KEYtext COMFY_CLOUD_API_KEY |
| DeepInfra | text black-forest-labs/FLUX-1-schnell | Yes (1 image) | text DEEPINFRA_API_KEY |
| fal | text fal-ai/flux/dev | Yes | text FAL_KEY |
text gemini-3.1-flash-image-preview | Yes | text GEMINI_API_KEYtext GOOGLE_API_KEY | |
| LiteLLM | text gpt-image-2 | Yes (up to 5 input images) | text LITELLM_API_KEY |
| MiniMax | text image-01 | Yes (subject reference) | text MINIMAX_API_KEYtext minimax-portal |
| OpenAI | text gpt-image-2 | Yes (up to 4 images) | text OPENAI_API_KEY |
| OpenRouter | text google/gemini-3.1-flash-image-preview | Yes (up to 5 input images) | text OPENROUTER_API_KEY |
| Vydra | text grok-imagine | No | text VYDRA_API_KEY |
| xAI | text grok-imagine-image | Yes (up to 5 images) | text XAI_API_KEY |
Use
action: "list"text/tool image_generate action=list
| Capability | ComfyUI | DeepInfra | fal | MiniMax | OpenAI | Vydra | xAI | |
|---|---|---|---|---|---|---|---|---|
| Generate (max count) | Workflow-defined | 4 | 4 | 4 | 9 | 4 | 1 | 4 |
| Edit / reference | 1 image (workflow) | 1 image | 1 image | Up to 5 images | 1 image (subject ref) | Up to 5 images | — | Up to 5 images |
| Size control | — | ✓ | ✓ | ✓ | — | Up to 4K | — | — |
| Aspect ratio | — | — | ✓ (generate only) | ✓ | ✓ | — | — | ✓ |
| Resolution (1K/2K/4K) | — | — | ✓ | ✓ | — | — | — | 1K, 2K |
json5{ agents: { defaults: { imageGenerationModel: { primary: "openai/gpt-image-2", timeoutMs: 180_000, fallbacks: [ "openrouter/google/gemini-3.1-flash-image-preview", "google/gemini-3.1-flash-image-preview", "fal/fal-ai/flux/dev", ], }, }, }, }
OpenClaw tries providers in this order:
modelimageGenerationModel.primaryimageGenerationModel.fallbacksIf a provider fails (auth error, rate limit, etc.), the next configured candidate is tried automatically. If all fail, the error includes details from each attempt.
OpenAI, OpenRouter, Google, DeepInfra, fal, MiniMax, ComfyUI, and xAI support editing reference images. Pass a reference image path or URL:
text"Generate a watercolor version of this photo" + image: "/path/to/photo.jpg"
OpenAI, OpenRouter, Google, and xAI support up to 5 reference images via the
imagestextEquivalent CLI: ```bash} openclaw infer image generate \ --model openai/gpt-image-1.5 \ --output-format png \ --background transparent \ --prompt "A simple red circle sticker on a transparent background" \ --json ```
The same
--output-format--backgroundopenclaw infer image edit--openai-backgroundbackground: "transparent"imageGenerationModel© 2024 TaskFlow Mirror
Powered by TaskFlow Sync Engine