openai/gpt-image-2
GPT Image 2
OpenAI's latest image generation model. Supports high-fidelity image generation and editing via the dedicated Images API.
输入模态文本 / 图像
输出模态图像
支持协议
发布日期—
能力与模态
当前模型版本支持的输入输出能力
输入模态
文本
图像
输出模态
图像
模型价格
价格与能力以接口实时数据为准
输入价格
$5 / M
图片输入
$8 / M
图像输出
$30 / M
缓存读取
$1.25 / M
缓存图像
$2 / M
API 接口
当前模型可以使用的调用端点
原生协议 2
/v1/images/edits
/v1/images/generations
API 接入示例
选择协议与语言,配置 API Key 后运行
调用接口
先在环境变量中配置平台密钥 AI_GATEWAY_API_KEY · 适用于 Bash / zsh / WSL。
POST
https://api.tikway.ai/v1/images/generationscurl --fail-with-body 'https://api.tikway.ai/v1/images/generations' \
-H "Authorization: Bearer $AI_GATEWAY_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"model": "openai/gpt-image-2",
"prompt": "A quiet coastal town at sunrise, soft natural light"
}'