PopNowAPI ドキュメント
本文

GPT Image 2.6 Flare API リファレンス

OpenAI の高速モデル、下書き、編集、ループ GIF に

PopNow の API キー 1 つで、GPT Image 2.6 Flare を自分のコードから呼び出せます。送るモデル ID、受け付ける入力フィールド、1 回あたりの料金(USD)、ターミナルに貼ってそのまま動くリクエストをこのページにまとめました。

パラメーターの説明はモデルの入力 schema から取っているため、英語のみです。

概要

開発元
OpenAI
出力
画像
最安
$0.02232 USD 画像 1 枚あたり
目安の所要時間
約 29 秒

料金は USD で表示され、PopNow の残高から差し引かれます。受付時に最大料金を確保し、完了後に実際の使用量で精算して差額を返却します。失敗したタスクは課金されません。実行前の正確な見積もりは POST /api/v1/jobs/quote で取得できます。

画像を作成

openai/gpt-image-2.6-flare/text-to-image

料金

オプションUSD
quality = low, resolution = 1k$0.02232 画像 1 枚あたり
quality = low, resolution = 512$0.027 画像 1 枚あたり
quality = medium, resolution = 1k$0.03915 画像 1 枚あたり
quality = low, resolution = 2k$0.04131 画像 1 枚あたり
quality = low, resolution = 768$0.04392 画像 1 枚あたり
quality = high, resolution = 1k$0.04743 画像 1 枚あたり
quality = medium, resolution = 512$0.04752 画像 1 枚あたり
quality = high, resolution = 512$0.05742 画像 1 枚あたり
quality = medium, resolution = 2k$0.07299 画像 1 枚あたり
quality = low, resolution = 4k$0.07479 画像 1 枚あたり
quality = medium, resolution = 768$0.07776 画像 1 枚あたり
quality = xhigh, resolution = 1k$0.08433 画像 1 枚あたり
quality = high, resolution = 2k$0.08847 画像 1 枚あたり
quality = high, resolution = 768$0.09432 画像 1 枚あたり
quality = xhigh, resolution = 512$0.10206 画像 1 枚あたり
quality = medium, resolution = 4k$0.13221 画像 1 枚あたり
quality = xhigh, resolution = 2k$0.15723 画像 1 枚あたり
quality = high, resolution = 4k$0.16011 画像 1 枚あたり
quality = xhigh, resolution = 768$0.1674 画像 1 枚あたり
quality = max, resolution = 1k$0.18972 画像 1 枚あたり
quality = max, resolution = 512$0.22941 画像 1 枚あたり
quality = xhigh, resolution = 4k$0.28512 画像 1 枚あたり
quality = max, resolution = 2k$0.35379 画像 1 枚あたり
quality = max, resolution = 768$0.37638 画像 1 枚あたり
quality = max, resolution = 4k$0.64044 画像 1 枚あたり

リクエストごとに実際に使用したトークンで課金します。テキスト入力は 100 万トークンあたり $4.5、画像入力は $7.2、画像出力は $27 です。表は各段階の正方形画像の価格で、ほかの比率は通常これより安くなります。複数枚を出力する場合、入力トークンは枚数分計上されます。

パラメーター

フィールド型既定値指定できる値説明
prompt必須string—5,000 文字までDescribe the picture: subject, setting, light and any short text to render in quotes.
aspect_ratio任意string1:11:1, 16:9, 9:16, 4:3, 3:4, 3:2, 2:3, 21:9, 9:21, 2:1, 1:2, 3:1, 1:3, 5:4, … (+1)Output aspect ratio.
resolution任意string1k1k, 2k, 4k, 512, 768Output size tier: 1k is about 1 megapixel, 2k about 3.7, 4k about 8.3. For GIF output use 512 or 768, the size of one frame.
quality任意stringmediumlow, medium, high, xhigh, maxRendering quality. Higher tiers add detail, time and cost.
reasoning_effort任意string—low, medium, highHow much the model plans the picture before drawing. Higher helps dense text and complex layouts and takes longer; the price does not change. Leave it unset for the model default (high).
num_outputs任意integer11〜10How many images to return, each billed separately.
background任意stringautoauto, transparent, opaqueBackground treatment. Transparent needs PNG or WebP output.
output_format任意stringpngpng, jpeg, webp, gifFile format of the returned images. gif returns an animated loop; describe the motion in the prompt.
frame_count任意integer—2〜16Number of frames in a GIF, 2 to 16 (default 9). Every 8 frames are billed as one more frame sheet. Only with gif output.
frame_duration_ms任意integer—20〜2000How long each GIF frame stays on screen, 20 to 2000 milliseconds (default 200). Only with gif output.
output_quality任意integer—0〜100Compression quality for JPEG and WebP output, from 0 to 100.

リクエスト例

このリクエストはそのまま実行できます。省略したフィールドには既定値が入ります。先にキーを環境変数 POPNOW_API_KEY に設定してください。

POST /api/v1/jobs/createTask?wait=60
curl -X POST "https://api.popnow.ai/api/v1/jobs/createTask?wait=60" \
  -H "Authorization: Bearer $POPNOW_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "model": "openai/gpt-image-2.6-flare/text-to-image",
  "input": {
    "prompt": "A cozy reading nook beside a rain-streaked window, warm lamp light, a sleeping orange cat on a knitted blanket, soft film grain",
    "num_outputs": 1,
    "quality": "medium",
    "resolution": "1k"
  }
}'

レスポンスにはすぐに taskId が入ります。結果は GET /api/v1/jobs/recordInfo で取得するか、callBackUrl を付けて通知を受け取ります。

GET /api/v1/jobs/recordInfo
curl "https://api.popnow.ai/api/v1/jobs/recordInfo?taskId=TASK_ID_FROM_CREATE_TASK" \
  -H "Authorization: Bearer $POPNOW_API_KEY"

画像を編集

openai/gpt-image-2.6-flare/edit

料金

オプションUSD
quality = low, resolution = 1k$0.02232 画像 1 枚あたり
quality = medium, resolution = 1k$0.03915 画像 1 枚あたり
quality = low, resolution = 2k$0.04131 画像 1 枚あたり
quality = high, resolution = 1k$0.04743 画像 1 枚あたり
quality = medium, resolution = 2k$0.07299 画像 1 枚あたり
quality = low, resolution = 4k$0.07479 画像 1 枚あたり
quality = xhigh, resolution = 1k$0.08433 画像 1 枚あたり
quality = high, resolution = 2k$0.08847 画像 1 枚あたり
quality = medium, resolution = 4k$0.13221 画像 1 枚あたり
quality = xhigh, resolution = 2k$0.15723 画像 1 枚あたり
quality = high, resolution = 4k$0.16011 画像 1 枚あたり
quality = max, resolution = 1k$0.18972 画像 1 枚あたり
quality = xhigh, resolution = 4k$0.28512 画像 1 枚あたり
quality = max, resolution = 2k$0.35379 画像 1 枚あたり
quality = max, resolution = 4k$0.64044 画像 1 枚あたり

リクエストごとに実際に使用したトークンで課金します。テキスト入力は 100 万トークンあたり $4.5、画像入力は $7.2、画像出力は $27 です。表は各段階の正方形画像の価格で、ほかの比率は通常これより安くなります。複数枚を出力する場合、入力トークンは枚数分計上されます。

パラメーター

フィールド型既定値指定できる値説明
prompt必須string—5,000 文字までSay what to change and what must stay the same. Refer to the images as Image 1, Image 2 and so on.
image_urls必須array<string (uri)>—16 件までOne to 16 source images, in the order your prompt refers to them. Each one adds a small charge.
mask_url任意string (uri)——Optional PNG mask: transparent pixels mark the area to repaint in the first image, same size as that image. Cannot be combined with markup_url.
markup_url任意string (uri)——Optional transparent PNG with circles, sketches or notes drawn over the first image to show what to change, same size as that image. Cannot be combined with mask_url.
aspect_ratio任意string—1:1, 16:9, 9:16, 4:3, 3:4, 3:2, 2:3, 21:9, 9:21, 2:1, 1:2, 3:1, 1:3, 5:4, … (+1)Output aspect ratio. Leave it unset to keep the first image's shape (1k only); pick a ratio for 2k or 4k.
resolution任意string1k1k, 2k, 4kOutput size tier: 1k is about 1 megapixel, 2k about 3.7, 4k about 8.3.
quality任意stringmediumlow, medium, high, xhigh, maxRendering quality. Higher tiers add detail, time and cost.
reasoning_effort任意string—low, medium, highHow much the model plans the picture before drawing. Higher helps dense text and complex layouts and takes longer; the price does not change. Leave it unset for the model default (high).
num_outputs任意integer11〜10How many images to return, each billed separately.
background任意stringautoauto, transparent, opaqueBackground treatment. Transparent needs PNG or WebP output.
output_format任意stringpngpng, jpeg, webpFile format of the returned images.
output_quality任意integer—0〜100Compression quality for JPEG and WebP output, from 0 to 100.

リクエスト例

このリクエストはそのまま実行できます。省略したフィールドには既定値が入ります。先にキーを環境変数 POPNOW_API_KEY に設定してください。

例の image_urls には PopNow のサンプル素材を使っています。自分の公開 HTTPS リンク、アップロードしたファイル、保存済みアセットに置き換えてください。

POST /api/v1/jobs/createTask
curl -X POST "https://api.popnow.ai/api/v1/jobs/createTask" \
  -H "Authorization: Bearer $POPNOW_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "model": "openai/gpt-image-2.6-flare/edit",
  "input": {
    "prompt": "Change the orange jacket to deep forest green and add soft golden-hour light; keep the face, pose and background unchanged",
    "image_urls": [
      "https://media.popnow.ai/influencer/examples/marco.webp"
    ],
    "num_outputs": 1,
    "quality": "medium",
    "resolution": "1k"
  }
}'

レスポンスにはすぐに taskId が入ります。結果は GET /api/v1/jobs/recordInfo で取得するか、callBackUrl を付けて通知を受け取ります。

GET /api/v1/jobs/recordInfo
curl "https://api.popnow.ai/api/v1/jobs/recordInfo?taskId=TASK_ID_FROM_CREATE_TASK" \
  -H "Authorization: Bearer $POPNOW_API_KEY"

次に読む

このページの内容