Start With the Token Type and Group
For GPT Image 2, the route is determined by the billing type and group selected when the token is created, not only by themodel field in the request body. The same gpt-image-2 model name maps to different routes in the default group, the Sora2Official group, and the GPTImage2 Enterprise group.
Per-call token: Default group
Default-group tokens use per-call billing.
gpt-image-2 and gpt-image-2-vip are both $0.03/call; use gpt-image-2-vip when you need size and quality controls.Usage-billed token: Sora2Official
Sora2Official tokens use usage-based billing. The request body still uses model="gpt-image-2", and billing follows official input / output tokens.Usage-billed token: GPTImage2 Enterprise
GPTImage2 Enterprise tokens use usage-based billing with pure official-key routing, billed at official input / output token pricing +20%.July 9, 2026 update: default-group
gpt-image-2-vip has restored size and quality support. In the latest verification, 1024x1024, 2048x2048, and 3840x2160 returned the requested dimensions, and quality supports low, medium, and high.Online Test
You can test the output first at yingtu.ai, then move the prompt into your API integration.
Route Matrix
Which Route Should You Use?
Base Configuration
All routes use the same OpenAI-compatible gateway URL:Do not set the base URL to a model-specific path, and do not expect the request body’s
model field to change the billing type. The actual route is determined by the token group selected at token creation plus the model field.Parameter Support
Default-group gpt-image-2
Default-groupgpt-image-2 is the legacy ChatGPT web route. Use it when you want the simplest integration and do not need size control.
size: not supportedquality: not supported- Price: $0.03/call
Default-group gpt-image-2-vip
Default-groupgpt-image-2-vip has restored size and quality parameters. Use it when you want per-call billing and need 1K / 2K / 4K image-size control.
- Supports
size, including common values such as1024x1024,2048x2048, and3840x2160 - Supports
quality, includinglow,medium, andhigh - Returns
data[0].b64_jsonby default - Use an official-forward group when you need pure official-key routing and stricter official parameter compatibility
- Price: $0.03/call
Sora2Official-group gpt-image-2
Sora2Official gpt-image-2 is the mixed AZ + official-key official API forwarding route. Billing uses official input / output tokens with the same pricing as the official OpenAI GPT Image 2 API.
GPTImage2 Enterprise-group gpt-image-2
GPTImage2 Enterprise gpt-image-2 is the pure official-key API route, suitable for production calls that need higher route stability and official API compatibility. Billing is official input / output token pricing +20% to cover tax and operating cost, not profit markup.
Shared Parameters for Official-Compatible Groups
Setup:- Create a new usage-billed token in the console.
- Select
Sora2Officialfor the mixed official route, orGPTImage2 Enterprisewhen you want the pure official-key route. - Keep
model="gpt-image-2"in the request body. - Keep the official request body and replace only the base URL and API key.
size, quality, and other parameters supported by the official API.
Common size values:
1024x10241536x10241024x15362048x20482048x11523840x21602160x3840auto
quality values:
lowmediumhighauto
Endpoint Support
This page documents only the Images API integration path: use/v1/images/generations for text-to-image and /v1/images/edits for image-to-image. In SDKs, these correspond to images.generate and images.edit.
The
Sora2Official and GPTImage2 Enterprise official-compatible routes must use official-style Images API endpoints:
For the default-group route,
gpt-image-2-vip, and the Sora2Official / GPTImage2 Enterprise official-compatible routes, this guide keeps only Images generation and Images edits as the documented integration methods.Text-to-Image Examples
Default-group gpt-image-2 (per-call token)
Do not passsize or quality.
Default-group gpt-image-2-vip (per-call token)
gpt-image-2-vip has restored size and quality support. When you need per-call billing and explicit image dimensions, pass these fields directly in the request body.
Sora2Official / GPTImage2 Enterprise-group gpt-image-2 (usage-billed token)
Use the official-style Images generation endpoint. You can passsize and quality.
Image-to-Image Examples
Default-group Images Edits
Default-group gpt-image-2-vip Images Edits
Sora2Official / GPTImage2 Enterprise-group Images Edits
Official-compatible image editing must use/v1/images/edits, with official-style parameters.
Parse Responses
Save Images API b64_json
Read an Images API URL
FAQ
Why does gpt-image-2 mean different things on this page?
Why does gpt-image-2 mean different things on this page?
The token group decides the route. Default-group
gpt-image-2 is the per-call standard route. Sora2Official gpt-image-2 is the usage-billed mixed AZ + official-key API route. GPTImage2 Enterprise gpt-image-2 is the usage-billed pure official-key API route.How do I tell per-call tokens from usage-billed tokens?
How do I tell per-call tokens from usage-billed tokens?
Check the group selected when the token was created in the console. The default group is a per-call token route:
gpt-image-2 / gpt-image-2-vip are billed at $0.03/call. Sora2Official and GPTImage2 Enterprise are usage-billed token groups: the request body still uses model="gpt-image-2", but billing follows official input / output tokens.Can default-group gpt-image-2 accept size?
Can default-group gpt-image-2 accept size?
Default-group
gpt-image-2 is not the recommended size-control route. Use gpt-image-2-vip when you want default-group per-call billing with size control, or use gpt-image-2 under Sora2Official / GPTImage2 Enterprise when you need official-key routing.Can gpt-image-2-vip accept quality?
Can gpt-image-2-vip accept quality?
Yes.
gpt-image-2-vip currently supports low, medium, and high quality tiers. Higher quality usually increases wait time and output token usage.Can gpt-image-2-vip still use 4K sizes?
Can gpt-image-2-vip still use 4K sizes?
Yes. The current route can use 4K landscape sizes such as
3840x2160; for portrait 4K, test 2160x3840 against your production prompt.Which endpoints does this page support?
Which endpoints does this page support?
This page keeps only the Images API integration path: use
/v1/images/generations for generation and /v1/images/edits for edits.How do I migrate official OpenAI code?
How do I migrate official OpenAI code?
First create a usage-billed token under the
Sora2Official or GPTImage2 Enterprise group. Keep the official request body and model="gpt-image-2", replace the base URL with https://api.laozhang.ai/v1, and replace the API key with your LaoZhang API token. Choose GPTImage2 Enterprise when you need the pure official-key route.Why does b64_json decoding fail?
Why does b64_json decoding fail?
The value may include a
data:image/png;base64, prefix, or it may need padding at the end. Remove the prefix first, then pad with = before decoding.