Image generation
The bundledopenai plugin registers image generation through the
image_generate tool. It supports both OpenAI API-key and Codex OAuth image
generation through the same openai/gpt-image-2 model ref.
See Image Generation for shared tool parameters,
provider selection, and failover behavior.
gpt-image-2 is the default for OpenAI text-to-image generation and image
editing. gpt-image-1.5, gpt-image-1, and gpt-image-1-mini remain usable
as explicit model overrides. Use openai/gpt-image-1.5 for
transparent-background PNG/WebP output; the current gpt-image-2 API rejects
background: "transparent".
For a transparent-background request, call image_generate with
model: "openai/gpt-image-1.5", outputFormat: "png" or "webp", and
background: "transparent"; the older openai.background provider option is
still accepted. OpenClaw also protects the public OpenAI and OpenAI Codex OAuth
routes by rewriting default openai/gpt-image-2 transparent requests to
gpt-image-1.5; Azure and custom OpenAI-compatible endpoints keep their
configured deployment/model names.
The same setting is exposed for headless CLI runs:
--output-format and --background flags with
openclaw infer image edit when starting from an input file.
--openai-background remains available as an OpenAI-specific alias. Use
--quality low|medium|high|auto to control OpenAI Images quality and cost.
Use --openai-moderation low|auto with both image generate and image edit
to pass OpenAI’s moderation hint. The direct OpenAI Images API and the
ChatGPT/Codex OAuth Responses backend both support moderation for text-to-image
generation and reference-image edits.
For ChatGPT/Codex OAuth installs, keep the same openai/gpt-image-2 ref. When
an openai OAuth profile is configured, OpenClaw resolves that stored OAuth
access token and sends image requests through the Codex Responses backend; it
does not first try OPENAI_API_KEY or silently fall back to an API key.
Configure models.providers.openai explicitly with an API key, custom base
URL, or Azure endpoint when you want the direct OpenAI Images API route
instead. If that custom image endpoint is on a trusted LAN/private address,
also set browser.ssrfPolicy.dangerouslyAllowPrivateNetwork: true; OpenClaw
keeps private/internal OpenAI-compatible image endpoints blocked unless this
opt-in is present.
Generate:
Video generation
The bundledopenai plugin registers video generation through the
video_generate tool.
OpenAI image-to-video requests use
POST /v1/videos with an image
input_reference. Single-video edits use POST /v1/videos/edits with the
uploaded video in the video field.
See Video Generation for shared tool parameters,
provider selection, and failover behavior.The OpenAI provider declares
supportsSize but not supportsAspectRatio or
supportsResolution. OpenClaw’s shared normalization layer converts a
requested aspectRatio into the closest matching OpenAI size before the
request reaches the provider, so aspect-ratio requests generally still work.
resolution has no size fallback and is dropped, surfaced to the caller as
Ignored unsupported overrides for openai/<model>: resolution=<value>.