gpt-image-2-official API 价格
所有价格均以 USD 计。对比 APISea 费率与相同计费单位的官方标价。
| Token 类型 | APISea | 官方 | 节省 |
|---|---|---|---|
| 文本输入 每 1M 个 token | $4.40 | $5.00 | −12% |
| 缓存文本输入 每 1M 个 token | $1.10 | $1.25 | −12% |
| 图像输入 每 1M 个 token | $7.04 | $8.00 | −12% |
| 缓存图像输入 每 1M 个 token | $1.76 | $2.00 | −12% |
| 图像输出 每 1M 个 token | $26.40 | $30.00 | −12% |
每次输出的预估费用
| 选项 | APISea | 官方 |
|---|---|---|
| 1024x1024 · auto | ≈ $0.005368 | $0.0061 |
| 1024x1024 · high | ≈ $0.1856 | $0.2109 |
| 1024x1024 · low | ≈ $0.005368 | $0.0061 |
| 1024x1024 · medium | ≈ $0.04655 | $0.0529 |
| 1024x1280 · auto | ≈ $0.004752 | $0.0054 |
| 1024x1280 · high | ≈ $0.1617 | $0.1837 |
| 1024x1280 · low | ≈ $0.004752 | $0.0054 |
| 1024x1280 · medium | ≈ $0.04004 | $0.0455 |
| 1024x1536 · auto | ≈ $0.004312 | $0.0049 |
| 1024x1536 · high | ≈ $0.145 | $0.1648 |
| 1024x1536 · low | ≈ $0.004312 | $0.0049 |
| 1024x1536 · medium | ≈ $0.03634 | $0.0413 |
| 1024x2048 · auto | ≈ $0.003608 | $0.0041 |
| 1024x2048 · high | ≈ $0.1248 | $0.1418 |
| 1024x2048 · low | ≈ $0.003608 | $0.0041 |
| 1024x2048 · medium | ≈ $0.03133 | $0.0356 |
| 1024x3072 · auto | ≈ $0.002816 | $0.0032 |
| 1024x3072 · high | ≈ $0.1045 | $0.1187 |
| 1024x3072 · low | ≈ $0.002816 | $0.0032 |
| 1024x3072 · medium | ≈ $0.02622 | $0.0298 |
| 1024x768 · auto | ≈ $0.003696 | $0.0042 |
| 1024x768 · high | ≈ $0.1272 | $0.1446 |
| 1024x768 · low | ≈ $0.003696 | $0.0042 |
| 1024x768 · medium | ≈ $0.03194 | $0.0363 |
| 1152x2048 · auto | ≈ $0.004312 | $0.0049 |
| 1152x2048 · high | ≈ $0.1493 | $0.1697 |
| 1152x2048 · low | ≈ $0.004312 | $0.0049 |
| 1152x2048 · medium | ≈ $0.03749 | $0.0426 |
| 1152x2688 · auto | ≈ $0.00396 | $0.0045 |
| 1152x2688 · high | ≈ $0.1326 | $0.1507 |
| 1152x2688 · low | ≈ $0.00396 | $0.0045 |
| 1152x2688 · medium | ≈ $0.03406 | $0.0387 |
| 1280x1024 · auto | ≈ $0.004752 | $0.0054 |
| 1280x1024 · high | ≈ $0.1617 | $0.1837 |
| 1280x1024 · low | ≈ $0.004752 | $0.0054 |
| 1280x1024 · medium | ≈ $0.04004 | $0.0455 |
| 1280x3840 · auto | ≈ $0.003784 | $0.0043 |
| 1280x3840 · high | ≈ $0.1404 | $0.1595 |
| 1280x3840 · low | ≈ $0.003784 | $0.0043 |
| 1280x3840 · medium | ≈ $0.0352 | $0.04 |
| 1344x2688 · auto | ≈ $0.004928 | $0.0056 |
| 1344x2688 · high | ≈ $0.1709 | $0.1942 |
| 1344x2688 · low | ≈ $0.004928 | $0.0056 |
| 1344x2688 · medium | ≈ $0.04286 | $0.0487 |
| 1360x2048 · auto | ≈ $0.00572 | $0.0065 |
| 1360x2048 · high | ≈ $0.1942 | $0.2207 |
| 1360x2048 · low | ≈ $0.00572 | $0.0065 |
| 1360x2048 · medium | ≈ $0.04866 | $0.0553 |
| 1536x1024 · auto | ≈ $0.004312 | $0.0049 |
| 1536x1024 · high | ≈ $0.145 | $0.1648 |
| 1536x1024 · low | ≈ $0.004312 | $0.0049 |
| 1536x1024 · medium | ≈ $0.03634 | $0.0413 |
| 1536x2048 · auto | ≈ $0.006688 | $0.0076 |
| 1536x2048 · high | ≈ $0.2349 | $0.2669 |
| 1536x2048 · low | ≈ $0.006688 | $0.0076 |
| 1536x2048 · medium | ≈ $0.05887 | $0.0669 |
| 1536x512 · auto | ≈ $0.01426 | $0.0162 |
| 1536x512 · high | ≈ $0.05658 | $0.0643 |
| 1536x512 · low | ≈ $0.001584 | $0.0018 |
| 1536x512 · medium | ≈ $0.01426 | $0.0162 |
| 1536x864 · auto | ≈ $0.003344 | $0.0038 |
| 1536x864 · high | ≈ $0.114 | $0.1295 |
| 1536x864 · low | ≈ $0.003344 | $0.0038 |
| 1536x864 · medium | ≈ $0.0286 | $0.0325 |
| 1648x3840 · auto | ≈ $0.006336 | $0.0072 |
| 1648x3840 · high | ≈ $0.2166 | $0.2461 |
| 1648x3840 · low | ≈ $0.006336 | $0.0072 |
| 1648x3840 · medium | ≈ $0.05553 | $0.0631 |
| 1920x3840 · auto | ≈ $0.008096 | $0.0092 |
| 1920x3840 · high | ≈ $0.2852 | $0.3241 |
| 1920x3840 · low | ≈ $0.008096 | $0.0092 |
| 1920x3840 · medium | ≈ $0.07146 | $0.0812 |
| 2016x864 · auto | ≈ $0.002904 | $0.0033 |
| 2016x864 · high | ≈ $0.09733 | $0.1106 |
| 2016x864 · low | ≈ $0.002904 | $0.0033 |
| 2016x864 · medium | ≈ $0.02508 | $0.0285 |
| 2048x1024 · auto | ≈ $0.003608 | $0.0041 |
| 2048x1024 · high | ≈ $0.1248 | $0.1418 |
| 2048x1024 · low | ≈ $0.003608 | $0.0041 |
| 2048x1024 · medium | ≈ $0.03133 | $0.0356 |
| 2048x1152 · auto | ≈ $0.004312 | $0.0049 |
| 2048x1152 · high | ≈ $0.1493 | $0.1697 |
| 2048x1152 · low | ≈ $0.004312 | $0.0049 |
| 2048x1152 · medium | ≈ $0.03749 | $0.0426 |
| 2048x1360 · auto | ≈ $0.00572 | $0.0065 |
| 2048x1360 · high | ≈ $0.1942 | $0.2207 |
| 2048x1360 · low | ≈ $0.00572 | $0.0065 |
| 2048x1360 · medium | ≈ $0.04866 | $0.0553 |
| 2048x1536 · auto | ≈ $0.006688 | $0.0076 |
| 2048x1536 · high | ≈ $0.2349 | $0.2669 |
| 2048x1536 · low | ≈ $0.006688 | $0.0076 |
| 2048x1536 · medium | ≈ $0.05887 | $0.0669 |
| 2048x2048 · auto | ≈ $0.01065 | $0.0121 |
| 2048x2048 · high | ≈ $0.3769 | $0.4283 |
| 2048x2048 · low | ≈ $0.01065 | $0.0121 |
| 2048x2048 · medium | ≈ $0.09434 | $0.1072 |
| 2048x2560 · auto | ≈ $0.01012 | $0.0115 |
| 2048x2560 · high | ≈ $0.3535 | $0.4017 |
| 2048x2560 · low | ≈ $0.01012 | $0.0115 |
| 2048x2560 · medium | ≈ $0.08738 | $0.0993 |
| 2160x3840 · auto | ≈ $0.009944 | $0.0113 |
| 2160x3840 · high | ≈ $0.3524 | $0.4004 |
| 2160x3840 · low | ≈ $0.009944 | $0.0113 |
| 2160x3840 · medium | ≈ $0.08826 | $0.1003 |
| 2336x3520 · auto | ≈ $0.01197 | $0.0136 |
| 2336x3520 · high | ≈ $0.4147 | $0.4712 |
| 2336x3520 · low | ≈ $0.01197 | $0.0136 |
| 2336x3520 · medium | ≈ $0.1038 | $0.1179 |
| 2480x3312 · auto | ≈ $0.01311 | $0.0149 |
| 2480x3312 · high | ≈ $0.466 | $0.5296 |
| 2480x3312 · low | ≈ $0.01311 | $0.0149 |
| 2480x3312 · medium | ≈ $0.1166 | $0.1325 |
| 2560x2048 · auto | ≈ $0.01012 | $0.0115 |
| 2560x2048 · high | ≈ $0.3535 | $0.4017 |
| 2560x2048 · low | ≈ $0.01012 | $0.0115 |
| 2560x2048 · medium | ≈ $0.08738 | $0.0993 |
| 2576x3216 · auto | ≈ $0.01426 | $0.0162 |
| 2576x3216 · high | ≈ $0.5019 | $0.5703 |
| 2576x3216 · low | ≈ $0.01426 | $0.0162 |
| 2576x3216 · medium | ≈ $0.1239 | $0.1408 |
| 2688x1152 · auto | ≈ $0.00396 | $0.0045 |
| 2688x1152 · high | ≈ $0.1326 | $0.1507 |
| 2688x1152 · low | ≈ $0.00396 | $0.0045 |
| 2688x1152 · medium | ≈ $0.03406 | $0.0387 |
| 2688x1344 · auto | ≈ $0.004928 | $0.0056 |
| 2688x1344 · high | ≈ $0.1709 | $0.1942 |
| 2688x1344 · low | ≈ $0.004928 | $0.0056 |
| 2688x1344 · medium | ≈ $0.04286 | $0.0487 |
| 2880x2880 · auto | ≈ $0.01751 | $0.0199 |
| 2880x2880 · high | ≈ $0.6263 | $0.7117 |
| 2880x2880 · low | ≈ $0.01751 | $0.0199 |
| 2880x2880 · medium | ≈ $0.1566 | $0.178 |
| 3072x1024 · auto | ≈ $0.002816 | $0.0032 |
| 3072x1024 · high | ≈ $0.1045 | $0.1187 |
| 3072x1024 · low | ≈ $0.002816 | $0.0032 |
| 3072x1024 · medium | ≈ $0.02622 | $0.0298 |
| 3216x2576 · auto | ≈ $0.01426 | $0.0162 |
| 3216x2576 · high | ≈ $0.5019 | $0.5703 |
| 3216x2576 · low | ≈ $0.01426 | $0.0162 |
| 3216x2576 · medium | ≈ $0.1239 | $0.1408 |
| 3312x2480 · auto | ≈ $0.01311 | $0.0149 |
| 3312x2480 · high | ≈ $0.466 | $0.5296 |
| 3312x2480 · low | ≈ $0.01311 | $0.0149 |
| 3312x2480 · medium | ≈ $0.1166 | $0.1325 |
| 3520x2336 · auto | ≈ $0.01197 | $0.0136 |
| 3520x2336 · high | ≈ $0.4147 | $0.4712 |
| 3520x2336 · low | ≈ $0.01197 | $0.0136 |
| 3520x2336 · medium | ≈ $0.1038 | $0.1179 |
| 3840x1280 · auto | ≈ $0.003784 | $0.0043 |
| 3840x1280 · high | ≈ $0.1404 | $0.1595 |
| 3840x1280 · low | ≈ $0.003784 | $0.0043 |
| 3840x1280 · medium | ≈ $0.0352 | $0.04 |
| 3840x1648 · auto | ≈ $0.006336 | $0.0072 |
| 3840x1648 · high | ≈ $0.2166 | $0.2461 |
| 3840x1648 · low | ≈ $0.006336 | $0.0072 |
| 3840x1648 · medium | ≈ $0.05553 | $0.0631 |
| 3840x1920 · auto | ≈ $0.008096 | $0.0092 |
| 3840x1920 · high | ≈ $0.2852 | $0.3241 |
| 3840x1920 · low | ≈ $0.008096 | $0.0092 |
| 3840x1920 · medium | ≈ $0.07146 | $0.0812 |
| 3840x2160 · auto | ≈ $0.009944 | $0.0113 |
| 3840x2160 · high | ≈ $0.3524 | $0.4004 |
| 3840x2160 · low | ≈ $0.009944 | $0.0113 |
| 3840x2160 · medium | ≈ $0.08826 | $0.1003 |
| 512x1536 · auto | ≈ $0.001584 | $0.0018 |
| 512x1536 · high | ≈ $0.05658 | $0.0643 |
| 512x1536 · low | ≈ $0.001584 | $0.0018 |
| 512x1536 · medium | ≈ $0.01426 | $0.0162 |
| 768x1024 · auto | ≈ $0.003696 | $0.0042 |
| 768x1024 · high | ≈ $0.1272 | $0.1446 |
| 768x1024 · low | ≈ $0.003696 | $0.0042 |
| 768x1024 · medium | ≈ $0.03194 | $0.0363 |
| 864x1536 · auto | ≈ $0.003344 | $0.0038 |
| 864x1536 · high | ≈ $0.114 | $0.1295 |
| 864x1536 · low | ≈ $0.003344 | $0.0038 |
| 864x1536 · medium | ≈ $0.0286 | $0.0325 |
| 864x2016 · auto | ≈ $0.002904 | $0.0033 |
| 864x2016 · high | ≈ $0.09733 | $0.1106 |
| 864x2016 · low | ≈ $0.002904 | $0.0033 |
| 864x2016 · medium | ≈ $0.02508 | $0.0285 |
gpt-image-2-official 是什么?
gpt-image-2-official 将 OpenAI 官方 GPT Image 图像生成接口接入 APISea。您可以通过一个生成接口构建文生图工作流、使用参考图像进行转换,或借助蒙版编辑指定区域。提示词支持英语和中文,建议使用详细描述。可调节的参数包括 15 种宽高比、1K、2K 和 4K 分辨率档位,以及 auto、low、medium 或 high 质量。每个请求最多可生成四张图像,并提供最多 16 张参考图像;输出格式支持 PNG、JPEG 或 WebP。
使用一个 APISea API key 和 Bearer 身份验证即可调用该模型。处理采用异步方式:生成请求会返回 task_id,供后续查询。APISea 按量采用 token 计费,且仅对成功的请求收费。auto 质量下,一张 1024x1024 图像的预估价格约为 $0.005368,并非固定的单张收费。默认配置的价格比服务商标价低约 12%,并支持提示词缓存读取。
gpt-image-2-official 的亮点
三种图像工作流
通过同一个接口即可根据文本生成图像、转换参考图像,或使用蒙版进行局部重绘。
分辨率与宽高比控制
可选择 1K、2K 或 4K 分辨率档位,以及 15 种受支持的宽高比。size 参数也接受像素尺寸。
多张图像与参考图
每次最多请求生成四张图像,并提供最多 16 张参考图像,用于基于参考图像的工作流。
输出格式控制
输出 PNG、JPEG 或 WebP 图像。对于 JPEG 和 WebP 输出,可将 output_compression 调整为 0–100。
分 4 步调用 gpt-image-2-official API
- 01
获取 API 密钥
登录 APISea,充值 $50 起,并在控制台创建一个 sk-sea 密钥。
- 02
设置 base URL
在 SDK 或 HTTP 客户端中将 https://api.apisea.ai/v1 设置为 base URL。
- 03
发送请求
调用 POST /v1/images/generations,并传入 "model": "gpt-image-2-official" 及以下参数。
- 04
处理响应
响应中包含 task_id。轮询 GET /v1/tasks/{task_id},直到状态变为 completed,然后下载结果 URL。
curl --request POST \
--url https://api.apisea.ai/v1/images/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "gpt-image-2-official",
"prompt": "An ancient castle beneath a starry sky",
"size": "16:9",
"resolution": "2k",
"quality": "high",
"n": 1
}'参数
| 参数 | 类型 | 必填 | 默认 | 说明 |
|---|---|---|---|---|
model | string | 必填 | gpt-image-2-official | Image generation model name |
nsfw_check | boolean | 可选 | false | Whether to run content moderation before submitting the image task. |
prompt | string | 必填 | — | Text description for image generation |
size | string | 可选 | 1:1 | Image aspect ratio |
resolution | string | 可选 | 1k | Resolution tier (**new field**) |
quality | string | 可选 | auto | Image quality |
moderation | string | 可选 | auto | Moderation strength |
output_format | string | 可选 | png | Output format |
output_compression | integer | 可选 | — | Output compression level, range `0-100` |
n | integer | 可选 | 1 | Number of images to generate |
image_urls | array | 可选 | — | Reference image URL array |
mask_url | string | 可选 | — | Mask image URL, used for inpainting |
gpt-image-2-official 的应用场景
营销素材生成
构建一款工具,根据详细的营销活动简介生成方形社交媒体素材、竖版海报和横幅。
基于参考图像生成创意变体
设计师可提交参考图像 URL 和提示词,在单个工作流中创建不同风格的图像方案。
蒙版图像编辑
构建一款编辑器,提交参考图像和带 alpha 通道的蒙版,通过局部重绘重新生成指定区域。
创意草稿工具
先生成低质量草图供审核,团队需要更精准的输出时,再请求 medium 或 high 质量。
获得更好结果的技巧
- 01
分别设置尺寸和分辨率
使用 size 设置宽高比,使用 resolution 设置分辨率档位。默认值为 1:1 和 1k;如果布局很重要,请明确指定宽高比。
- 02
从经济实惠的草稿开始
使用 quality low 快速生成经济实惠的草图;auto 通常相当于 low。由于采用按 token 计费,请将单张图像价格视为估算值。
- 03
为异步结果做好准备
保存返回的 task_id 并查询结果,不要期待初始响应中直接包含图像。使用 4K 和 high 质量时,请预留更多时间,处理可能超过 120 seconds。
- 04
验证参考图和蒙版
请提供可公开访问且稳定的参考图像 URL。进行局部重绘时,将 mask_url 与 image_urls 一起使用,并确保蒙版包含 alpha 通道,且尺寸与第一张参考图像一致。
限制与须知
每个请求最多支持生成四张图像,并提供 16 张参考图像。
每张参考图像不得超过 20 MB,所有参考图像总计不得超过 256 MB。
处理采用异步方式,使用 4K 和 high 质量时可能超过 120 seconds。
gpt-image-2-official API 常见问题
在 APISea 上使用 gpt-image-2-official 的费用是多少?
auto 质量下,一张 1024x1024 图像的预估价格约为 $0.005368;high 质量下,预估价格约为 $0.1856。这些价格均为按 token 计费的估算值,默认配置的价格比服务商标价低约 12%。
如何调用 gpt-image-2-official?
向 https://api.apisea.ai/v1/images/generations 发送 POST 请求,使用 Bearer 身份验证,将 model 设为 gpt-image-2-official,并提供必填的 prompt。响应会返回 task_id,供后续查询结果使用。
支持哪些分辨率和质量设置?
resolution 参数支持 1k、2k 和 4k,quality 支持 auto、low、medium 和 high。使用 size 选择宽高比或指定像素尺寸;默认设置为 1:1、1k 和 auto 质量。
可以使用参考图和蒙版吗?
可以。image_urls 最多可接受 16 张可公开访问且稳定的参考图,每张图片不超过 20 MB,总大小不超过 256 MB。局部重绘需要同时提供 mask_url 和 image_urls;蒙版必须带有 alpha 通道,且尺寸须与第一张参考图一致。
我可以将生成的图像用于商业用途吗?
商业用途须遵守提供方的条款。将输出用于商业用途前,请查阅 OpenAI 适用的条款,并确认您拥有所提供参考图的相关权利。
如何从 gpt-image-1.5-official 迁移?
文档称其参数有 95% 与 gpt-image-1.5-official 对齐,迁移时只需更改模型名称。部署前,请查看新增的 resolution 字段,并确认 size、quality 和输出设置。