兩個模型,一次接入
Flare 是日常使用的快速模型,Sunburst 則追求精度。兩者共用同一個端點、同一種請求結構與同一份費率表,切換只需改一個模型名稱。
GPT Image 2.5 API / Flare 與 Sunburst,同一套 token 計價 API
使用 Flare 和 Sunburst 生成、編輯圖像。兩個模型在 PiAPI 採用相同的 token 價格。
單位為美元/每 100 萬 token。Flare 和 Sunburst 採用相同費率。
| 模型 | 文字輸入 | 圖像輸入 | 圖像輸出 |
|---|---|---|---|
gpt-image-2.5-flare速度最快適合日常高品質圖像生成。 | $3.75 | $6.00 | $22.50 |
gpt-image-2.5-sunburst能力最強著重圖像生成與編輯的精確性。 | $3.75 | $6.00 | $22.50 |
準備好用 GPT Image 2.5 開始了嗎?
透過 PiAPI 任務 API 呼叫 GPT Image 2.5 時,你會得到這些能力。
Flare 是日常使用的快速模型,Sunburst 則追求精度。兩者共用同一個端點、同一種請求結構與同一份費率表,切換只需改一個模型名稱。
quality 參數支援 auto、low、medium、high,可以按單次請求在算圖時間與細節之間取捨,不必在接入時就定死。
傳入提示詞做文生圖,或附上參考圖編輯既有圖片。兩種操作走的是同一套非同步任務 API。
文字輸入、圖片輸入與圖片輸出都依 token 計費,沒有席次費也沒有訂閱費,公開費率請見上方表格。
送出任務取得 task id,之後輪詢任務端點或等待 webhook 回呼。長時間生成不會卡住你的請求執行緒。
Flare 和 Sunburst 已透過 PiAPI API 提供。端點、驗證和請求參數請參閱 API 文件。
Sign up and grab an API key from the PiAPI workspace — free credits are included on sign-up.
Add credits on the billing page when you are ready to scale beyond the free tier.
POST your first task following the API docs, then poll the task until the result is ready.
Prototype prompts and settings in the the playground above before wiring them into your product.
curl -X POST 'https://api.piapi.ai/api/v1/images/generations/async' \
-H 'X-API-Key: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"model": "gpt-image-2.5-flare",
"prompt": "YOUR_PROMPT",
"size": "1024x1024",
"quality": "low"
}'curl 'https://api.piapi.ai/api/v1/task/{task_id}' \
-H 'X-API-Key: YOUR_API_KEY'image_urls / image_url / data
curl -X POST 'https://api.piapi.ai/api/v1/images/edits/async' \
-H 'X-API-Key: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"model": "gpt-image-2.5-flare",
"prompt": "YOUR_PROMPT",
"size": "1024x1024",
"quality": "low",
"image": [
"YOUR_IMAGE_URL"
]
}'curl 'https://api.piapi.ai/api/v1/task/{task_id}' \
-H 'X-API-Key: YOUR_API_KEY'image_urls / image_url / data
curl -X POST 'https://api.piapi.ai/api/v1/images/generations/async' \
-H 'X-API-Key: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"model": "gpt-image-2.5-sunburst",
"prompt": "YOUR_PROMPT",
"size": "1024x1024",
"quality": "low"
}'curl 'https://api.piapi.ai/api/v1/task/{task_id}' \
-H 'X-API-Key: YOUR_API_KEY'image_urls / image_url / data
curl -X POST 'https://api.piapi.ai/api/v1/images/edits/async' \
-H 'X-API-Key: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"model": "gpt-image-2.5-sunburst",
"prompt": "YOUR_PROMPT",
"size": "1024x1024",
"quality": "low",
"image": [
"YOUR_IMAGE_URL"
]
}'curl 'https://api.piapi.ai/api/v1/task/{task_id}' \
-H 'X-API-Key: YOUR_API_KEY'image_urls / image_url / data
API 支援使用 gpt-image-2.5-flare 和 gpt-image-2.5-sunburst 生成、編輯圖像。
單位為美元/每 100 萬 token。Flare 和 Sunburst 採用相同費率。
quality 參數接受 auto、low、medium 和 high。傳入 xhigh、max 或 standard 時,API 會回傳 HTTP 400。
More questions? See the API docs.
PiAPI 部落格上關於 GPT Image 系列的教學與比較。