← Home

Guide

GPT-5.4 Image 2 with OpenClaw

Generate images inside your OpenClaw agent using OpenAI's GPT-5.4 Image 2 — GPT-5.4 reasoning combined with the GPT Image 2 generator, one model, one API call.

What is GPT-5.4 Image 2?

GPT-5.4 Image 2 is OpenAI's unified reasoning + image generation model, released April 2026. It combines the GPT-5.4 text model with the GPT Image 2 generator, so a single request can reason about a prompt, refine it, and produce the image — no separate image-gen call needed.

  • Model ID: openai/gpt-5.4-image-2
  • Context: 272K tokens
  • Pricing: $8 / $15 per 1M input / output tokens
  • Available via the OpenAI API and OpenRouter

Step 1: Get an OpenAI API Key

  1. Go to platform.openai.com/api-keys.
  2. Sign in or create an OpenAI account.
  3. Click Create new secret key, name it "OpenClaw", and copy the sk-... value.
  4. Make sure billing is enabled under Settings → Billing. Image generation is pay-as-you-go.
Tip: Set a monthly spending limit under Settings → Limits so image generation can't run away with your budget.

Step 2: Configure in OpenClaw

Option A: OpenClaw Launch (Easiest)

  1. Go to openclawlaunch.com and open the configurator.
  2. In your instance settings, open the Image generation model picker and choose GPT-5.4 Image 2.
  3. Under Providers → OpenAI, paste your sk-... API key.
  4. Pick your chat platform (Telegram, Discord, WhatsApp, WeChat, or the web gateway). Paste a bot token for Telegram / Discord, or use the QR code flow for WhatsApp / WeChat. Click Deploy.

Option B: Self-Hosted Config

If you run OpenClaw yourself, add the provider key and set the image generation model in openclaw.json:

{
  "models": {
    "providers": {
      "openai": {
        "apiKey": "sk-..."
      }
    }
  },
  "agents": {
    "defaults": {
      "imageGenerationModel": {
        "primary": "openai/gpt-5.4-image-2"
      }
    }
  }
}

Step 3: Generate an Image

Once deployed, ask your agent to generate an image from chat. Any of these work:

  • "Generate an image of a cat astronaut on Mars."
  • "Draw a retro 1980s travel poster for Jupiter."
  • "Make a hero banner for a SaaS landing page, dark theme, blue glow."

Because GPT-5.4 Image 2 reasons before generating, you can give it loose briefs and it will expand them into detailed prompts on its own — no separate prompt-engineering step.

When to Pick GPT-5.4 Image 2

ModelBest ForCost
GPT-5.4 Image 2Reasoning + image in one call, brief-to-image workflows$8 / $15 per 1M tokens
GPT Image 1Straight image generation, lower latencyPer-image (cheaper)
Gemini 3 Pro ImageHighest quality, slowerGoogle pricing
Gemini 3.1 Flash ImageFast, Nano-Banana-classGoogle pricing

Use GPT-5.4 Image 2 when you want one model to handle the whole flow — understand the user's request, plan the scene, and generate the image. Use GPT Image 1 or Gemini 3.1 Flash Image if latency or per-image cost matters more than reasoning.

Switching Models

You can switch image models at any time from the dashboard — pick a different model from the image generation picker, save, and your next request uses the new one. See the Models page for the full list.

What's Next?

Deploy a GPT-5.4 Image 2 Bot

Get a reasoning + image generation agent on Telegram or Discord in 10 seconds.

Deploy Now