GPT-image-2 AI 图像 API

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

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

输入

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

输出

预览
图片预览

请求摘要

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

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

请求预览
{
  "model": "gpt-image-2",
  "prompt": "Goal: Create a polished website mockup for a Japanese mystery game or story archive titled {argument name=\"site title\" default=\"月蝕綺譚\"}, shown as a responsive design preview with one desktop browser window on the left and one smartphone screen on the right.\n\nCanvas: Wide 16:9 presentation image on a light gray background. Place a large desktop browser mockup occupying about 75% of the width on the left, and a tall smartphone mockup occupying about 22% of the width on the right. Use realistic device frames with soft shadows.\n\nVisual style: Elegant Japanese literary horror, quiet mystery, archival documents, moonlit darkness. Palette of ivory paper, black ink, deep navy-black, muted gray, and one strong vermilion red accent. Use serif Japanese typography, thin ruled lines, ticket-like borders, subtle paper texture, old manuscript imagery, and faint crescent-orbit line graphics. The overall mood should feel like a premium official website for a narrative game.\n\nDesktop layout: Show a browser window with a dark top bar and three small window dots. Inside the page, use an ivory header with the site title {argument name=\"site title\" default=\"月蝕綺譚\"} on the left, a small red seal mark, and exactly 5 horizontal navigation items: 「お知らせ」, 「開発記録」, 「ご意見箱」, 「アーカイブ」, and a dark navy button labeled 「メールで会員になる」. The hero section below is a wide dark moon-eclipse visual with the vertical title 「月蝕綺譚」 centered over a glowing crescent/eclipse. Overlay a translucent archive UI card with old Japanese documents and exactly 5 small collectible/document cards along the bottom of that overlay. Along the very bottom of the hero image, include exactly 5 horizontal thumbnail strips showing: a night street, a blueprint-like room, a dark folder or object, old handwritten papers, and a desk/workspace map.\n\nDesktop right signup card: To the right of the hero, place a large cream ticket-shaped membership card with clipped semicircle notches and a thin decorative border. It includes the small label 「入会札」, a stamp emblem, headline 「メールで会員になる」, an envelope icon, short explanatory text, one email input field with placeholder 「メールアドレスを入力」, and a red CTA button labeled 「登録する」 with a right arrow. Include tiny privacy-policy text beneath.\n\nDesktop lower content: Under the hero, make a two-column-feeling section. On the left, a large Japanese tagline {argument name=\"tagline text\" default=\"物語の続きを、いちばん近くで。\"} with a thin vertical red line and a small descriptive paragraph. On the right, place exactly 3 article cards in a row. The 3 cards are: 1) 「月蝕綺譚 最新便」 with a moon image, a small red NEW label, title 「大型アップデート『○○』を公開しました」, date 2024.05.20; 2) 「開発記録」 with a notebook and pen image, title 「開発記録 #12:環境音の調整について」, date 2024.05.18; 3) 「ご意見箱」 with a dark mailbox image, title 「ご意見・ご感想をお聞かせください」, date 2024.05.16. Each card has a thin border, a small arrow in the header, and gray placeholder summary lines.\n\nDesktop footer: Add a dark navy footer spanning the bottom with exactly 6 footer links: 「お知らせ」, 「開発記録」, 「ご意見箱」, 「アーカイブ」, 「利用規約」, 「プライバシーポリシー」. Include a crescent moon icon and copyright 「© 2024 月蝕綺譚」 on the right.\n\nMobile layout: On the right smartphone, show the same site adapted to mobile. Status bar time reads 9:41. Header contains the title 「月蝕綺譚」 and a hamburger menu icon. Below it, show a compact dark hero with the eclipse and vertical title, then exactly 5 small horizontal thumbnails. Continue with the tagline 「物語の続きを、いちばん近くで。」, then the same ticket-shaped email signup card, then the first news card 「月蝕綺譚 最新便」 with moon image and red NEW label. The mobile view should be vertically scrollable-looking but contained within the phone screen.\n\nConstraints: Keep all visible interface text in Japanese as specified. Use clean, high-fidelity UI mockup rendering, crisp typography, subtle shadows, and no extra logos or watermarks. The design should look like a finished web/app mock generated for implementation planning.",
  "n": 1,
  "size": "1024x1024",
  "quality": "high",
  "output_format": "png",
  "background": "opaque",
  "moderation": "auto"
}

能力

GPT Image 2 API 性能与可用性

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

服务可用率
—
最近 30 天
延迟
—
最近 30 天
请求量
—
近 30 天
成功推理趋势
数据积累中

API 接入

GPT Image 2 API 使用与请求活动

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

请求量
—
近 30 天
延迟
—
最近 30 天
可用性
—
最近 30 天
成功推理趋势调用趋势
数据积累中

价格与计费

GPT-image-2 价格与计费

这里的 GPT-image-2 价格按 Flatkey 当前目录单位展示,不套用 OpenAI 直连费率。估算前先确定图片尺寸、质量和数量;做图片编辑时,提供参考图并说明哪些内容需要保持不变。

Flatkey 价格

价格 / 张图片

实时目录模型
$0.0066/ 图像$0.011/ 图像
价格 / 张图片
$0.0066/ 图像$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.0066 / 图像
本次预估
$0.0066

最终费用以实际提交的请求和账户分组为准。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

四种接入方式共用同一个 Key 和模型目录,选择一种查看可运行示例。

通过兼容 OpenAI 的 API 调用任意模型。选择模型和语言,复制即可运行的示例。
继续使用熟悉的 OpenAI SDK,只需将 API 地址切换到 Flatkey。
在终端生成图片和视频,也可以交给 AI 助手完成整个流程。
一条命令接入 Codex 或 Claude Code,在现有项目中直接使用 Flatkey。
curl https://router.flatkey.ai/v1/images/generations \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer sk-***" \
  -d '{"model":"gpt-image-2","prompt":"使用 GPT-image-2 制作高质量产品图:构图干净、光线精准、主体突出、细节真实。","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 的价格是多少?
价格 / 张图片: $0.0066 / 图像. 这里的 GPT-image-2 价格按 Flatkey 当前目录单位展示,不套用 OpenAI 直连费率。估算前先确定图片尺寸、质量和数量;做图片编辑时,提供参考图并说明哪些内容需要保持不变。
GPT Image 2 支持哪些尺寸和格式?
尺寸为 1024x1024、1536x1024、1024x1536 和 auto;格式为 PNG、JPEG、WebP,质量为 auto/high/medium/low。
GPT Image 2 能生成透明背景吗?
已核实字段为 background: opaque | auto;本页不承诺透明输出。
GPT Image 2 免费或无需注册就能使用吗?
研究未核实免费或免注册生成。请使用标准 Flatkey 访问流程并查看带日期的价格区块。