最新资讯
dev.to 为 CI/CD 构建 AI 质量门禁 dev.to Kakao 发布面向 AI Agent 的决策模型 Kanana-2-v-decide computerworld.com Microsoft 对 Copilot Chat 企业用户扩大未公开的使用限制 pub.towardsai.net Google 发布 Gemini 4 Carbon:主打网络安全能力的前沿模型 gradientflow.com METR 研究:AI 正在加速构建 AI 的团队本身 www.infoq.com GitLab 19.5 将 Agentic 开发纳入 DevOps 平台的治理体系 aiacceleratorinstitute.com 研究:AI Agent 的复杂流程编排可能反而是问题所在 pub.towardsai.net MongoDB 推出 Vercel AI SDK 集成:为 AI 应用提供持久记忆 thenewstack.io Google 捐出被 Anthropic 和 OpenAI 使用的代码沙箱 gVisor,押注 AI Agent 基础设施开源 dev.to 在信任 AI 生成的测试用例前,如何逐条复核 unite.ai Franklin Templeton 构建 AI 研究工作流以揭示风险 techxplore.com AI 助力寻找更优的钛合金 3D 打印工艺参数
多元动态
登录 注册
大模型 dev.to · @Dylan Foster

GPT-Image-2.5 生产实践:Flare 与 Sunburst 如何选择

原文 我的收藏

文章称GPT-Image-2.5分为两个模型:Flare侧重低延迟和常规生成,Sunburst侧重编辑精度、参考保持和高保真输出。两者均接受文本与图像输入,支持auto至max多档quality,通过Images API进行生成和编辑。作者建议从Flare的medium档起步,将复杂编辑或高价值素材路由至Sunburst,并称迁移仅需修改base URL、凭证和模型ID。

AI推荐理由 文章称GPT-Image-2.5拆分为Flare(低延迟、常规生成)和Sunburst(编辑精度、参考保持、高保真输出)两个模型,均支持文本与图像输入及多档quality级别,可通过Images API调用,并给出迁移与选型建议。对开发者有实际参考价值,但来源为个人博客,模型命名、发布时间(2026年9月8日)及Arena结果等关键信息缺乏官方来源佐证,且模型标注为preliminary,需保留不确定性。

66

正文

The short version GPT-Image-2.5 is split into two models: Flare favors low latency and routine generation. Sunburst favors editing precision, reference preservation, and higher-fidelity final output. Both accept text and image inputs, support the quality levels auto, low, medium, high, xhigh, and max, and work through the Images API for generation and editing. For an existing OpenAI-compatible integration, the migration is small: change the base URL, credentials, and model ID. I would start with Flare at medium, measure latency and accepted-image cost, and route demanding edits or premium assets to Sunburst. OpenAI introduced ChatGPT Images 2.5 and these two API models on September 8, 2026. Flare is positioned as the default choice for most applications; Sunburst is the more capable option for complex generation and editing. Both models are currently marked preliminary, and current Arena results favor Sunburst for generation and editing. Endpoint and authentication When using the OpenAI-compatible gateway, the relevant configuration is: Setting Value Base URL https://api.cometapi.com/v1 Generation route POST /images/generations Editing route POST /images/edits Authentication Authorization: Bearer $COMETAPI_KEY Provider pricing and availability can change, so I verify model IDs, endpoint behavior, and billing in the dashboard before deploying. Create a server-side token and keep it out of browser code, repositories, logs, screenshots, and client applications: export COMETAPI_KEY="your-cometapi-key" Enter fullscreen mode Exit fullscreen mode PowerShell: $env:COMETAPI_KEY="your-cometapi-key" Enter fullscreen mode Exit fullscreen mode Generate an image For a first request, I usually use Flare with a controlled quality setting: curl "https://api.cometapi.com/v1/images/generations" \ -H "Authorization: Bearer $COMETAPI_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "gpt-image-2.5-flare", "prompt": "Premium product photograph of a matte black wireless speaker on a light concrete pedestal, soft window light, realistic material texture, clean editorial composition, no text", "size": "1536x1024", "quality": "medium", "output_format": "png" }' Enter fullscreen mode Exit fullscreen mode The response normally contains generated image data in data[].b64_json, rather than a permanent image URL: { "data": [ { "b64_json": "" } ], "usage": { "input_tokens": 32, "output_tokens": 1372, "total_tokens": 1404 } } Enter fullscreen mode Exit fullscreen mode Decode the Base64 value and store the resulting bytes. The Base64 string should not become the final asset in your storage system. Python import base64 import os import requests response = requests.post( "https://api.cometapi.com/v1/images/generations", headers={ "Authorization": f"Bearer {os.environ['COMETAPI_KEY']}", }, json={ "model": "gpt-image-2.5-flare", "prompt": ( "A clean isometric illustration of a solar-powered research lab, " "white background, precise geometry, no labels or watermarks" ), "size": "1536x1024", "quality": "high", "output_format": "png", }, timeout=180, ) response.raise_for_status() payload = response.json() image_b64 = payload["data"][0]["b64_json"] with open("research-lab.png", "wb") as file: file.write(base64.b64decode(image_b64)) Enter fullscreen mode Exit fullscreen mode An existing OpenAI SDK integration can use the same client pattern by changing base_url, the API key, and the model ID. Editing existing assets Use /images/edits when the input image must be preserved while only a defined region or attribute changes. Put preservation requirements before the requested modification: curl https://api.cometapi.com/v1/images/edits \ -H "Authorization: Bearer $COMETAPI_KEY" \ -F "model=gpt-image-2.5-sunburst" \ -F "image[]=@product.png" \ -F "prompt=Preserve the product shape, label, and camera angle. Replace only the background with a warm studio gradient. Add no new text." \ -F "quality=high" \ -F "output_format=png" Enter fullscreen mode Exit fullscreen mode For localized edits, a mask indicates where changes are allowed. Transparent pixels identify the editable region; the remaining area should be preserved. The mask must match the source image’s size and format, include an alpha channel, and stay within the API’s file-size limit. With multiple input images, the mask applies to the first image. A mask is guidance, not a guaranteed pixel-perfect selection. I reinforce it in the prompt: > Change only the transparent region. Preserve all other pixels, text, and geometry. Working with multiple references Give every reference image a stable semantic role. I generally use subject first, style second, then background or layout. The prompt should specify which attributes may transfer from each image. The Responses API is useful when image generation is one step inside a larger conversational or agent workflow: import base64 import os from openai import OpenAI client = OpenAI( api_key=os.environ["COMETAPI_KEY"], base_url="https://api.cometapi.com/v1", ) response = client.responses.create( model="gpt-6-astra", input=[{ "role": "user", "content": [ { "type": "input_text", "text": ( "Create a campaign image. Use image 1 only for the product " "shape and colors; image 2 only for lighting and visual style; " "image 3 only for the background composition. Preserve the " "product logo exactly and add no other text." ), }, { "type": "input_image", "image_url": "https://example.com/product.png", }, { "type": "input_image", "image_url": "https://example.com/style.png", }, { "type": "input_image", "image_url": "https://example.com/background.png", }, ], }], tools=[{ "type": "image_generation", "model": "gpt-image-2.5-sunburst", }], ) for item in response.output: if item.type == "image_generation_call": with open("campaign.png", "wb") as file: file.write(base64.b64decode(item.result)) Enter fullscreen mode Exit fullscreen mode The top-level Responses model is a supported mainline model; GPT-Image-2.5 is selected inside the image-generation tool. If the gateway does not expose that model or tool schema, use the currently documented equivalent. Do not rely solely on upload order. Explicitly say “image 1 is the subject,” “image 2 is the style reference,” and so on. Also state which details must not be copied, such as faces, logos, text, or layout. Image API or Responses API? Requirement Image API Responses API One-shot generation or editing Best fit Usually unnecessary Conversational or agentic flow Limited Best fit Direct model selection Set image model directly Mainline model plus image tool Multiple semantic references Supported for edits, depending on route Natural fit Iterative turns and tool calls Application-managed Built in Streaming previews Supported Supported My default is the Image API. I move to Responses when the workflow needs conversation state, several reference images with explicit roles, or other tools around image generation. Output controls Parameter Purpose Starting point quality Compute and detail level medium during development size Resolution and aspect ratio 1024x1024 or 1536x1024 output_format PNG, JPEG, or WebP PNG for fidelity background Opaque or transparent output Transparent only when needed output_compression JPEG/WebP compression Tune for delivery n Number of returned images 1 prompt Visual requirements and constraints Specify layout explicitly The supported quality ladder is: auto low medium high xhigh max Enter fullscreen mode Exit fullscreen mode auto lets the model choose. I prefer explicitly setting medium for controlled comparisons. A practical deployment split: low or medium: drafts, previews, and high-volume experimentation high: approved production assets xhigh or max: demanding final renders where the gain is measurable The common presets are: 1024x1024 1536x1024 1024x1536 Enter fullscreen mode Exit fullscreen mode The 2.5 models also support arbitrary valid dimensions, useful for banners, product pages, mobile creatives, and other non-square assets. The current OpenAI specification allows up to 3840 pixels per edge within its pixel-count and aspect-ratio limits. Transparent output Use a format with alpha support: { "background": "transparent", "output_format": "png" } Enter fullscreen mode Exit fullscreen mode WebP is also suitable. JPEG cannot represent transparent output. This mode is useful for product cut-outs, icons, stickers, UI assets, and compositing pipelines. Streaming partial images The model specification does not list generic model-level streaming, but the Images API and Responses API support image-generation streaming with partial_images. These are progressive previews, not token-by-token text output. The Images API accepts partial_images values from 0 to 3. Each partial image adds 100 output tokens. A value of 3 does not guarantee three previews: if generation finishes quickly, fewer may arrive. Set the value to 0 when previews do not improve the user experience. Prompting for repeatable results I separate the creative goal from the constraints. Composition Specify the subject, framing, camera angle, depth, background, and object positions: > Three-quarter product view, centered, generous negative space on the right, eye-level camera, 50 mm lens look. Lighting and materials Describe direction, softness, contrast, color temperature, and material behavior: > Large softbox from the upper left, subtle rim light, realistic brushed aluminum, controlled reflections. Exact text Quote required text and define its placement and typography: > Place the exact headline “BUILD WITH CLARITY” at the top center in bold uppercase sans serif. Preserve spelling exactly. Add no other words, letters, labels, or watermarks. Preservation For edits, name everything that cannot change: identity, pose, product geometry, logo, label text, proportions, camera angle, and background. Negative constraints Target likely failure modes rather than adding generic quality language: > No extra fingers, no duplicated products, no warped logo, no misspelled text, no border, no watermark. Flare versus Sunburst Workload Flare Sunburst Interactive application Recommended Selective use Rapid prompt iteration Recommended Usually unnecessary High-volume generation Recommended Depends on acceptance rate Product/reference editing Good Recommended Complex final composition Good Recommended Maximum editing control Good Recommended Latency-sensitive UI Recommended Less suitable Premium final asset Test first Recommended when the gain is measurable I would not choose one model permanently for every request. A sensible architecture routes routine traffic to Flare and sends difficult revisions or high-value final outputs to Sunburst. Cost model At the time of verification, both models list the same token prices: Text input: $5 per million tokens Cached text input: $1.25 per million tokens Image input: $8 per million tokens Cached image input: $2 per million tokens Image output: $30 per million tokens Actual cost depends on tokens used, not merely request count. The gateway currently advertises a 20% discount for GPT-Image-2.5 Flare. I treat the dashboard and invoice as authoritative because gateway pricing can change. Spend is also affected by: Prompt length Number and resolution of reference images Output dimensions Quality Requested variants Partial previews Retries Rejected outputs The useful metric is accepted-image cost: > Accepted-image cost = total generation spend ÷ approved outputs For example, 10 attempts at $0.18 cost $1.80. If six pass review, the accepted-image cost is $0.30. If better prompting reduces the run to eight attempts with six accepted images, it falls to $0.24. Migrating from GPT Image 2 If the existing application uses GPT Image 2, hold prompts, references, dimensions, and output format constant and change only the model during the comparison: # Before model = "gpt-image-2" # Speed-first model = "gpt-image-2.5-flare" # Precision-first model = "gpt-image-2.5-sunburst" Enter fullscreen mode Exit fullscreen mode Then evaluate: Latency Actual token usage Subject preservation Text correctness Edit locality Output dimensions Acceptance rate Cost per approved image A model-ID swap is not enough for a production migration. Use a fixed evaluation set so the model is the variable being tested. Production notes The surrounding service should remain boring: Keep credentials server-side. Decode and persist image bytes in your own storage. Log model, quality, size, latency, and usage. Cap retries. Treat malformed 400 responses differently from transient 429 and 5xx failures. Track spend per request and per accepted image. Use bounded concurrency and backoff for batch jobs. Do not retry every error. A malformed request will remain malformed, and retrying an authentication failure only creates more failed traffic. Common failures Error Likely cause Response 401 Unauthorized Missing or invalid key Check COMETAPI_KEY and the Bearer header 400 Bad Request Invalid model, size, format, or parameter Remove optional fields and test a minimal request 429 Too Many Requests Concurrency or account limit Retry with exponential backoff and jitter Repeated 5xx Temporary upstream issue Retry a limited number of times Base64 appears as text b64_json was not decoded Decode and save the bytes Transparent output fails Incompatible format Use PNG or WebP Edit changes too much Weak preservation constraints State exactly what must remain unchanged Unexpected cost increase Higher quality, resolution, or retries Log usage and calculate accepted-image cost Published rate limits Tier TPM IPM Tier 1 100K 5 Tier 2 250K 20 Tier 3 800K 50 Tier 4 3M 150 Tier 5 8M 250 Final recommendation Flare is the practical default for fast, everyday generation. Sunburst is the better fit when preserving references, making localized edits, or producing a high-value final composition matters more than latency. I would begin with /v1/images/generations, Flare, one representative prompt set, and an explicit quality level. Add /v1/images/edits and Sunburst after measuring the cases where Flare fails review. The important production metric is not maximum quality in isolation. Measure latency, output-token usage, edit fidelity, acceptance rate, and cost per approved image on the workload the application actually serves. FAQ Are both GPT-Image-2.5 models available? Yes. GPT Image 2.5 Flare and GPT Image 2.5 Sunburst are available through the OpenAI-compatible gateway described above. Do these models edit images? Yes. Both accept image inputs and support image editing. Use the edits route when an existing asset must be modified. Which model should I start with? Start with Flare for most generation workloads. Use Sunburst when reference preservation, complex composition, or editing precision materially affects acceptance. Can I create transparent images? Yes. Set "background": "transparent" and use PNG or WebP. JPEG is not suitable for alpha transparency. Can the OpenAI Python SDK be used? Yes. Instantiate the standard client with: client = OpenAI( api_key=os.environ["COMETAPI_KEY"], base_url="https://api.cometapi.com/v1", ) Enter fullscreen mode Exit fullscreen mode Then select either gpt-image-2.5-flare or gpt-image-2.5-sunburst as appropriate.

来源报道 · 1 篇 · 以下链接均前往原始媒体

← 返回精选动态 原文

更多内容