RequestBeam 文件
GPT Image 2.6 整合介面
GPT Image 2.6 整合介面。
https://api.requestbeam.com/openai/v1/images/generations並行上限
AI 與 Data 分別共用帳戶層級的並行名額,預設 5 AI / 2 Data,訂閱方案可調整上限。介面個別設定仍受類別總上限約束。達到任一上限回傳 HTTP 429;非同步任務執行結束前占用名額。
POST /openai/v1/images/generations GET /v1/models 本介面約定涵蓋 gpt-image-2.6-flare 與 gpt-image-2.6-sunburst。實際可用性取決於已部署閘道與目前 API Key,請透過 GET https://api.requestbeam.com/v1/models 確認。
請求
POST https://api.requestbeam.com/openai/v1/images/generations
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json{
"model": "gpt-image-2.6-flare",
"prompt": "A red ceramic cup on a white table.",
"size": "1:1",
"resolution": "1k",
"quality": "low",
"output_format": "png",
"n": 1
}參數
| 參數 | 可選值 |
|---|---|
model | gpt-image-2.6-flare, gpt-image-2.6-sunburst |
prompt | 必填文字 |
n | 1–4 |
size | auto, 長寬比, WIDTHxHEIGHT |
resolution | 1k, 2k, 4k |
quality | auto, low, medium, high, xhigh, max |
image_urls | 0–16 HTTP(S) URLs |
output_format | png, jpeg, webp, gif |
output_compression | 0–100; JPEG/WebP |
background | auto, opaque, transparent; PNG/WebP |
complexity | low, medium, high |
safety_identifier | 字串,最多 128 個字元 |
stream | false (JSON), true (SSE) |
frame_count | 2–16; GIF |
frame_duration_ms | ≥20; GIF |
對於靜態圖片,size 接受 auto、支援的長寬比或 WIDTHxHEIGHT 精確尺寸。resolution 提供 1k、2k 和 4k。精確像素尺寸必須為 16 的倍數,單邊最多 3840,長寬比不超過 3:1,總像素數介於 655,360 至 8,294,400。quality 接受 auto、low、medium、high、xhigh 或 max。
兩個 GPT Image 2.6 型號均使用文件列出的 Images generations 請求。GIF 支援文字提示詞和參考圖。仍不支援 base64 參考圖、multipart 上傳、遮罩、markup、SVG 或獨立的 Images edits 介面。
GIF 支援文字提示詞和參考圖。 image_urls 可傳入最多 16 個公開 HTTP(S) 參考圖 URL。參考圖另計圖片輸入費用,最終按實際用量結算。 n 表示 1–4 個動畫。frame_count 支援 2–16 幀,預設 9;frame_duration_ms 為至少 20 的整數,預設 200,並按 10 毫秒取整。size 使用 auto(預設 512x512)或每邊均為 16 倍數的逐幀像素尺寸,不能使用寬高比名稱。幀圖網格為:2–8 幀使用 4x2,9 幀使用 3x3,10–12 幀使用 4x3,13–16 幀使用 4x4,行列可互換。整張幀圖的單邊不得超過 3840、總像素不得超過 8,294,400、長短邊比不得超過 3:1。不要傳入 output_compression 或透明背景。每個動畫按整張幀圖計費。
{
"model": "gpt-image-2.6-sunburst",
"prompt": "A small red train moves gently across green hills in a seamless looping animation. No text.",
"output_format": "gif",
"size": "512x512",
"quality": "low",
"frame_count": 8,
"frame_duration_ms": 200,
"n": 1
}GIF + image_urls
{
"model": "gpt-image-2.6-flare",
"prompt": "Animate the subject in the reference image with a gentle wave, then return to the starting pose. Seamless loop.",
"image_urls": [
"https://example.com/character.png"
],
"output_format": "gif",
"size": "512x512",
"quality": "low",
"frame_count": 8,
"frame_duration_ms": 200,
"n": 1
}回應
平台不提供生成圖片的永久儲存。收到生成結果後,請立即下載圖片,並儲存到自己的裝置或儲存空間。請勿將傳回的圖片連結作為長期儲存位址。
連線會等待完成。JSON 在 data[].url 回傳最終圖片 URL 及可用的 Token usage。SSE 透過 image_generation.completed 和 [DONE] 結束,不保證中間圖片預覽。用戶端無需輪詢上游任務。完成狀態未知時請勿重複提交。
計費
按文字輸入、快取文字輸入、圖片輸入、快取圖片輸入和圖片輸出 Token 分別計費。請查看目前目錄價格;完成後結算預留額度。APIMart 公開參考價不能證明帳戶成本或即時可用性。