gpt-image-2 Image Generation Setup Guide

Learn how to use gpt-image-2 with the web app, Cherry Studio, Skills, and scripts.

Recommended approach:

If you are a regular user, start with the web app for one-click image generation. Use the image generation endpoint http://137.184.200.132:3001/api/v1/images/generations only when connecting a client or automation tool, and set the model ID to gpt-image-2.

ItemValueDescription
Web Appimage2.gpt-agent.cc →The recommended option. Beginners do not need to manage API parameters.
API Endpointhttp://137.184.200.132:3001/api/v1/images/generationsFor Cherry Studio, Skills, scripts, and similar tools.
Model IDgpt-image-2Enter the complete ID exactly as shown.
API Keysk-xxxxxxxxUse your own API key.

About timeouts:

High-resolution or 4K images may take 70-150 seconds to generate. If a client such as Cherry Studio has a fixed timeout, it may decide that the request failed and retry while the image is still being generated. If this happens, use the web app to avoid duplicate requests.

1. Use the Web App

  • Open image2.gpt-agent.cc in your browser.
  • Click Settings in the upper-right corner and enter your API Key.
  • Select gpt-image-2 and enter your prompt.
  • Choose the format, quality, aspect ratio, and number of images as needed, then click Generate.

Common parameters include the prompt, format, quality, aspect ratio, and number of images. If you are new to the tool, keep the defaults and change only the prompt and aspect ratio.

2. Edit an Existing Image

To make a targeted edit, transfer the style, or improve an existing image, upload the original image first. Then clearly describe what to change, what to preserve, and the desired final style.

3. Save the Generated Image

After generation finishes, right-click the image to save it or use the download button on the page.

4. Configure Cherry Studio

Recommendation: Cherry Studio works well for standard image sizes. For very high-resolution images, use the web app to avoid client timeout retries.

  • Open Cherry Studio settings.
  • Add a provider and select the OpenAI-compatible protocol.
  • Set the API endpoint to http://137.184.200.132:3001/api/v1/images/generations.
  • Enter your API Key and set the model to gpt-image-2.
  • Save the configuration, then select this model to generate images.

5. OpenClaw / ClawHub Skill

Quick links: This section includes both the Skill package and the complete guide. Install the Skill for automated image generation, or follow the guide for step-by-step setup.

  • Skill package: guishu-gpt-image-2 is available on ClawHub. Its owner is quqi1599, and the current version is 1.0.0. Install it with clawhub install guishu-gpt-image-2.
  • Complete guide: gpt-image-2 Image Generation Setup Guide →.

Regular users should start with the web app and Cherry Studio sections. Agent / OpenClaw users can go directly to this section.

clawhub install guishu-gpt-image-2
export LLM_TOKEN_API_KEY="sk-xxxxxxxx"
python3 ~/.openclaw/workspace/skills/guishu-gpt-image-2/scripts/generate.py \
  --prompt "A young girl in K-pop idol style, messy but stylish long hair, wearing a denim jacket and casual clothes, vertical composition, blurred background, hyper-realistic original photo quality, natural lighting" \
  --size 1024x1792 \
  --quality high \
  --n 1
ItemDescription
Skill Packageguishu-gpt-image-2. Install it from ClawHub.
Complete GuideCovers the web app, Cherry Studio, and OpenClaw / ClawHub usage.
Web Appimage2.gpt-agent.cc, recommended for beginners and high-resolution images.
LLM_TOKEN_API_KEYEnter your own API Key. The script also supports GUI_SHU_TOKEN_KEY and OPENAI_API_KEY.
EndpointUses http://137.184.200.132:3001/api/v1/images/generations by default.
ModelFixed to gpt-image-2 by default.
PromptThe image prompt. Describe the subject, style, composition, lighting, camera treatment, and intended use clearly.
SizeThe image dimensions, such as 1024x1024 or 1024x1792.
Response FormatUses b64_json by default so the script can save the image directly to a local file.
Test ResultA real API call was completed successfully, generating a local PNG image and HTML gallery.