GPT Image 2.6 Sunburst API 调用参考
OpenAI 精准档,多次编辑细节稳定,最高 4K
用一个 PopNow API 密钥,就能在自己的代码里调用 GPT Image 2.6 Sunburst。下面列出要填的调用名、这个型号接受的每个输入字段、每次请求花多少美元(USD),以及一段可以直接粘进终端运行的请求。
参数说明直接取自型号的输入 schema,暂时只有英文。
一览
- 出品方
- OpenAI
- 产出
- 图片
- 起价
- $0.02232 USD 每张图
- 一般耗时
- 约 50 秒
价格以 USD 显示,从你的 PopNow 余额扣款。任务受理时预留可能的最高费用,完成后按实际用量结算并释放余款;失败任务不收费。运行前可调用 POST /api/v1/jobs/quote 获取准确报价。
生成图片
openai/gpt-image-2.6-sunburst/text-to-image
价格
| 选项 | USD |
|---|---|
quality = low, resolution = 1k | $0.02232 每张图 |
quality = low, resolution = 512 | $0.027 每张图 |
quality = medium, resolution = 1k | $0.03915 每张图 |
quality = low, resolution = 2k | $0.04131 每张图 |
quality = low, resolution = 768 | $0.04392 每张图 |
quality = high, resolution = 1k | $0.04743 每张图 |
quality = medium, resolution = 512 | $0.04752 每张图 |
quality = high, resolution = 512 | $0.05742 每张图 |
quality = medium, resolution = 2k | $0.07299 每张图 |
quality = low, resolution = 4k | $0.07479 每张图 |
quality = medium, resolution = 768 | $0.07776 每张图 |
quality = xhigh, resolution = 1k | $0.08433 每张图 |
quality = high, resolution = 2k | $0.08847 每张图 |
quality = high, resolution = 768 | $0.09432 每张图 |
quality = xhigh, resolution = 512 | $0.10206 每张图 |
quality = medium, resolution = 4k | $0.13221 每张图 |
quality = xhigh, resolution = 2k | $0.15723 每张图 |
quality = high, resolution = 4k | $0.16011 每张图 |
quality = xhigh, resolution = 768 | $0.1674 每张图 |
quality = max, resolution = 1k | $0.18972 每张图 |
quality = max, resolution = 512 | $0.22941 每张图 |
quality = xhigh, resolution = 4k | $0.28512 每张图 |
quality = max, resolution = 2k | $0.35379 每张图 |
quality = max, resolution = 768 | $0.37638 每张图 |
quality = max, resolution = 4k | $0.64044 每张图 |
按每次请求实际用掉的 token 计费:文本输入每百万 $4.5,图片输入每百万 $7.2,图片输出每百万 $27。表里是各档方图的价格,其他比例通常更便宜。一次出多张时,输入 token 按张数计。
参数
| 字段 | 类型 | 默认值 | 取值范围 | 作用 |
|---|---|---|---|---|
prompt必填 | string | — | 最多 5000 个字符 | Describe the picture: subject, setting, light and any short text to render in quotes. |
aspect_ratio可选 | string | 1:1 | 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. |
resolution可选 | string | 1k | 1k, 2k, 4k, 512, 768 | Output 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可选 | string | medium | low, medium, high, xhigh, max | Rendering quality. Higher tiers add detail, time and cost. |
reasoning_effort可选 | string | — | low, medium, high | How 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可选 | integer | 1 | 1 到 10 | How many images to return, each billed separately. |
background可选 | string | auto | auto, transparent, opaque | Background treatment. Transparent needs PNG or WebP output. |
output_format可选 | string | png | png, jpeg, webp, gif | File format of the returned images. gif returns an animated loop; describe the motion in the prompt. |
frame_count可选 | integer | — | 2 到 16 | Number 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 到 2000 | How long each GIF frame stays on screen, 20 to 2000 milliseconds (default 200). Only with gif output. |
output_quality可选 | integer | — | 0 到 100 | Compression quality for JPEG and WebP output, from 0 to 100. |
请求示例
这段请求原样就能运行,没写的字段都用默认值。运行前先把密钥放进环境变量 POPNOW_API_KEY。
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-sunburst/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 等通知。
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-sunburst/edit
价格
| 选项 | USD |
|---|---|
quality = low, resolution = 1k | $0.02232 每张图 |
quality = medium, resolution = 1k | $0.03915 每张图 |
quality = low, resolution = 2k | $0.04131 每张图 |
quality = high, resolution = 1k | $0.04743 每张图 |
quality = medium, resolution = 2k | $0.07299 每张图 |
quality = low, resolution = 4k | $0.07479 每张图 |
quality = xhigh, resolution = 1k | $0.08433 每张图 |
quality = high, resolution = 2k | $0.08847 每张图 |
quality = medium, resolution = 4k | $0.13221 每张图 |
quality = xhigh, resolution = 2k | $0.15723 每张图 |
quality = high, resolution = 4k | $0.16011 每张图 |
quality = max, resolution = 1k | $0.18972 每张图 |
quality = xhigh, resolution = 4k | $0.28512 每张图 |
quality = max, resolution = 2k | $0.35379 每张图 |
quality = max, resolution = 4k | $0.64044 每张图 |
按每次请求实际用掉的 token 计费:文本输入每百万 $4.5,图片输入每百万 $7.2,图片输出每百万 $27。表里是各档方图的价格,其他比例通常更便宜。一次出多张时,输入 token 按张数计。
参数
| 字段 | 类型 | 默认值 | 取值范围 | 作用 |
|---|---|---|---|---|
prompt必填 | string | — | 最多 5000 个字符 | 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可选 | string | 1k | 1k, 2k, 4k | Output size tier: 1k is about 1 megapixel, 2k about 3.7, 4k about 8.3. |
quality可选 | string | medium | low, medium, high, xhigh, max | Rendering quality. Higher tiers add detail, time and cost. |
reasoning_effort可选 | string | — | low, medium, high | How 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可选 | integer | 1 | 1 到 10 | How many images to return, each billed separately. |
background可选 | string | auto | auto, transparent, opaque | Background treatment. Transparent needs PNG or WebP output. |
output_format可选 | string | png | png, jpeg, webp | File format of the returned images. |
output_quality可选 | integer | — | 0 到 100 | Compression quality for JPEG and WebP output, from 0 to 100. |
请求示例
这段请求原样就能运行,没写的字段都用默认值。运行前先把密钥放进环境变量 POPNOW_API_KEY。
示例里的 image_urls 用的是 PopNow 的示例素材,换成你自己的公开 HTTPS 链接、上传文件或已保存的素材即可。
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-sunburst/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 等通知。
curl "https://api.popnow.ai/api/v1/jobs/recordInfo?taskId=TASK_ID_FROM_CREATE_TASK" \
-H "Authorization: Bearer $POPNOW_API_KEY"
