OPENCLAW + GPT IMAGE

OpenClaw で GPT Image を使う。

GPT Image 2 は OpenAI の専用画像生成モデルです——テキスト→画像と指示ベースの画像編集に対応し、出力解像度は最大 4K、透明背景もサポートします。OpenClaw agent は、チャットで使うのと同じ RunAPI キーと /v1 エンドポイントで呼び出し、追加の skill をインストールする必要はありません。

1つの APIキー · テキスト→画像 + 画像編集 · 最大 4K 出力
RunAPI を使って OpenAI GPT Image 2 で画像を生成します。

要件:
- https://runapi.ai/v1/text_to_image の RunAPI API を使用します。
- RUNAPI_API_KEY 環境変数から API キーを読み込みます。
- model を "gpt-image-2-text-to-image" に設定します。
- 説明的な prompt を書きます。GPT Image 2 は自然言語の指示に忠実に従います——レイアウト、スタイル、テキストオーバーレイ、透明度の要件を記述します。
- 任意で output_resolution を 1k、2k、または 4k に設定します。デフォルトは 1k です。
- レスポンスは task_id を返します。タスクが完了するまでタスクステータスエンドポイントをポーリングし、出力 URL を取得します。
curl -X POST https://runapi.ai/v1/text_to_image \
  -H "Authorization: Bearer $RUNAPI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-image-2-text-to-image",
    "prompt": "A product photo of a glass perfume bottle on a marble surface, transparent background, studio lighting, the label reads AURORA in gold serif font",
    "output_resolution": "2k",
    "aspect_ratio": "3:4"
  }'
{
  "task_id": "tsk_abc123",
  "status": "pending",
  "model": "gpt-image-2-text-to-image"
}
curlコマンドをコピーしてテスト gpt-image
仕組み

OpenClaw で GPT Image を使う3ステップ

1

Configure RunAPI

Set the RUNAPI_API_KEY environment variable in your shell profile. If RunAPI is already configured in OpenClaw for chat, the same key works for GPT Image — no additional setup needed.

export RUNAPI_API_KEY=runapi_xxx
2

Call GPT Image 2

Send a POST request to the text_to_image endpoint with model set to gpt-image-2-text-to-image. Include a descriptive prompt with layout and style instructions. Set output_resolution to 2k or 4k for higher detail. For editing existing images, use the edit_image endpoint with gpt-image-2-image-to-image and provide source_image_urls.

POST /v1/text_to_image
3

Get the result

The API returns a task_id immediately. Poll the task status endpoint until the status changes to completed, then retrieve the output image URL from the response. GPT Image 2 typically completes within 10–30 seconds depending on resolution.

task_id: tsk_abc123
パラメータ

GPT Image API パラメータ

パラメータ 説明
model string Required. gpt-image-2-text-to-image for generation, gpt-image-2-image-to-image for editing.
prompt string Required. Natural language description of the desired image. Supports detailed instructions for layout, text overlays, and style.
output_resolution string Optional. Output resolution — 1k (default), 2k, or 4k. Higher resolution costs more per image.
aspect_ratio string Optional. Defaults to auto. Supports 1:1, 3:2, 2:3, 4:3, 3:4, 16:9, 9:16, and more.
source_image_urls array Required for edit_image endpoint. One or more URLs of source images to edit.

OpenClaw上のGPT Imageとは?

GPT Image 2はOpenAIの専用画像モデルで、キーワード駆動のジェネレーターよりも構造化されたデザインアシスタントとして機能します。制作ブリーフ——レイアウト・テキスト配置・スタイル制約——を与えると、指示に厳密に従います。OpenClaw agentはチャットと同じRunAPIエンドポイントを通じて呼び出します。

GPT Imageの活用例

ブランドビジュアルと広告デザイン

詳細な制作ブリーフに基づいてブランド広告・SNSバナー・マーケティングビジュアルを生成し——正確なレイアウト・テキスト配置・スタイル制約を指定するとGPT Image 2が厳密に実行します。

透明背景付きプロダクト画像

後処理なしでECサイト・マーケティング素材・UIオーバーレイに直接使用できる透明背景付きの商品展示画像を生成します。

UIモデルとインターフェースコンセプト画像

読みやすいテキストラベルとクリアなレイアウト階層を持つUIモデルとアプリインターフェースコンセプト画像を生成し、開発チームのレビュー前にデザインコンセプトを素早く可視化します。

FAQ

GPT Image + OpenClaw のよくある質問

OpenClaw の基本設定

まだ設定していませんか?OpenClaw の RunAPI セットアップガイドから始めましょう。

OpenClaw セットアップガイド →

GPT Image モデルカタログ

すべての GPT Image バリアント、価格、API ドキュメントを確認する。

GPT Image モデル →

今すぐ OpenClaw で GPT Image を試す。

無料の RunAPI キーを取得し、プロンプトを OpenClaw に貼り付けて、OpenAI GPT Image 2 で画像の生成と編集を始めましょう。