Runbase

Command Palette

Search for a command to run...

OpenAI

GPT Image 2

ID:openai/gpt-image-2

OpenAI 推出的 GPT Image 2 图片生成 API —— 最高 4K,具备原生推理能力,支持多语言文字渲染和参考图引导编辑。

文生图图片编辑参考图商用
输入
Aspect ratio
Resolution
Reference images
最多 4 张图片,每张不超过 4MB
输出将显示在此处
1K
$0.05
2K
$0.07
4K
$0.12
cURL
curl https://api.runbase.net/v1/runs \
  -H "Authorization: Bearer $RUNBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "openai/gpt-image-2",
    "input": {
      "prompt": "一张陶瓷台灯的电影级产品照片",
      "aspect_ratio": "1:1",
      "resolution": "1K"
    }
  }'

示例

科学信息图

科学信息图

1:1

A detailed scientific infographic of an integrated biohybrid artificial photosynthesis platform for solar-to-fuel conversion, with labeled cross-section diagrams, molecular structures, efficiency charts, and process flow annotations

写实抓拍

写实抓拍

16:9

A photorealistic candid shot of a young man in a light grey Covernat hoodie sitting at station 139 in a premium PC cafe, focused on his laptop screen, soft window light mixing with monitor glow, shallow depth of field

UI 还原

UI 还原

16:9

A pixel-perfect recreation of the YouTube homepage UI with a left sidebar showing Home, Shorts, Subscriptions, History, and Explore sections, a top navigation bar with search and profile icon, category filter chips, and an 8-video thumbnail grid with realistic titles, channel names, view counts, and duration stamps

概述

GPT Image 2 是 OpenAI 的旗舰图片生成模型,于 2026 年 4 月发布。它是首批具备内置推理能力的图片模型之一——模型在生成前会规划构图并验证提示词约束。它支持多语言文字渲染,涵盖 CJK、印地语、孟加拉语等文字系统,非常适合全球化创作需求。

使用场景

具有精准光照和材质的产品摄影。对真实感和细节要求高的营销和编辑视觉素材。需要清晰内嵌文字的信息图、UI 原型和海报设计。参考图引导编辑——上传最多 4 张图片来控制风格、色调或构图。

输入参数

所有参数通过运行请求的 input 对象传入。

ParameterRequiredDescription
promptYes图片生成的文本描述(1–4000 字符)
aspect_ratioNo输出画面比例。默认 1:1。可选:1:12:33:23:44:34:55:49:1616:921:9
resolutionNo输出分辨率。默认 1K。可选:1K2K4K(4K 仅支持 16:9、9:16 或 21:9)
image_urlsNo最多 4 张参考图(每张最大 4 MB)用于图到图生成

提示词技巧

明确描述材质和光照

GPT Image 2 对物理描述响应出色。"Matte ceramic vase on a walnut table, soft window light from the left" 始终优于 "a vase on a table"。

4K 搭配宽屏比例

4K 输出仅限于 16:9、9:16 和 21:9。要在横版或超宽构图中获得最大细节,请将 resolution: "4K" 与这些比例搭配使用。

用参考图保持风格一致

提供与目标风格高度匹配的参考图——模型使用它们来引导色调和构图,而不是从差异较大的参考中推断。

限制

  • 图片中的小号文字可能需要多次迭代才能准确
  • 复杂的手部、logo 和精确的布局约束应人工审核
  • 4K 分辨率仅支持 16:9、9:16 或 21:9 画面比例
  • 每次请求最多 4 张参考图,每张 4 MB
  • 提示词上限 4000 字符

常见问题

GPT Image 2 支持哪些画面比例?

十种:1:1、2:3、3:2、3:4、4:3、4:5、5:4、9:16、16:9 和 21:9。默认为 1:1。

GPT Image 2 支持 4K 吗?

支持——可选 1K、2K 和 4K。4K 仅限于 16:9、9:16 和 21:9 比例。

可以编辑已有图片吗?

可以。通过 image_urls 上传最多 4 张参考图来引导生成。