gpt-image-2-official API 定價
所有價格皆以 USD 計價。比較 APISea 費率與相同計費單位的官方牌價。
| Token 類型 | APISea | 官方 | 節省 |
|---|---|---|---|
| 文字輸入 每 1M tokens | $4.40 | $5.00 | −12% |
| 快取文字輸入 每 1M tokens | $1.10 | $1.25 | −12% |
| 圖片輸入 每 1M tokens | $7.04 | $8.00 | −12% |
| 快取圖片輸入 每 1M tokens | $1.76 | $2.00 | −12% |
| 圖片輸出 每 1M tokens | $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。
使用一組 API key 和 Bearer 驗證,即可透過 APISea 呼叫模型。處理作業為非同步:生成請求會回傳 task_id,供後續查詢。APISea 採用隨用隨付的 token 計費方式,僅對成功的請求收費。1024x1024、auto 品質的影像預估每張約 $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 key
登入 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 秒,請預留更多時間。
- 04
確認參考圖片與遮罩
提供可公開存取且穩定的參考 URL。進行局部重繪時,請將 mask_url 與 image_urls 一併使用,並確認遮罩包含 alpha 通道,且尺寸與第一張參考影像相同。
限制與須知
每個請求最多支援四張輸出影像和 16 張參考影像。
每張參考影像不得超過 20 MB,總大小不得超過 256 MB。
處理作業為非同步;4K 搭配 high 品質可能需要超過 120 秒。
gpt-image-2-official API 常見問題
在 APISea 上使用 gpt-image-2-official 的費用是多少?
1024x1024、auto 品質的影像預估每張約 $0.005368;high 品質則預估每張約 $0.1856。這些都是按 token 計費的預估價格,預設設定的價格約比供應商牌價低 12%。
如何呼叫 gpt-image-2-official?
使用 Bearer 驗證,將 model 設為 gpt-image-2-official,並提供必填的 prompt,向 https://api.apisea.ai/v1/images/generations 傳送 POST 請求。回應會傳回 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 遷移?
文件指出,與 gpt-image-1.5-official 的參數相容度達 95%,遷移時只需更改模型名稱。部署前請檢視新的 resolution 欄位,並確認 size、quality 和輸出設定。