OpenAI GPT Image 2 Edit 画像編集

openai/gpt-image-2/edit

OpenAI の GPT Image 2 Edit は、自然言語の指示と1枚以上の参照画像を使用して画像編集を可能にします。すぐに使える REST 推論 API、最高のパフォーマンス、コールドスタートなし、手頃な価格。

サンプル

OpenAI GPT Image 2 Edit 画像編集 example 1

パラメータ

名前既定制約説明
images *画像image_uploadimage/* · 1–10 items編集用の入力画像の URL リスト。
prompt *プロンプトtextarea≤ 5000 chars生成に使用するポジティブプロンプト。
n画像数slider11 ~ 10生成する画像の数(1-10)。各画像は個別に課金されます。
aspect_ratioアスペクト比select1:1 | 1:2 | 1:3 | 2:1 | 2:3 | 3:1 | 3:2 | 3:4 | …生成される画像のアスペクト比。'size'が指定されている場合は無効です。
resolution解像度select1k | 2k | 4k出力解像度レベル。'size'が指定されている場合は無効です。
sizeサイズtextauto具体的な画像解像度。形式は幅×高さです。指定された場合、aspect_ratioとresolutionは無効になります。
quality品質selectautoauto | low | medium | highレンダリング品質。高品質ほどコストと時間がかかります。
maskマスク画像image_uploadimage/* · 0–1 itemsURLで入力画像を参照します。1つだけ提供してください。
background背景selectautoauto | transparent | opaque生成された画像の出力に対する背景の動作。
input_fidelity入力忠実度selectlowlow | high元の入力画像に対する忠実度を制御します。
output_format出力形式selectpngpng | jpeg | webpThe format of the output image. JPEG is faster for low latency.
output_compression圧縮number0 ~ 100Compression level, only valid for JPEG/WebP (0-100).
moderation検閲レベルselectautoauto | lowContent moderation level.

出力フィールド

フィールド説明
imagesarray<string>

API

統一 REST API でこのモデルを呼び出せます。API Keys ページでキーを取得してください。

cURL
# 1) Submit — returns { "task_uuid": "..." }
curl -X POST "https://www.namifusion.com/api/v1/marketplace/run/openai/gpt-image-2/edit" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "input": {
    "images": [
      "https://assets-public.namifusion.com/uploads/images/2026-04-24/b96da2a48506.png",
      "https://assets-public.namifusion.com/uploads/images/2026-04-24/4831013a68e1.png"
    ],
    "prompt": "A futuristic cityscape at sunset, with glowing skyscrapers and flying cars.",
    "n": 3,
    "aspect_ratio": "16:9",
    "resolution": "4k",
    "size": "1024x1024",
    "quality": "high",
    "background": "auto",
    "input_fidelity": "low",
    "output_format": "jpeg",
    "output_compression": 85,
    "moderation": "auto"
  }
}'

# 2) Poll until status is "completed", then read the output URLs
curl "https://www.namifusion.com/api/v1/marketplace/run/tasks/TASK_UUID" \
  -H "Authorization: Bearer YOUR_API_KEY"
Python
import time, requests

API_KEY = "YOUR_API_KEY"
HEADERS = {"Authorization": f"Bearer {API_KEY}"}

# 1) Submit
resp = requests.post(
    "https://www.namifusion.com/api/v1/marketplace/run/openai/gpt-image-2/edit",
    headers=HEADERS,
    json={
        "input": {
            "images": [
                "https://assets-public.namifusion.com/uploads/images/2026-04-24/b96da2a48506.png",
                "https://assets-public.namifusion.com/uploads/images/2026-04-24/4831013a68e1.png"
            ],
            "prompt": "A futuristic cityscape at sunset, with glowing skyscrapers and flying cars.",
            "n": 3,
            "aspect_ratio": "16:9",
            "resolution": "4k",
            "size": "1024x1024",
            "quality": "high",
            "background": "auto",
            "input_fidelity": "low",
            "output_format": "jpeg",
            "output_compression": 85,
            "moderation": "auto"
        }
    },
)
resp.raise_for_status()  # 401/402/429/5xx stop here instead of polling a bad task
task = resp.json()

# 2) Poll until a terminal state (completed / failed / cancelled).
#    This model is allowed up to 600s server-side.
deadline = time.time() + 660
while task.get("status") not in ("completed", "failed", "cancelled"):
    if time.time() > deadline:
        raise TimeoutError(f"still {task.get('status')} — keep the task_uuid and poll later")
    time.sleep(3)
    poll = requests.get(f"https://www.namifusion.com/api/v1/marketplace/run/tasks/{task['task_uuid']}", headers=HEADERS)
    poll.raise_for_status()
    task = poll.json()

print(task["status"], task.get("output"))
JavaScript
const API_KEY = "YOUR_API_KEY";
const HEADERS = { Authorization: `Bearer ${API_KEY}` };

// 1) Submit
const resp = await fetch("https://www.namifusion.com/api/v1/marketplace/run/openai/gpt-image-2/edit", {
  method: "POST",
  headers: { ...HEADERS, "Content-Type": "application/json" },
  body: JSON.stringify({
    "input": {
      "images": [
        "https://assets-public.namifusion.com/uploads/images/2026-04-24/b96da2a48506.png",
        "https://assets-public.namifusion.com/uploads/images/2026-04-24/4831013a68e1.png"
      ],
      "prompt": "A futuristic cityscape at sunset, with glowing skyscrapers and flying cars.",
      "n": 3,
      "aspect_ratio": "16:9",
      "resolution": "4k",
      "size": "1024x1024",
      "quality": "high",
      "background": "auto",
      "input_fidelity": "low",
      "output_format": "jpeg",
      "output_compression": 85,
      "moderation": "auto"
    }
  }),
});
if (!resp.ok) throw new Error(`submit failed: ${resp.status} ${await resp.text()}`);
let task = await resp.json();

// 2) Poll until a terminal state (completed / failed / cancelled).
//    This model is allowed up to 600s server-side.
const deadline = Date.now() + 660 * 1000;
while (!["completed", "failed", "cancelled"].includes(task.status)) {
  if (Date.now() > deadline) throw new Error(`still ${task.status} — keep the task_uuid and poll later`);
  await new Promise((r) => setTimeout(r, 3000));
  const poll = await fetch(`https://www.namifusion.com/api/v1/marketplace/run/tasks/${task.task_uuid}`, { headers: HEADERS });
  if (!poll.ok) throw new Error(`poll failed: ${poll.status}`);
  task = await poll.json();
}

console.log(task.status, task.output);

ドキュメント

OpenAI GPT Image 2 Edit

自然言語で簡単に画像編集を実現

OpenAI GPT Image 2 Edit は、自然言語指示を使用して画像編集をシームレスに行う最先端のテキスト生成画像モデルです。1枚以上の参照画像を活用し、高品質な編集を提供し、プロンプトの整合性が高く、柔軟なアスペクト比オプションを備えています。即時利用可能な REST API により、開発者は冷スタートの遅延を心配することなく、クリエイティブなワークフローに簡単に統合できます。


🚀 主な特徴

  • 自然言語による画像編集:簡単な言葉で変更内容を記述するだけで編集可能。手動マスキングや複雑な編集作業は不要。
  • 参照画像対応:1枚以上の入力画像を編集、変換、またはスタイル調整のビジュアルソースとして使用可能。
  • 柔軟なアスペクト比:正方形、縦向き、横向き、ワイドスクリーンなど、さまざまなデザインニーズに対応する出力を生成。
  • プロダクション対応 API:堅牢な REST API を通じて、アプリケーションやツール、クリエイティブパイプラインに簡単に統合可能。
  • 高速かつ低コスト:使用ベースの料金体系で、高品質な画像編集を提供。冷スタートの問題なし。

🛠️ 技術仕様

パラメータタイプ必須デフォルト値選択肢説明
images配列はいN/AN/A編集する参照画像の URL リスト。
prompt文字列はいN/AN/A希望する編集内容を記述するプロンプト。
aspect_ratio文字列いいえ自動検出1:1、3:2、2:3、3:4、4:3、4:5、5:4、9:16、16:9、21:9生成画像のアスペクト比。指定がない場合、入力画像から自動検出されます。
resolution文字列いいえ1k1k、2k出力画像の解像度。
quality文字列いいえ低、中、高生成画像の品質。高品質はより高い料金が発生します。

プロンプト例

この商品写真を高級スタジオ広告に変換してください。柔らかい映画風の照明、清潔なベージュの背景、微妙な影、リアルな反射効果、高級ブランドの美学を取り入れてください。


💰 料金

モデルモダリティ入力 (Input)キャッシュ済み入力出力 (Output)
gpt-image-2画像$8.00$2.00$30.00
テキスト$5.00$1.25-

💡 主な利用ケース

  • 商品写真の強化:基本的な商品写真を高級マーケティングビジュアルに変換。
  • クリエイティブな修正:背景、照明、スタイル、構図を自然言語指示で変更。
  • マーケティング適応:既存のブランド素材を新しいキャンペーンビジュアルに再利用。
  • ソーシャルメディアコンテンツ:投稿、広告、プロモーション用にプラットフォーム対応の形式で画像を迅速に編集。
  • デザインの反復:異なるプロンプトを使用して同じベース画像から複数のビジュアル方向を探索。
  • Eコマースの最適化:商品リスト、ヒーローバナー、プロモーション素材のプレゼンテーションを改善。

🔗 関連モデル

  • OpenAI GPT Image 2 Text-to-Image:自然言語プロンプトから直接新しい画像を生成。

プロのヒント:変更しない部分と変更する部分を具体的に記述してください。視覚的なスタイル、照明、雰囲気を明確に述べることで、最適な結果を得られます。


関連モデル

xAI Grok Imagine Image v2.0 テキストから画像生成
Text to ImageX Ai

xAI Grok Imagine Image v2.0 テキストから画像生成

xAI Grok Imagine Image V2.0 Text-to-Image は、テキストプロンプトから高品質な画像を生成できます。アスペクト比、解像度、品質を設定でき、クリエイティブ制作、SNS コンテンツ、マーケティング素材、制作ワークフローに適しています。すぐに使える REST 推論 API を提供し、高性能、コールドスタートなし、手頃な価格で利用できます。

$0.080 / 1 回
Qwen Image 3.0 Pro テキストから画像生成
Text to ImageQwen Image 3.0 Pro

Qwen Image 3.0 Pro テキストから画像生成

Qwen Image 3.0 Pro は、優れた画質と高度なプロンプト理解を備えたプロ向けのテキストから画像生成モデルです。最大 2k に対応。すぐに使える REST inference API を提供し、高性能・コールドスタートなし・手頃な価格を実現しています。

$0.080 / 1 回
OpenAI GPT Image 2 テキストから画像生成
Text to ImageOpenAI

OpenAI GPT Image 2 テキストから画像生成

OpenAI の GPT Image 2 テキストから画像生成モデルは、自然言語プロンプトから高品質な画像を生成します。すぐに使える REST 推論 API、最高のパフォーマンス、コールドスタートなし、手頃な価格。

$0.660 / 1 回
Nami Z-Image T2I Spicy
Text to Image

Nami Z-Image T2I Spicy

テキストプロンプトから画像を生成します。幅、高さ、プロンプト最適化、シードを設定できます。

$0.020 / 1 回
Nano Banana テキストから画像
Text to ImageGoogle

Nano Banana テキストから画像

Gemini 2.5 Flash Image。軽量かつ高速。大量生成やプロトタイピングに最適な、最も手頃なモデル。

$0.040 / 1 回
Nano Banana Pro テキストから画像
Text to ImageGoogle

Nano Banana Pro テキストから画像

Gemini 3.0 Pro Image。4K 高画質、多言語テキスト描画、プロ仕様のカメラ制御に対応したハイエンドモデル。

$0.140 / 1 回
Nano Banana Pro テキストから画像
Text to ImageGoogle

Nano Banana Pro テキストから画像

Gemini 3.0 Pro Image。4K 高画質、多言語テキスト描画、プロ仕様のカメラ制御に対応したハイエンドモデル。

$0.070 / 1 回
Google Nano Banana Lite テキストから画像生成 API
Text to ImageGoogle

Google Nano Banana Lite テキストから画像生成 API

Google Nano Banana 2 Lite Text to Image は、テキストのプロンプトから高品質な画像を低レイテンシで生成できます。柔軟なアスペクト比に対応し、クリエイティブ制作や実運用のワークフローで素早く画像を作成できます。すぐに使える REST 推論 API、優れたパフォーマンス、コールドスタートなし、手頃な価格。

$0.040 / 1 回