image_urlsarray<string>必須料金に影響Sunburst の編集には 1〜16 枚の素材を順番に渡し、それぞれの役割を指示します。通常料金では各出力に参照画像ごとの入力料が加算されます。
- デフォルト値
- 指定なし
- 制約
- minItems:1maxItems:16
openai/gpt-image-2.5-sunburst/editOpenAI の GPT Image 2.5 Sunburst の画像編集は、元画像 1〜16 枚と変更内容の説明を受けます。Sunburst の編集には 1〜16 枚の素材を順番に渡し、それぞれの役割を指示します。通常料金では各出力に参照画像ごとの入力料が加算されます。
例は、選択中のエンドポイントの公開パラメーター定義から作っています。API キーとサンプル素材を差し替えて、ご自身のサーバーから送信してください。
SDK・連携https://api.spicyapi.ai/api/v1/jobs/createTaskAPI キーはサーバーの環境変数 SPICY_API_KEY に保存します。Bearer 認証を使用し、JSON リクエストには Content-Type: application/json を指定してください。
Authorization: Bearer $SPICY_API_KEY
# Generate the idempotency key once; reuse it when retrying after a lost response.
export SPICY_IDEMPOTENCY_KEY="${SPICY_IDEMPOTENCY_KEY:-$(uuidgen)}"
curl -X POST https://api.spicyapi.ai/api/v1/jobs/createTask \
-H "Authorization: Bearer $SPICY_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $SPICY_IDEMPOTENCY_KEY" \
-d '{
"model": "openai/gpt-image-2.5-sunburst/edit",
"input": {
"aspect_ratio": "1:1",
"background": "auto",
"image_urls": [
"https://example.com/reference.png"
],
"input_fidelity": "low",
"num_outputs": 1,
"output_format": "png",
"prompt": "A ceramic teapot on a linen cloth, soft window light, muted palette"
}
}'
# Copy data.taskId from the response into TASK_ID, then poll the status.
TASK_ID="TASK_ID_FROM_RESPONSE"
curl "https://api.spicyapi.ai/api/v1/jobs/recordInfo?taskId=$TASK_ID" \
-H "Authorization: Bearer $SPICY_API_KEY"このモデルの入力スキーマから生成した例です。API はどのリクエストも、同じスキーマで検証します。
これらのフィールドは、リクエスト本文の input オブジェクトに指定します。名前と型は API と一致します。デフォルト値の指定がない項目に、デフォルト値があると想定しないでください。
image_urlsarray<string>必須料金に影響Sunburst の編集には 1〜16 枚の素材を順番に渡し、それぞれの役割を指示します。通常料金では各出力に参照画像ごとの入力料が加算されます。
promptstring必須最大 5,000 文字です。画像内に入れたい語句はすべて二重引用符で囲み、置く場所も書いてください。それ以外は描写として読まれます。プロンプトの最初の 100 入力トークンは画像の料金に含まれます。それを超える分は 1 トークンごとに少額の料金が加わり、見積もりに表示されます。中国語・日本語・韓国語の文字はおよそ 1 文字 1 トークン、それ以外の文字はおよそ 4 文字で 1 トークンとして数えます。
official_fallbackboolean任意GPT Image 2.5 Sunburst は出力画像ごとに品質・サイズ・比率で課金し、通常料金の編集には各出力に素材ごとの入力料が加わり、同じ段階では縦長・横長が正方形より安くなります。GPT Image 2.5 Sunburst の割安な対象は high・1k・PNG を 1 枚、比率が 1:1、3:2、2:3、4:3、3:4、16:9、9:16、編集ではさらにマスクなし・input_fidelity low・background auto の場合です。Official fallback は初期状態でオンで、割安な実行が拒否または未完了なら通常料金で再実行し、GPT Image 2.5 Sunburst の見積もりに開始額と上限を示します。この Sunburst では対象外設定を最初から通常料金で、オフ時は対象外を拒否しますが、対象内でも成功を保証しません。GPT Image 2.5 Sunburst の拒否は課金されず、通常料金の場合のみ最初の 100 トークンを超える入力料がリクエストごとに 1 回加わり、中国語・日本語・韓国語はおよそ 1 文字 1 トークン、その他は約 4 文字 1 トークンと見積もります。
output_qualityinteger任意Sunburst の JPEG・WebP 圧縮品質は 0〜100 です。高い値ほど細部を残して容量が増えますが、料金は変わらず、PNG では使いません。
output_formatstring任意Sunburst の保存形式は標準が PNG です。JPEG・WebP への変更でレンダリング料金は変わりません。
"png""jpeg""webp"backgroundstring任意Sunburst で切り抜きを作る場合は背景を auto から transparent に変え、PNG か WebP で保存します。編集では opaque も選べます。
"auto""transparent""opaque"input_fidelitystring任意Sunburst の input fidelity は low が標準です。参照の細部を重視するときは high に変更でき、保真度の追加料金はかかりません。
"low""high"num_outputsinteger任意料金に影響Sunburst の比較候補は初期値の 1 枚から最大 10 枚まで指定でき、返される画像ごとに課金されます。
qualitystring任意料金に影響Sunburst の品質は low、medium、high、xhigh、max の順です。初期値は high で、上位設定では細部にかける時間と料金が増えます。
"low""medium""high""xhigh""max"resolutionstring任意料金に影響Sunburst の納品サイズは 1k、2k、4k です。正方形の幅は 1024、2048、2880 ピクセルで、大きな仕上がりほど料金も上がります。
"1k""2k""4k"aspect_ratiostring任意料金に影響Sunburst の完成レイアウトは 1:3〜3:1 の 15 種類から選べます。標準は 1:1 で、元画像より指定比率が優先され、見積もりにも反映されます。
"1:1""1:2""1:3""2:1""2:3""3:1""3:2""3:4""4:3""4:5""5:4""9:16""9:21""16:9""21:9"mask_urlstring任意Sunburst 用マスクは最初の参照画像と同じピクセル寸法の PNG にします。透明領域を修正対象、不透明領域を保持対象とし、省略時は指示文で編集します。Sunburst の質感修正では境界も確認してください。マスクは指針であり、対象をピクセル単位で完全に分離する保証ではありません。
{
"additionalProperties": false,
"properties": {
"aspect_ratio": {
"default": "1:1",
"description": "Output aspect ratio.",
"enum": [
"1:1",
"1:2",
"1:3",
"2:1",
"2:3",
"3:1",
"3:2",
"3:4",
"4:3",
"4:5",
"5:4",
"9:16",
"9:21",
"16:9",
"21:9"
],
"type": "string",
"x-ui": {
"affects_price": true,
"order": 80,
"widget": "select"
}
},
"background": {
"default": "auto",
"description": "Background treatment of the result.",
"enum": [
"auto",
"transparent",
"opaque"
],
"type": "string",
"x-ui": {
"order": 50,
"widget": "radio"
}
},
"image_urls": {
"description": "One to 16 source images, in the order your prompt refers to them.",
"items": {
"contentMediaType": [
"image/jpeg",
"image/png",
"image/webp",
"image/gif"
],
"format": "uri",
"minLength": 1,
"type": "string"
},
"maxItems": 16,
"minItems": 1,
"type": "array",
"x-ui": {
"affects_price": true,
"max_size_mb": 10,
"order": 90,
"widget": "multi-upload"
}
},
"input_fidelity": {
"default": "low",
"description": "How closely to keep the look of the source images.",
"enum": [
"low",
"high"
],
"type": "string",
"x-ui": {
"order": 55,
"widget": "radio"
}
},
"mask_url": {
"contentMediaType": [
"image/jpeg",
"image/png",
"image/webp",
"image/gif"
],
"description": "Optional PNG mask: transparent pixels mark the area to repaint in the first source image.",
"format": "uri",
"type": "string",
"x-ui": {
"accept": [
"image/png"
],
"mask": {
"edit": "transparent",
"source": "image_urls"
},
"max_size_mb": 10,
"order": 88,
"widget": "upload"
}
},
"num_outputs": {
"default": 1,
"description": "How many images to return, each billed separately.",
"maximum": 10,
"minimum": 1,
"type": "integer",
"x-ui": {
"affects_price": true,
"order": 60,
"step": 1,
"widget": "slider"
}
},
"official_fallback": {
"default": true,
"description": "If the economy route cannot complete the request, retry it on the official route and bill it at the official price.",
"type": "boolean",
"x-ui": {
"order": 10,
"widget": "switch"
}
},
"output_format": {
"default": "png",
"description": "File format of the returned images.",
"enum": [
"png",
"jpeg",
"webp"
],
"type": "string",
"x-ui": {
"order": 20,
"widget": "select"
}
},
"output_quality": {
"description": "Compression quality for JPEG and WebP, from 0 to 100.",
"maximum": 100,
"minimum": 0,
"type": "integer",
"x-ui": {
"order": 15,
"step": 1,
"widget": "slider"
}
},
"prompt": {
"description": "Say what to change and what must stay the same.",
"maxLength": 5000,
"minLength": 1,
"type": "string",
"x-ui": {
"order": 100,
"reference_tokens": {
"image_urls": "Image {index}"
},
"widget": "textarea"
}
},
"quality": {
"default": "high",
"description": "Rendering quality. Higher tiers add detail, time and cost.",
"enum": [
"low",
"medium",
"high",
"xhigh",
"max"
],
"type": "string",
"x-ui": {
"affects_price": true,
"order": 76,
"widget": "select"
}
},
"resolution": {
"default": "1k",
"description": "Output size tier.",
"enum": [
"1k",
"2k",
"4k"
],
"type": "string",
"x-ui": {
"affects_price": true,
"order": 78,
"widget": "radio"
}
}
},
"required": [
"prompt",
"image_urls"
],
"type": "object",
"x-pricing": {
"billingMode": "formula",
"variantFields": [
"quality",
"resolution",
"aspect_ratio"
]
}
}HTTP 202 はタスクを受け付けたという意味で、生成が終わったという意味ではありません。返ってきた taskId を保存し、そのタスクの状態を問い合わせてください。結果を待っている間に、同じ内容でタスクを作り直さないでください。
HTTP/1.1 202 Accepted
Location: /api/v1/jobs/recordInfo?taskId=job_01k3m8x9q2z4v7n5p6r8s0t1w3
{
"code": 200,
"msg": "success",
"request_id": "req_example_create",
"data": {
"taskId": "job_01k3m8x9q2z4v7n5p6r8s0t1w3",
"state": "queued",
"estimatedCost": "0.750000"
}
}受理レスポンスには今回の概算料金が含まれるため、アプリのタスク履歴と請求画面に同じ金額を表示できます。
curl --get "https://api.spicyapi.ai/api/v1/jobs/recordInfo" \
--data-urlencode "taskId=$TASK_ID" \
-H "Authorization: Bearer $SPICY_API_KEY"ポーリングは約 2 秒間隔から始め、徐々に間隔を延ばします。終了状態になったら止めてください。通信が切れたときも、元の taskId で状態を確認します。作成をやり直すときは、同じ冪等キーと同じ本文をそのまま使い回してください。
import { verifyWebhook } from "@spicyapi/sdk";
// express.raw keeps the bytes we signed; express.json never matches.
app.post("/hooks/spicy", express.raw({ type: "application/json" }), (req, res) => {
const { payload } = verifyWebhook({
rawBody: req.body,
timestamp: req.header("X-Webhook-Timestamp"),
signature: req.header("X-Webhook-Signature"),
payloadVersion: Number(req.header("X-Webhook-Payload-Version")),
secret: process.env.SPICY_WEBHOOK_SECRET,
});
res.status(200).end();
void handleFinishedTask(payload);
});タスク作成時に callBackUrl を渡せば、完了したレコードが POST で届きます——ポーリングは一切不要です。配信には毎回 X-Webhook-Timestamp、X-Webhook-Signature、X-Webhook-Payload-Version が付きます。署名は taskId.timestamp.sha256(body) に対する HMAC-SHA256(base64)なので、生のバイト列で検証してください。JSON を解析して再度文字列化するとバイト列が変わり、検証は必ず失敗します。失敗した配信は再送されるため同じ taskId が二度届くことがあります。ハンドラーは冪等に。まず 2xx を返し、処理はその後で——応答が遅いと配信失敗として扱われます。
output を読むのは、state が succeeded のときだけにしてください。失敗したときは errorCode、errorMessage、request_id を手がかりに調べます。例に出ている料金や状態は、実際の請求ではありません。
{
"code": 200,
"msg": "success",
"request_id": "req_example_record",
"data": {
"taskId": "job_01k3m8x9q2z4v7n5p6r8s0t1w3",
"model": "openai/gpt-image-2.5-sunburst/edit",
"state": "succeeded",
"output": {
"assets": [
{
"key": "tasks/2026/08/28/job_01k3m8x9q2z4v7n5p6r8s0t1w3/3f7a1c9e5b2d48f0a6c1e3d5b7f9a1c3.png",
"mime": "image/png",
"url": "https://example.r2.cloudflarestorage.com/results/job_01k3m8x9q2z4v7n5p6r8s0t1w3/result.png?X-Amz-Signature=SIGNATURE_FROM_RESPONSE",
"expiresAt": "2026-08-28T12:20:08.000Z"
}
]
},
"cost": "0.750000",
"settled": true,
"createdAt": "2026-08-28T12:00:00Z",
"completedAt": "2026-08-28T12:00:30Z"
}
}利用可能なファイルは assets[].url からそのまま開くか、ダウンロードできます。API の Authorization ヘッダーは不要です。署名付き URL は expiresAt で失効しますが、保存期間内であればタスクを再取得することで更新できます。処理中または利用できないファイルに URL はありません。署名付き URL は非公開情報として扱ってください。
アプリ、ターミナル、AI アシスタント、ビジュアルワークフローで SpicyAPI を活用。接続ガイドを選んでください。
上のコードを書く必要はありません。MCP サーバーを 1 回接続すれば、MCP に対応するエージェント(Claude Code、Codex、Cursor、Windsurf、VS Code、Gemini CLI、Cline、LibreChat)がこのモデルを名前で実行できます。シェルから 1 つのコマンドで実行することもできます。
Use openai/gpt-image-2.5-sunburst/edit to edit ./poster.png — warmer light, cleaner background — and save the result next to it.
エージェントは公開カタログからモデルを引き、ローカルファイルを代わりにアップロードし、正確な見積もりと上限額を示して確認を待ちます。承認するまで課金は発生しません。
claude mcp add spicyapi -e SPICY_API_KEY=$SPICY_API_KEY \
-- npx --yes --package=@spicyapi/mcp spicyapi-mcp
npx skills add spicyapi-ai/spicy-skill1 行目でツールを、2 行目で Skill を渡します。Skill は使い方の取り決めです——課金の前に見積もりを取り、ローカルファイルはバイト列を貼らずにアップロードし、完成した成果物の URL を推測せずに読む。ほかのクライアントも同じサーバーをそれぞれの設定ファイルから使います。開発者向けページをご覧ください。
npx @spicyapi/cli tasks create --model openai/gpt-image-2.5-sunburst/edit \
--input-json '{"aspect_ratio":"1:1","background":"auto","image_urls":["https://example.com/reference.png"],"input_fidelity":"low","num_outputs":1,"output_format":"png","prompt":"A ceramic teapot on a linen cloth, soft window light, muted palette"}' \
--wait入力は上の例と同じ、このエンドポイント固有のスキーマに従います。--wait はタスクの完了までポーリングして結果を表示します。CI では --yes を追加すると確認を省略できます。先に SPICY_API_KEY を設定してください。API、CLI、MCP サーバーで同じキーを使えます。
npx @spicyapi/cli tasks create --model openai/gpt-image-2.5-sunburst/edit \
--input-json '{…}' --retention 1h --wait
npx @spicyapi/cli tasks get $TASK_ID # read back the retention that applied--retention は保持期間を短くするだけです——30m、1h、7d、あるいは 0 なら終了と同時に削除。実際に効くのはリクエスト・アカウント設定・プラットフォーム上限のうち最も短い値なので、指定した数値が通った前提で進めず、タスクレコードから読み戻してください。アカウントの許容より長い値を渡しても何も起きません。
ComfyUI Manager か下のコマンドで SpicyAPI ノードをインストールしたら、キャンバスで GPT Image 2.5 Sunburst · Image Editing を検索してください。このノードにはこのページと同じオプションがあり、実行前に価格が表示されます。
cd ComfyUI/custom_nodes
git clone https://github.com/spicyapi-ai/comfyui-spicyapi埋め込みパネルはこのページと同じスキーマを参照するため、API 仕様とのずれを防げます。ドキュメント内の検索対象にする場合は、/api/embed/models/ の JSON を取得して描画してください。
<iframe src="https://spicyapi.ai/embed/ja/models/gpt-image-2-5-sunburst/api?model=openai%2Fgpt-image-2.5-sunburst%2Fedit" width="100%" height="560" loading="lazy" title="リクエスト例" style="border:1px solid rgba(0,0,0,.12)"></iframe>