gpt-image-2-2026-04-21 API · AIAdapter
gpt-image-2-2026-04-21 is available through AIAdapter’s OpenAI-compatible unified API. Vendor segment: openai. Call with your AIAdapter API key against https://www.aiadapter.com/v1.
Giá
Billed: $5.00 / 1M input tokens. Official: —. Each call adds 15% on the discounted cost (not stacked again on this rate).
Specs
| Model ID | gpt-image-2-2026-04-21 |
|---|---|
| Vendor | openai |
| Compatibility | OpenAI-compatible API |
Truy cập API
Gọi mô hình này qua API thống nhất của AIAdapter. /docs#image
curl
curl https://www.aiadapter.com/v1/images/generations -H "Authorization: Bearer $AIADAPTER_API_KEY" -H "Content-Type: application/json" -d '{"model":"gpt-image-2-2026-04-21","prompt":"A red cube","n":1,"size":"1024x1024"}'Python
from openai import OpenAI client = OpenAI(base_url="https://www.aiadapter.com/v1", api_key="...") client.images.generate(model="gpt-image-2-2026-04-21", prompt="A red cube", n=1, size="1024x1024")
Node.js
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://www.aiadapter.com/v1", apiKey: process.env.AIADAPTER_API_KEY });
await client.images.generate({ model: "gpt-image-2-2026-04-21", prompt: "A red cube", n: 1, size: "1024x1024" });FAQ
What is the model ID?
gpt-image-2-2026-04-21
How do I get an API key?
Create an account, open Console → Keys, then use Authorization: Bearer.
Where is pricing?
See Pricing and the rate above. Each call adds a 15% service fee on its discounted cost.
OpenAI compatible?
Yes. Point the OpenAI SDK at https://www.aiadapter.com/v1.