OpenAI

OpenAI: GPT Image 2Image

openai/gpt-image-2

GPT Image 2 是 OpenAI 的图像生成与编辑模型,提升了画质、编辑控制、面部保持和提示词遵循能力,支持更灵活的比例、分辨率和编辑工作流。

0 context window
Released: 2026-04-21
Protocols:OpenAI
Capabilities:VisionPrompt Caching

Pricing

PriceRate 0.15x
HaoAI
Official
Input
$0.75/M
$5/M
Image input
$1.2/M img tok
$8/M img tok
Image output tokens (high)
$4.5/M img tok
$30/M img tok
Cache read
$0.188/M
$1.25/M

Code Examples

from openai import OpenAI

client = OpenAI(
    base_url="https://api.hao.ai/v1",
    api_key="YOUR_HAOAI_API_KEY",
)

response = client.images.generate(
    model="openai/gpt-image-2",
    prompt="A beautiful sunset over mountains",
    size="1024x1024",
)

print(response.data[0].url)

Frequently asked questions

HaoAI bills based on actual request usage. Input, output, cache, and any other applicable rates follow the live pricing table on this page. Final request costs are available in the console.