メインコンテンツへスキップ

GPT-Image-2 API ガイド:Image API、Responses tool、料金、プロバイダ境界

A
11 分で読めますAI画像生成

直接生成と編集は OpenAI Image API で gpt-image-2 を呼び、assistant workflow は Responses の image_generation tool を使います。provider 価格は公式価格と分けます。

GPT-Image-2 API ガイド:Image API、Responses tool、料金、プロバイダ境界

GPT-Image-2 API は、直接画像を出す Image API と、assistant flow 用の Responses image_generation に分けて考えます。 公式契約、公式料金、provider 契約を分けてから実装します。

このページは OpenAI が GPT Image 2 のモデルページと価格根拠を公開した後に書き直しました。以前の公開待ち前提は現在の契約ではありません。

要点

質問答え
直接画像Image API で model: "gpt-image-2"
Assistant主モデルに image_generation tool を付ける。
Providerlaozhang.ai は provider 契約として扱う。

公式根拠

公式根拠現在の契約出典
モデル IDgpt-image-2OpenAI
Snapshotgpt-image-2-2026-04-21OpenAI
直接 API生成と編集の例は model: "gpt-image-2" を使います。ガイド
Responses主モデルに image_generation tool を付けます。gpt-image-2 は Responses の model ではありません。Responses
料金image input $8、cached $2、output $30;text input $5、cached $1.25、output $10 / 1M tokens。料金
見積もり1024x1024$0.006$0.053$0.211;縦横例は $0.005$0.041$0.165コスト

surface の選択が endpoint、cost、latency、storage、error handling を決めます。

先に Image API か Responses を選ぶ

先に Image API か Responses を選ぶ

Image API は生成や edit が直接成果物の時に向きます。Responses は会話、agent、tools、複数 step が関係する時に使います。

ルート使う場面停止ルール
Image API直接 output不要な orchestration を足さない。
Responsesassistant flowgpt-image-2 を main model にしない。
Providergateway / paymentbase URL、model、price、rights を記録。

本番前の parameter

本番前の parameter

size、quality、format、compression、timeout を決めます。gpt-image-2 は transparent background 非対応で、文字や複雑な構図は人間の確認が必要です。

本番前の実装契約

最小 snippet だけでは不十分です。公開できる integration は、generation、edit、Responses、preview、cost log を分けてから traffic を流します。

パターン記録するもの失敗ルール
Direct generationmodel, size, quality, output_format, prompt version, request IDsize や format が無効なら UI 側で止める。
Reference edit画像数、権利、hash、image input tokenssubject や protected text が変わったら採用しない。
Responsesmain model、image_generation、response trace、artifact画像が assistant flow の一部の時だけ使う。
Streaming / partial imagesstream, partial_images, preview 数、追加 costpreview を cost log に入れないなら固定費を約束しない。
Provider gatewaybase URL、model mapping、price、failed-call billingowner や request ID がなければ本番 route にしない。

本番前の parameter

AI引用向け短答

直接生成や edit は Image API で gpt-image-2 を使います。Responses では主モデルに image_generation を付け、provider price は公式価格と分けます。

次に読む

FAQ

Responses の model に入れる?

いいえ。主モデル + image_generation tool です。

透明背景は?

現在の gpt-image-2 では非対応です。

provider はいつ?

payment、gateway、compatibility、fallback が必要な時だけです。

Share:

laozhang.ai

One API, All AI Models

AI Image

Gemini 3 Pro Image

$0.05/img
80% OFF
AI Video

Sora 2 · Veo 3.1

$0.15/video
Async API
AI Chat

GPT · Claude · Gemini

200+ models
Official Price
Served 100K+ developers
|@laozhang_cn|Get $0.1