
OpenAI圖片
GPT Image 2
GPT Image 2 是 OpenAI 推出的圖片生成模型。透過 /v1/images/generations 呼叫,回傳圖片網址,依實際用量計費。
價格
每次請求$0.211每次
價格以 USD 計,依實際用量從餘額扣除。儲值加贈另計。
$100+ · +3%$200+ · +5%$500+ · +8%$1000+ · +10%
API
- Base URL
- https://aitree.ai/v1
- 身分驗證
- 請求標頭 Authorization: Bearer <你的 API 金鑰>
curl https://aitree.ai/v1/images/generations \
-H "Authorization: Bearer $AITREE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-image-2",
"prompt": "a glowing compute tree at night, cinematic",
"size": "1024x1024"
}'參數
| 參數 | 型別 | 說明 |
|---|---|---|
| model | string | 模型 ID,填入 gpt-image-2 |
| prompt | string | 描述畫面或鏡頭的提示詞 |
| size | string | 輸出尺寸,例如 1024x1024 |
| n | integer | 產生數量 |