Felo API PlatformFelo API Platform
返回模型列表

GPT Image 2.6 Sunburst API

GPT Image 2.6 Sunburst 是 OpenAI 鎖定高品質與精準編輯的圖像生成與編輯模型,生成速度較前代提升 50%。

GPT Image 2.6 Sunburst 是 OpenAI 在 GPT Image 2.6 系列中主打高品質與精準度的版本,可透過 Images API 進行圖像生成與編輯。它在中、高品質設定下能產出更好的生成結果,並改善生成與編輯之間的一致性,讓角色、產品與品牌細節在多輪修改後仍保持一致。

模型提供圖像標註功能,可指定要修改的確切區域,並支援 SVG 匯出,讓設計成果能直接用於網站、應用程式與印刷。複雜度參數可調整模型為滿足需求所投入的規劃程度,品質設定則可從低到高選擇。

它適合需要反覆編輯、且編輯準確度比生成速度更重要的專業工作,例如海報與產品影像製作、品牌吉祥物與角色的動態化,以及把產品照轉成吸睛循環 GIF 的創意流程。此模型已於 ChatGPT 與 Codex 的所有訂閱層級提供,涵蓋桌面、行動與網頁,並以 GPT-Image-2.6 Sunburst 之名在 API 上提供,同時已加入 Figma Weave。

更新時間:

模型 ID

gpt-image-2.6-sunburst
輸入
text / image
輸出
image

核心要點

  • 生成速度較前代提升 50%
  • 中、高品質設定下生成品質更好
  • 圖像標註可指定確切修改區域
  • 支援 SVG 匯出直接用於網站與印刷
  • 多輪編輯維持角色與品牌細節
  • 複雜度參數可調整規劃程度

供應商

最優價格
3 個供應商

比較不同供應商的呼叫價格,點擊供應商可查看完整費用和適用條件。

供應商 · 計費明細
可用率
$5$30$2
$5$2.75$30$16.5$2$1.1
未公布未公布未公布

快速开始

提交圖片任務、輪詢狀態,再儲存圖片。以下範例使用 curl 和 Python 3(僅標準函式庫,無須安裝依賴)。

POST https://openapi.felo.ai/api/v1/images/generations

1填入 API key

從 Felo API Platform 帳戶建立 key,並設定為環境變數。

export FELO_API_KEY="YOUR_API_KEY"

2發出第一次請求

選用參數的值依模型而異,範例不預設這些值;加入前請在 Playground 確認。請求欄位與 model、prompt 同層,不包在 input 中。

curl --fail-with-body --max-time 60 "https://openapi.felo.ai/api/v1/images/generations" \
  -H "Authorization: Bearer $FELO_API_KEY" \
  -H "Content-Type: application/json" \
  -o created.json \
  -d '{
  "prompt": "A studio product photo of a ceramic coffee cup on warm linen, soft morning light",
  "model": "gpt-image-2.6-sunburst"
}'

3輪詢任務

提交後取得 task_id;queued、running 時每 3 秒查詢一次,succeeded、failed 或 interrupted 時停止。範例最多等待 30 分鐘。保留 created.json 可繼續查詢同一任務,避免重複提交。

python3 - <<'PY'
import json, os, time
from pathlib import Path
from urllib.parse import quote
from urllib.request import Request, urlopen

task = json.loads(Path("created.json").read_text())
task_id = task["task_id"]
url = "https://openapi.felo.ai/api/v1/images/generations/" + quote(task_id, safe="")
headers = {"Authorization": "Bearer " + os.environ["FELO_API_KEY"]}
deadline = time.monotonic() + 1800

while task["status"] in ("queued", "running"):
    if time.monotonic() >= deadline:
        raise TimeoutError(f"Keep task_id={task_id} to resume polling")
    time.sleep(3)
    with urlopen(Request(url, headers=headers), timeout=60) as response:
        task = json.load(response)
    if task.get("task_id") != task_id or task.get("kind") != "image":
        raise ValueError("Unexpected task response")
    print(task["status"])

if task["status"] != "succeeded":
    raise RuntimeError(task.get("error") or task["status"])
if not task.get("outputs"):
    raise ValueError("Task succeeded without image outputs")
Path("task.json").write_text(json.dumps(task))
print("Saved task.json")
PY

4下載輸出

成功後從 task.json 讀取 outputs 並儲存。結果相容 HTTPS 位址、URL 物件和 b64_json。簽名位址請及時下載;下載圖片時無須攜帶 API Key。

python3 - <<'PY'
import base64, json
from pathlib import Path
from urllib.request import urlopen

task = json.loads(Path("task.json").read_text())
if task.get("status") != "succeeded" or not task.get("outputs"):
    raise ValueError("No completed image outputs")
extensions = {"image/png": ".png", "image/jpeg": ".jpg", "image/webp": ".webp", "image/gif": ".gif", "image/avif": ".avif"}

for index, output in enumerate(task["outputs"], 1):
    item = output if isinstance(output, dict) else {}
    url = output if isinstance(output, str) else item.get("url") or item.get("unsigned_url")
    mime = item.get("media_type") or "image/png"
    if url and url.startswith("https://"):
        with urlopen(url, timeout=60) as response:
            data = response.read()
            mime = response.headers.get_content_type()
    elif url and url.startswith("data:image/") and ";base64," in url:
        header, encoded = url.split(",", 1)
        mime = header[5:].split(";", 1)[0]
        data = base64.b64decode(encoded, validate=True)
    elif item.get("b64_json"):
        data = base64.b64decode(item["b64_json"], validate=True)
    else:
        raise ValueError("Unrecognized image output")
    path = Path(f"image-{index}" + extensions.get(mime, ".bin"))
    path.write_bytes(data)
    print(path)
PY
input_references

編輯圖片時,將範例位址替換為你的 HTTPS 圖片位址或 base64 圖片 data URL。提交一次後,沿用相同的輪詢與儲存步驟。

curl --fail-with-body --max-time 60 "https://openapi.felo.ai/api/v1/images/generations" \
  -H "Authorization: Bearer $FELO_API_KEY" \
  -H "Content-Type: application/json" \
  -o created.json \
  -d '{
  "prompt": "Keep the product and framing. Replace the background with a sunlit marble countertop.",
  "model": "gpt-image-2.6-sunburst",
  "input_references": [
    {
      "type": "image_url",
      "image_url": {
        "url": "https://example.com/product.png"
      }
    }
  ]
}'

支援的參數

  • n
  • quality
  • background
  • aspect_ratio
  • output_format
  • input_references
  • output_compression

想查看完整文件?

API 文件 →

常見問題

什麼是 GPT Image 2.6 Sunburst?

GPT Image 2.6 Sunburst 是 OpenAI 在 GPT Image 2.6 系列中主打高品質與精準度的版本,可透過 Images API 進行圖像生成與編輯。它在中、高品質設定下能產出更好的生成結果,並改善生成與編輯之間的一致性,讓角色、產品與品牌細節在多輪修改後仍保持一致。 模型提供圖像標註功能,可指定要修改的確切區域,並支援 SVG 匯出,讓設計成果能直接用於網站、應用程式與印刷。複雜度參數可調整模型為滿足需求所投入的規劃程度,品質設定則可從低到高選擇。 它適合需要反覆編輯、且編輯準確度比生成速度更重要的專業工作,例如海報與產品影像製作、品牌吉祥物與角色的動態化,以及把產品照轉成吸睛循環 GIF 的創意流程。此模型已於 ChatGPT 與 Codex 的所有訂閱層級提供,涵蓋桌面、行動與網頁,並以 GPT-Image-2.6 Sunburst 之名在 API 上提供,同時已加入 Figma Weave。

如何計算呼叫費用?

費用取決於你使用的供應商、對應價格和實際用量。長文字輸入等情況可能適用不同價格,詳見計費明細。

GPT Image 2.6 Sunburst 支援哪些輸入與輸出?

它接受圖像輸入並輸出圖像,可透過 Images API 進行生成與編輯。

它適合哪些任務?

適合需要精準編輯的專業視覺製作,例如海報、產品影像、品牌角色動態化,以及多輪修改的創意流程。

它與同系列模型有何差別?

Sunburst 是 GPT Image 2.6 系列中偏向高品質與精準度的層級,與 Flare 並列;它鎖定編輯準確度比生成速度更重要的細節工作。

它如何處理反覆編輯?

模型改善了生成與編輯之間的一致性,並在編輯過程中維持角色、產品與品牌細節。

可以在哪裡使用?

可在 ChatGPT 與 Codex 的所有訂閱層級使用,涵蓋桌面、行動與網頁,也可經由 API 使用,並已加入 Figma Weave。

相關模型