openai/gpt-image-2
OpenAI 最新图像模型。生成与编辑图像,提示词遵循与文字渲染都强。按 token 计费:文本+图片输入 token 与图片输出 token。适合产品图、设计、创意素材。
来源: launch_0023 · 核验于 2026-06-01
缓存读 $0.625/M · 缓存写 $—/M
把 ONEHOP_KEY 占位符替换为你的 API Key。 创建 →
from openai import OpenAI
client = OpenAI(
base_url="https://api.onehop.ai/v1",
api_key="<ONEHOP_KEY>",
)
response = client.images.generate(
model="openai/gpt-image-2",
prompt="A red panda coding under the moonlight",
n=1,
)
print(response.data[0].url)