跳到正文
价格
OpenAI

GPT Image 2 API

使用 GPT Image 2,通过文字、图片输入创作图片。 支持 1k / 2k / 4k 分辨率。 在线调整参数、预览结果,并复用素材继续创作。

输入 / 输出
文本图片图片
已上架
1k相比官方约省 62%
$0.02/ 次
$0.05268 · 官方参考价
2k相比官方约省 53%
$0.05/ 次
$0.10704 · 官方参考价
4k相比官方约省 32%
$0.12/ 次
$0.1779 · 官方参考价
输入
登录后,直接选择你账户下的 Key。
创作模式
描述你希望生成的内容。
兼容参数
请求预览
{
  "model": "gpt-image-2",
  "input": {
    "quality": "high",
    "resolution": "2k",
    "output_format": "jpeg",
    "prompt": "Create an exceptionally clear, richly colored cinematic fantasy photograph, one complete 16:9 landscape frame. A magnificent red-gold citadel rises above a golden cloud sea against a deep cobalt-blue sky. A closer three-quarter view from a nearby rocky ridge: the entire citadel occupies about 65 percent of the frame width and 75 percent of its height, with breathing room above its tallest tower. One majestic central keep, four elegant subsidiary towers, broad terracotta copper roofs and monumental sandstone arches form a coherent, memorable architectural silhouette. Avoid a mass of tiny fussy spires. A small traveler in a crimson cloak stands fully visible on the lower-left ridge. Warm clear sunlight from the upper left illuminates the front and side of the castle, revealing individual masonry joints, carved balconies and sharply defined copper roof tiles. Cool cobalt shadows retain visible detail. The air between camera and castle is perfectly clear; the sculptural golden clouds stay below the foundation, with dark blue storm clouds far behind. Brilliant red copper, warm gold and deep cobalt, luminous but controlled highlights. Large-format cinema camera, high resolving power prime lens, deep focus, precise natural edges, strong local contrast in stone and metal, beautifully separated forms. Tactile photographic realism, majestic scale, bold clean visual hierarchy. No diffusion filter, no bloom, no lens flare, no fog over the subject, no soft focus, no motion blur, no film grain, no painterly or smeared details, no sharpening halos. No text, logos, watermark, border, collage, space stations, circular portals or machinery.",
    "aspect_ratio": "16:9"
  }
}
输出
接着创作

GPT Image 2 价格

先估算一次请求的费用,再选择适合工作流的预算。

用量数量单价费用
1k1 次$0.02/ 次$0.02
每次请求费用$0.02

按公开美元价格估算,实际费用以账号价格与最终用量回执为准。

查看所有规格与价格
规格平台价格官方参考
1k$0.02 / 次$0.05268 相比官方约省 62%
2k$0.05 / 次$0.10704 相比官方约省 53%
4k$0.12 / 次$0.1779 相比官方约省 32%

看看它能创造什么。

以下为平台已有的实际生成案例,可查看原始素材与提示词。

阳光照亮赤金王城清晰的石拱与铜瓦,金色云海和钴蓝天空衬托完整城堡,前景旅人显出宏大尺度。

赤金云海王城

查看提示词

Create an exceptionally clear, richly colored cinematic fantasy photograph, one complete 16:9 landscape frame. A magnificent red-gold citadel rises above a golden cloud sea against a deep cobalt-blue sky. A closer three-quarter view from a nearby rocky ridge: the entire citadel occupies about 65 percent of the frame width and 75 percent of its height, with breathing room above its tallest tower. One majestic central keep, four elegant subsidiary towers, broad terracotta copper roofs and monumental sandstone arches form a coherent, memorable architectural silhouette. Avoid a mass of tiny fussy spires. A small traveler in a crimson cloak stands fully visible on the lower-left ridge. Warm clear sunlight from the upper left illuminates the front and side of the castle, revealing individual masonry joints, carved balconies and sharply defined copper roof tiles. Cool cobalt shadows retain visible detail. The air between camera and castle is perfectly clear; the sculptural golden clouds stay below the foundation, with dark blue storm clouds far behind. Brilliant red copper, warm gold and deep cobalt, luminous but controlled highlights. Large-format cinema camera, high resolving power prime lens, deep focus, precise natural edges, strong local contrast in stone and metal, beautifully separated forms. Tactile photographic realism, majestic scale, bold clean visual hierarchy. No diffusion filter, no bloom, no lens flare, no fog over the subject, no soft focus, no motion blur, no film grain, no painterly or smeared details, no sharpening halos. No text, logos, watermark, border, collage, space stations, circular portals or machinery.

长角森林巨兽穿过翡翠雨林溪流,琥珀阳光照出岩灰皮肤和苔藓纹理,青碧瀑布衬托清晰完整的身形。

翡翠雨林巨兽

查看提示词

A spectacular, exceptionally sharp live-action fantasy creature photograph in a complete 16:9 landscape frame. Low camera beside a crystal-clear jungle stream, looking up at one colossal horned forest guardian in an emerald rainforest canyon. Its magnificent complete four-legged body fills 70 percent of the image width, seen in a readable three-quarter side view; one expressive broad head and both elegantly swept horns are prominent near the left third. All four powerful legs, its single torso and a short tail have coherent anatomy and fit inside the frame with clear margins. Slate-green rhinoceros-like hide with sharply resolved natural folds, individual moss cushions on its shoulders, wet ivory horns, a vivid amber eye. The head and chest are clearly lit by broad open-sky light; a narrow amber side-backlight outlines its shoulder without obscuring texture. Two turquoise waterfalls and clean vertical rock walls sit behind it, separated from the creature silhouette. Emerald ferns, glossy jade leaves, a few crimson flowers and sharply defined water ripples provide rich color and scale. Clear humid air, no blanket of mist. Premium high-resolution cinematic realism, deep focus across the entire creature, high shutter speed freezing droplets, precise natural microtexture and robust local contrast, open detailed shadows. An awe-inspiring living animal, not a stone statue or a mechanical monster. Avoid glow, bloom, fog veils, backlit haze, shallow focus, motion blur, soft painterly fur, oversharpened halos, extra legs, duplicated heads and cropped horns. No text, watermark, logos, borders, collage, glowing network nodes or futuristic structures.

紫晶神殿棱面与柱廊清晰分明,通透青碧潮水流过层叠石阶,玫瑰色天空映出明亮倒影。

紫晶潮汐神殿

查看提示词

An extraordinary cinematic photograph of an original amethyst tidal temple, complete 16:9 landscape composition, brilliant clarity and rich jewel colors. From a gently elevated wide viewpoint over transparent turquoise water, one monumental violet temple fills 65 percent of the frame width. Its whole silhouette is visible: a single tall triangular sanctuary, six broad faceted amethyst buttresses and two orderly open colonnades rising from dark basalt terraces. The design is bold, coherent, monumental and beautifully readable, with a limited number of large architectural forms instead of countless tiny crystal spikes. Deep violet crystal has physically plausible polished facets, precise edges, subtle internal inclusions and clear specular highlights, mixed with intricately carved but sharply defined dark stone. Thin transparent sheets of turquoise seawater spill down the foreground terraces; individual ripple ridges and submerged paving blocks are crisply resolved. A rose-pink sky and peach clouds form a clean background above a narrow bright horizon. Late-day sunlight from the side and bright sky fill illuminate the front facade; all columns and openings remain distinguishable, with violet shadows retaining detail. A few tiny pilgrims on a causeway establish immense scale. Amethyst purple, sea-glass turquoise and luminous rose with clear color separation. Large-format architectural photography, deep focus, crisp natural microcontrast, extremely clean air, sharp wet stone and crystal surfaces. No diffusion, bloom, heavy mist, sea-spray veil, soft focus, blurry reflections, grain, painterly texture or excessive sharpening. No text, watermark, logo, border, collage, circular portals, planets or futuristic machinery.

朱红长龙完整掠过晴朗雪岭,红色鳞片、象牙龙角与金色鬃毛清晰可见,下方木构古寺悬于峭壁。

朱红雪岭龙影

查看提示词

A breathtaking, tack-sharp action photograph from an original Eastern fantasy epic, one complete 16:9 landscape image. One magnificent vermilion Eastern dragon flies diagonally above a snowy mountain gorge, filling about 80 percent of the frame width. A graceful single open S-shaped body leads from the tapered tail at upper left to a striking head near the right third; the complete tail, body, horns, whiskers and exactly four small clawed limbs are fully visible with breathing room. No wings. The head is large enough to read at thumbnail size, with one expressive amber eye, beautifully articulated ivory horns, individual golden mane hairs and rows of clearly separated red lacquer-like scales continuing coherently along the muscular body. Bright clear winter sunlight lights the face and red scales from the camera side; a golden edge light adds shape. Freeze the action with a high shutter speed: the head, scales, claws, mane and tail are all in sharp focus. Below, an elegant dark-timber cliff temple with sharply defined tiled roofs stands against white snow ridges, cyan ice and deep ink-blue rocky shadows. Snow crystals and rock strata remain crisp; thin distant clouds stay behind the mountains and never obscure the dragon. Rich vermilion and gold against clean icy whites and blues, precise photographic edges, excellent natural microcontrast, strong separation, deep focus and a lucid monumental composition. Realistic high-end cinematic creature work. No motion blur, haze, bloom, soft focus, grain, painterly smearing, artificial sharpening halos, duplicate heads, tangled coils or extra limbs. No text, watermark, logo, border, collage, planets, portals or science-fiction objects.

GPT Image 2 是什么?

使用 GPT Image 2,通过文字、图片输入创作图片。 支持 1k / 2k / 4k 分辨率。 在线调整参数、预览结果,并复用素材继续创作。

在提示词中说明主体、构图、光线和使用场景。需要引导主体或画面风格时,可加入参考图片。按当前接口选择分辨率、比例和输出选项,并检查生成结果后再用于产品。

GPT Image 2 规格

模型 IDgpt-image-2
模型厂商OpenAI
调用接口/v1/tasks
分辨率1k / 2k / 4k
宽高比21:9 / 16:9 / 3:2 / 4:3 / 5:4 / 1:1 / 4:5 / 3:4 / 2:3 / 9:16
质量low / medium / high
输出格式png / jpeg / webp
背景auto / transparent / opaque
参考图片最多 20 个

生成前需要了解

  • 使用本页展示的模型 ID 和 API 请求格式。
  • 生成采用异步任务。请保留返回的任务 ID,用于查询产物与结算状态。
  • Playground 仅提供当前平台接口实际支持的选项。

GPT Image 2 与同类模型对比

规格GPT Image 2GPT Image 2.5 FlareGPT Image 2.5 Sunburst
厂商OpenAIOpenAIOpenAI
输入 → 输出文本图片图片文本图片图片文本图片图片
选择依据当前模型均声明文本、图片输入 · 计费单位一致均声明文本、图片输入 · 计费单位一致
分辨率1k / 2k / 4k1k / 2k / 4k1k / 2k / 4k
参考图片202020
起始价格$0.02 / 次$0.03 / 次$0.03 / 次

根据工作流需要的输入类型、输出规格和计费单位选择模型。使用同一提示词进行试用,可以更直接地比较模型在你实际场景中的表现。

BUILD WITH NEWROUTERS

将 GPT Image 2 接入你的应用

使用统一的媒体任务接口提交参数,再通过任务 ID 查询结果。图片与视频保留各自的输入要求,代码示例与你选择的模型一致。

  1. 01
    获取 API Key

    登录并准备有权访问此模型的 Key。

  2. 02
    配置请求

    在 Playground 选择参数,再复制 API 示例。

  3. 03
    运行并查看结果

    在历史记录中核对状态、产物和费用。

API 接入说明

POST /v1/tasks · Authorization: Bearer

cURL
curl 'https://newrouters.com/v1/tasks' \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $MODEL_API_KEY" \
  --data '{
  "model": "gpt-image-2",
  "input": {
    "quality": "medium",
    "resolution": "1k",
    "output_format": "jpeg",
    "prompt": "清晨的山间湖泊,柔和的晨光。"
  }
}'
JavaScript
const response = await fetch("https://newrouters.com/v1/tasks", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Authorization": "Bearer $MODEL_API_KEY"
  },
  body: JSON.stringify({
    "model": "gpt-image-2",
    "input": {
      "quality": "medium",
      "resolution": "1k",
      "output_format": "jpeg",
      "prompt": "清晨的山间湖泊,柔和的晨光。"
    }
  })
});
if (!response.ok) throw new Error(await response.text());
console.log(await response.text());
Python
import json
import requests

response = requests.post(
    "https://newrouters.com/v1/tasks",
    headers=json.loads("{\"Content-Type\":\"application/json\",\"Authorization\":\"Bearer $MODEL_API_KEY\"}"),
    json=json.loads("{\"model\":\"gpt-image-2\",\"input\":{\"quality\":\"medium\",\"resolution\":\"1k\",\"output_format\":\"jpeg\",\"prompt\":\"清晨的山间湖泊,柔和的晨光。\"}}"),
    timeout=300,
)
response.raise_for_status()
print(response.text)

使用返回的任务 ID 查询处理状态与产物。

curl -H "Authorization: Bearer $MODEL_API_KEY" "https://newrouters.com/v1/tasks/$TASK_ID"

开发文档:鉴权与 Key · 任务状态与结果 · 错误处理

完整 API 参数与组合约束

请求参数

参数类型取值与约束
sizestringDeprecated compatibility field. Prefer aspect_ratio.
imagesarray
prompt *string
qualityJSON"low" · "medium" · "high"默认: "medium"
backgroundJSON"auto" · "transparent" · "opaque"
resolutionJSON"1k" · "2k" · "4k"默认: "1k"
aspect_ratioJSON"21:9" · "16:9" · "3:2" · "4:3" · "5:4" · "1:1" · "4:5" · "3:4" · "2:3" · "9:16"
output_formatJSON"png" · "jpeg" · "webp"默认: "jpeg"
完整 JSON Schema 与组合约束
{
  "type": "object",
  "required": [
    "prompt"
  ],
  "properties": {
    "size": {
      "type": "string",
      "pattern": "^(?:auto|[1-9][0-9]{1,4}x[1-9][0-9]{1,4})$",
      "deprecated": true,
      "description": "Deprecated compatibility field. Prefer aspect_ratio."
    },
    "images": {
      "type": "array",
      "items": {
        "type": "string",
        "format": "uri"
      },
      "maxItems": 20
    },
    "prompt": {
      "type": "string",
      "maxLength": 100000,
      "minLength": 1
    },
    "quality": {
      "enum": [
        "low",
        "medium",
        "high"
      ],
      "default": "medium"
    },
    "background": {
      "enum": [
        "auto",
        "transparent",
        "opaque"
      ]
    },
    "resolution": {
      "enum": [
        "1k",
        "2k",
        "4k"
      ],
      "default": "1k"
    },
    "aspect_ratio": {
      "enum": [
        "21:9",
        "16:9",
        "3:2",
        "4:3",
        "5:4",
        "1:1",
        "4:5",
        "3:4",
        "2:3",
        "9:16"
      ]
    },
    "output_format": {
      "enum": [
        "png",
        "jpeg",
        "webp"
      ],
      "default": "jpeg"
    }
  },
  "additionalProperties": false
}

GPT Image 2 API · 常见问题

了解模型的价格、输入要求、接入方式和结果查询。

GPT Image 2 如何计费?

当前公开起价为 $0.02 / 次,各档位详见价格区。Playground 提交前会核对账号价格,最终费用以任务或调用回执为准。

如何获取 NewRouters API Key?

登录后点击工作区上方的 Quick Start。选择或创建有权访问此模型的 Key,再复制请求示例。

支持哪些输入和输出设置?

当前支持的输入字段包括:images、prompt、quality、background、resolution、aspect_ratio、output_format。参数表列出可选值、默认值与组合约束。

可以使用参考图片吗?

可以。在参考模式中上传图片或输入 URL。 当前上限为 20 张。参考图用于引导新的生成,不代表提供 mask 局部编辑功能。

如何获取结果和查看历史记录?

保存返回的任务 ID,持续查询到成功或失败。History 标签页可以重新打开任务并复用参数。

模型暂时关闭后会怎样?

页面保留原模型身份并显示“暂时关闭”,禁止发起新生成,已有任务记录仍可查看。上游临时故障会与后台主动关闭分开提示。

阅读 API 文档 ↗

探索更多 AI 工具

浏览全部模型 ↗

接入主题 / 开发文档

查看全部文档 ↗