GPT-image-2 AI 图像 API

GPT Image 2 是 OpenAI 的图像模型,通过 Flatkey 的图像生成流程提供。使用 /v1/images/generations,发送前配置数量、尺寸、质量、格式、背景和 moderation 字段。

文生图参考图引导图片编辑
供应商
OpenAI
官方价格
$0.011 / 图像
Flatkey 价格
$0.0088 / 图像-20%
生成器配置 · Playground(注册前可编辑)

输入

提示词查看更多806 / 10000
快捷 Prompt
参考图片
开始生成

输出

预览
图片预览

请求摘要

接口
POST /v1/images/generations
模型 ID
GPT-image-2
画面比例
3:4
分辨率
1024x1024
质量
high
输出数量
1

仅供预览。登录后即可向 Flatkey 提交此请求。

请求预览
{
  "model": "gpt-image-2",
  "prompt": "Exquisite three-dimensional embroidery-style illustration, shallow relief fiber art effect, pure \"{argument name=\"Base Color\" default=\"Silk White + Milk White\"}\" base color, delicate silk thread texture. The composition features {argument name=\"main subject\" default=\"Several little birds\"} resting on winding flower branches, surrounded by {argument name=\"accent colors\" default=\"pink white, light peach, coral pink, light gold\"} flowers and leaves, with a light and elegant composition with ample blank space. Bird feathers are embroidered with milky white, light blue, light pink, and light gold threads, with slender and natural flower branches and layered floral lines, presenting a high-end hand-embroidered silk thread layer, soft light and shadow, rich details, and a gentle, fresh artistic effect.",
  "n": 1,
  "size": "1024x1024",
  "quality": "high",
  "output_format": "png",
  "background": "opaque",
  "moderation": "auto"
}

能力

GPT Image 2 API 性能与可用性

当 Flatkey 实时请求流量足够时,这里会显示 GPT Image 2 的请求遥测;不据此推断基准测试或质量评分。

供应商平均可用性
61.0%
最近 30 天
延迟
—
最近 30 天
请求量
4.43K
30 天窗口
成功推理趋势

API

GPT Image 2 API 使用与请求活动

此区块反映 Flatkey 对 GPT Image 2 的实时请求;收集到足够流量前不会报告数据。

请求量
4.43K
30 天窗口
延迟
—
最近 30 天
可用性
61.0%
最近 30 天
成功推理趋势活动

价格

GPT Image 2 按 token 与图像尺寸计价

下方价格来自当前模型的 Flatkey 定价数据,以及定价 API 返回的可见分组。

Flatkey 价格

价格 / 张图片

实时目录模型
$0.0088 / 图像
价格 / 张图片
$0.0088 / 图像$0.011 / 图像
先试 prompt
共用余额

充值余额

充值余额

图像、视频、音频和文本模型共用同一个 Flatkey 余额和 API Key。

模型目录
模型类型
文生图
API
/v1/images/generations
计费依据
图像
输出数量
1–10

GPT Image 2 图像生成与编辑能力

下方只展示已记录的集成字段,不推断基准测试或质量承诺。

文生图与图像编辑

通过 /v1/images/generations 生成新画面,也可通过 /v1/images/edits 修改已有图片。

参考图驱动创作

使用图片上下文保留主体与构图细节,适合产品、编辑和营销素材制作。

多场景视觉变体

围绕同一创意生成方形、竖版或横版素材,适配不同版位和渠道。

安全且适合交付

结合模型已记录的质量、格式、背景和内容审核行为,整理可直接进入制作流程的结果。

对比

GPT Image 2 与 GPT Image 1 的迁移字段对比

下方只展示已记录的集成字段,不推断基准测试或质量承诺。

能力GPT Image 1GPT Image 2
端点此处未知/v1/images/generations; /v1/images/edits
尺寸此处未知1024x1024, 1536x1024, 1024x1536, auto
格式此处未知PNG, JPEG, WebP
质量/背景/moderation此处未知见上方文档
图像质量排名未声明未声明

接入前先选对请求方式

核对支持的工作流、当前配置的实时费用,以及 Flatkey 实际使用的参数契约。

实时费用估算

当目录提供固定单价时,根据当前 Playground 配置和实时目录价格计算。

当前配置
1024x1024 · high · 1×
实时单价
$0.0088 / 图像
本次预估
$0.0088

最终费用以实际提交的请求和账户分组为准。Token 或分层计费无法简化成一个固定预估值。

工作流与 Model ID

只使用标记为可用的工作流。Flatkey 对外保持一个模型 ID,由请求体选择输入方式。

可用

文生图

通过文本提示词和输出参数生成新图片。

模型 ID
gpt-image-2
接口
/v1/images/generations
可用

参考图生成与编辑

用参考图片完成编辑、变体或主体与构图引导。

模型 ID
gpt-image-2
接口
/v1/images/generations

参数兼容矩阵

以下取值与 Playground 和请求预览使用同一份模型配置。

n图片数量
可选值

1–10

默认值: 1
size尺寸
可选值

1024x1024 · 1536x1024 · 1024x1536 · auto

默认值: 1024x1024
quality质量
可选值

auto · high · medium · low

默认值: high
output_format输出格式
可选值

png · jpeg · webp

默认值: png
background背景
可选值

opaque · auto

默认值: opaque
moderation审核强度
可选值

auto · low

默认值: auto
image参考素材上限
可选值

4 个文件

接口: /v1/images/generations

从首次测试到生产接入

Playground 与 API 使用同一套请求契约,并明确处理参数校验、余额、任务状态和产物获取。

请求生命周期

  1. 1

    校验模型、提示词、参考素材和输出设置。

  2. 2

    使用已文档化字段提交图片请求。

  3. 3

    读取路由返回的生成结果或异步任务结果。

  4. 4

    在自己的工作流中保存生成文件和请求元数据。

生产检查项

参数校验

提交前拦截不支持的尺寸、时长、比例、格式或参考素材数量。

鉴权与余额

分别处理无效密钥、余额不足、限流和账户分组价格。

输入或策略拒绝

明确指出被拒绝的提示词或素材,让用户只替换失败的输入。

任务失败或超时

保留任务 ID,限制重试次数,且不能把超时当成生成成功。

提示词库

GPT Image 2 产品与营销图像提示词示例

从具体主体、动作、镜头或构图和明确的输出设置开始;请求字段与提示词分开配置。

游戏 UI 交互与装备动态切换
游戏 UI 交互与装备动态切换

使用 Image 2 生成

Scene: A 16:9 sci-fi game loadout screen in a blue-purple spaceship hangar. A female armored character stands centered with a glowing violet rifle; armor slots line the left, three weapon slots line the right, and the lower slot is highlighted. Keep the HUD hierarchy, pose, lighting, and equipment geometry fixed for an exact equipment-switch frame. No readable words, logos, invented stats, or watermark. Composition and rendering: Deliver one 16:9 game-interface keyframe. Separate the character, held equipment and HUD into clear depth layers; keep slot spacing and icon scale consistent, with the selected item visually dominant. Preserve the scene-specific game art style. Let material edges catch the existing light without letting interface glow obscure the silhouette. Keep all equipment fully inside the frame. Avoid: warped perspective, malformed anatomy, merged objects, inconsistent shadows, excessive sharpening and watermarks. Follow the scene-specific text and branding restrictions above.

生成同款
高逼真电视/体育赛事直播模拟
高逼真电视/体育赛事直播模拟

使用 Image 2 生成

Scene: A rainy night soccer broadcast frame under bright stadium floodlights. A black-uniform player strikes the ball while two white-uniform defenders close in, with the goal and a blurred crowd behind. Keep the broadcast camera angle, blank blue score bars, spray, and motion blur consistent; leave overlays abstract and text-free. No real teams, athletes, logos, or watermark. Composition and rendering: Deliver one 16:9 broadcast still at the decisive instant. Use coherent perspective for the playing surface and equipment, readable separation between competitors, and a softer crowd behind the action. Keep the principal subject sharp, with directional blur limited to fast extremities and spray. Preserve the specified broadcast angle and reserve overlay areas clear of the action. Avoid: warped perspective, malformed anatomy, merged objects, inconsistent shadows, excessive sharpening and watermarks. Follow the scene-specific text and branding restrictions above.

生成同款
品牌商业 TVC 与电商产品无缝展示
品牌商业 TVC 与电商产品无缝展示

使用 Image 2 生成

Scene: A closed matte-black square smartwatch with a black strap rests on a wet glossy black tabletop. Water droplets catch a cool blue rim light and a soft reflection sits beneath the watch. Use a low three-quarter product camera and preserve the case, strap, highlights, and empty dark background. No readable branding, extra products, hands, or watermark. Composition and rendering: Deliver one 16:9 commercial product still. Keep the complete product silhouette inside generous crop-safe margins. Resolve edges, seams and material transitions precisely; shape highlights to describe volume without clipping bright surfaces or crushing dark details. Align reflections with the object and light source. Retain the stated camera angle and existing negative space; add no decorative props. Avoid: warped perspective, malformed anatomy, merged objects, inconsistent shadows, excessive sharpening and watermarks. Follow the scene-specific text and branding restrictions above.

生成同款
影视级剧本角色与多视角分镜演播
影视级剧本角色与多视角分镜演播

使用 Image 2 生成

Scene: On a rain-soaked observatory roof at sunrise, a lone figure in a long dark coat walks toward a large telescope beside an open dome. Wet stone reflects the warm doorway light; cloud-covered mountains sit beyond. Hold the screen direction and end on the telescope and figure in the same wide composition. No readable text, logos, or watermark. Composition and rendering: Deliver one 16:9 storyboard keyframe, not a collage or an action sequence. Separate foreground, character plane and background through the existing light and atmospheric depth. Keep the stated pose and eyelines readable, and retain environmental landmarks for continuity. Match the described photographic, illustrated or puppet medium; give fabric and surfaces texture appropriate to that medium. Avoid: warped perspective, malformed anatomy, merged objects, inconsistent shadows, excessive sharpening and watermarks. Follow the scene-specific text and branding restrictions above.

生成同款
喜剧段子与物理剧情演播
喜剧段子与物理剧情演播

使用 Image 2 生成

Scene: In a bright home kitchen, a surprised cook in a blue shirt and cream apron reaches toward pancakes, a frying pan, flour, bowl, and whisk suspended midair. Freeze the comic cause-and-effect moment with believable weight, warm daylight, and a clear path for each object. No injury, logos, readable words, or watermark. Composition and rendering: Deliver one 16:9 physical-comedy still at the described instant. Make the cause of the gag readable through body balance, grip and object spacing. Separate the reaction from the airborne props; retain believable gravity and contact points. Keep the face and important props sharp, with only restrained directional blur on fast edges. Preserve the stated lighting and room or stage layout. Avoid: warped perspective, malformed anatomy, merged objects, inconsistent shadows, excessive sharpening and watermarks. Follow the scene-specific text and branding restrictions above.

生成同款
老旧照片修复与历史/人文动态复活
老旧照片修复与历史/人文动态复活

使用 Image 2 生成

Scene: A rainy period harbor platform shelters people in era-appropriate coats and umbrellas as a vintage green tram arrives on wet tracks. Wooden waterfront buildings and misty mountains sit behind the reflections. Preserve the historical clothing, tram shape, rain direction, and stable wide composition; no readable signage, logos, or watermark. Composition and restoration: Deliver one 16:9 archival-style still. Preserve the original framing, period-specific construction and restrained tonal range; retain monochrome, sepia or faded color as described. Recover modest detail in faces, clothing and architecture without synthetic sharpening. Keep fine grain and authentic aging consistent across the frame; repair damage without replacing historical features. Avoid: warped perspective, malformed anatomy, merged objects, inconsistent shadows, excessive sharpening and watermarks. Follow the scene-specific text and branding restrictions above.

生成同款

为什么选择 Flatkey

为什么通过 Flatkey 使用 GPT Image 2?

在从测试请求走向生产流量时,清楚展示 GPT Image 2 的事实、请求字段和价格边界。

集中展示已记录控制项

在请求交给控制台前,设置 n、size、quality、output format、background 和 moderation。

价格维度清晰

分别查看 GPT Image 2 已记录的输入、输出和缓存维度,不要把一个标题价格当作统一价格。

贴合工作流的起点

将产品、广告和分镜示例作为可编辑的提示词起点。

不做未经核实的承诺

在事实未核实的情况下,本页不承诺透明输出、免费生成或固定单图价格。

API

GPT Image 2 API endpoint 与请求设置

将模型 ID 与支持的图像控制项一同发送。

POST /v1/images/generations
POST /v1/images/edits
gpt-image-2
n、size、quality、format、background 和 moderation。
使用标准 Flatkey 账号和 API Key 流程;不承诺免费或免注册生成。
curl https://router.flatkey.ai/v1/images/generations \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer sk-***" \
  -d '{"model":"gpt-image-2","prompt":"Creative direction: Create a vertical illustrated fantasy narrative poster with a large dark-haired profile silhouette on the left, a layered mountain temple city in the center, a red torii gate, drifting cherry blossoms, and small travelers along the bottom edge. Use a cream paper texture with ink-and-wash detail, a restrained charcoal, vermilion, and muted violet palette, and reserve a clean right margin for the title and credits.\n\nComposition, material and finish: Build the silhouette and temple city as nested visual layers, with the gate as the vermilion focal accent. Keep small travelers distinct from architectural detail. Use delicate ink edges and paper grain rather than photographic skin or glossy 3D surfaces. Leave the right title margin genuinely empty; avoid added lettering, duplicated gates, muddied silhouettes and watermarks.","n":1,"size":"1024x1024","quality":"high","output_format":"png","background":"opaque","moderation":"auto"}'
文档

常见问题

GPT Image 2
API: 价格与提示词问题

价格、兼容性、限制与模型专属请求细节。

什么是 GPT Image 2?
GPT Image 2 是 OpenAI 的图像模型,通过 Flatkey 的图像生成流程提供。使用 /v1/images/generations,发送前配置数量、尺寸、质量、格式、背景和 moderation 字段。
如何访问 GPT Image 2?
先配置请求,再使用标准 Flatkey 账号和 API Key 流程。本页不承诺免注册生成。
GPT Image 2 的 API endpoint 是什么?
使用 /v1/images/generations、模型 ID gpt-image-2 及 API 区块列出的支持字段。
GPT Image 2 的价格是多少?
请查看上方价格区,那里展示了定价 API 返回的当前 Flatkey 价格。
GPT Image 2 支持哪些尺寸和格式?
尺寸为 1024x1024、1536x1024、1024x1536 和 auto;格式为 PNG、JPEG、WebP,质量为 auto/high/medium/low。
GPT Image 2 能生成透明背景吗?
已核实字段为 background: opaque | auto;本页不承诺透明输出。
GPT Image 2 免费或无需注册就能使用吗?
研究未核实免费或免注册生成。请使用标准 Flatkey 访问流程并查看带日期的价格区块。