Start With the Token Group
For GPT Image 2, the token group decides which route your request uses. The samegpt-image-2 model name maps to different routes in the default group, the Sora2Official group, and the GPTImage2 Enterprise group.
Default Group: Legacy Routes
Per-call billing.
gpt-image-2 is the default standard route, gpt-image-2-vip is the size-enhanced route, and both are $0.03/call.Sora2Official: Mixed Official Transit
Mixed AZ + official-key group. The model name is still
gpt-image-2, and the request shape matches the official Images API.GPTImage2 Enterprise: Pure Official Key
Pure official-key routing, billed at official pricing +20% to cover tax and operating cost, not profit markup.
Online Test
You can test the output first at yingtu.ai, then move the prompt into your API integration.
Route Matrix
| Token group | Model name | Route | Billing | size | quality | Available endpoints |
|---|---|---|---|---|---|---|
| Default group | gpt-image-2 | Default standard route | $0.03/call | Not supported | Not supported | Images generation, Images edits |
| Default group | gpt-image-2-vip | Size-enhanced route | $0.03/call | 30 explicit 1K/2K/4K sizes | Not supported | Images generation, Images edits |
Sora2Official | gpt-image-2 | Mixed AZ + official-key API | Same as official pricing | Supported | Supported | Images generation, Images edits |
GPTImage2 Enterprise | gpt-image-2 | Pure official-key API | Official pricing +20% | Supported | Supported | Images generation, Images edits |
Which Route Should You Use?
| Need | Use |
|---|---|
| Quick access without size control | Default-group gpt-image-2 |
| Default-group route with explicit 1K/2K/4K image size control | Default-group gpt-image-2-vip |
| Existing official OpenAI GPT Image 2 code with full parameter compatibility | Sora2Official or GPTImage2 Enterprise gpt-image-2 |
quality or more official parameters | Sora2Official or GPTImage2 Enterprise gpt-image-2 |
| Production workloads that prioritize stable pure official-key routing | GPTImage2 Enterprise gpt-image-2 |
Base Configuration
All routes use the same OpenAI-compatible gateway URL:Do not set the base URL to a model-specific path. The actual route is determined by the token group and 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 is the size-enhanced route. Use it when you need an explicit output size on the default group.
size: supported for 1K, 2K, and 4K outputs, with 30 explicit pixel valuesquality: not supported; do not includequalityin the request body- Price: $0.03/call
gpt-image-2-vip, pass an explicit pixel value in size; do not use auto. Common defaults are 2048x2048, 2048x1152, and 1152x2048; use the 4K tier for final large assets.
| Ratio | 1K size | 2K size | 4K size |
|---|---|---|---|
| 1:1 | 1280x1280 | 2048x2048 | 2880x2880 |
| 2:3 | 848x1280 | 1360x2048 | 2336x3520 |
| 3:2 | 1280x848 | 2048x1360 | 3520x2336 |
| 3:4 | 960x1280 | 1536x2048 | 2480x3312 |
| 4:3 | 1280x960 | 2048x1536 | 3312x2480 |
| 4:5 | 1024x1280 | 1632x2048 | 2560x3216 |
| 5:4 | 1280x1024 | 2048x1632 | 3216x2560 |
| 9:16 | 720x1280 | 1152x2048 | 2160x3840 |
| 16:9 | 1280x720 | 2048x1152 | 3840x2160 |
| 21:9 | 1280x544 | 2048x864 | 3840x1632 |
Sora2Official-group gpt-image-2
Sora2Official gpt-image-2 is the mixed AZ + official-key official API forwarding API route. Billing is usage-based 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 pricing +20% to cover tax and operating cost, not profit markup.
Shared Parameters for Official-Compatible Groups
Setup:- Create a new 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.
| Need | Endpoint | Notes |
|---|---|---|
| Text-to-image | /v1/images/generations | Returns data[0].b64_json by default, or data[0].url |
| Image-to-image | /v1/images/edits | Multipart local image upload |
Sora2Official and GPTImage2 Enterprise official-compatible routes must use official-style Images API endpoints:
| Need | Endpoint | Notes |
|---|---|---|
| Text-to-image | /v1/images/generations | Matches the official Images generation endpoint |
| Image-to-image | /v1/images/edits | Matches the official Images edit endpoint |
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
Do not passsize or quality.
Default-group gpt-image-2-vip
Passsize only. Do not pass quality. The example below requests a 4K landscape image.
Sora2Official / GPTImage2 Enterprise-group gpt-image-2
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 legacy ChatGPT web route. Sora2Official gpt-image-2 is the mixed AZ + official-key API route. GPTImage2 Enterprise gpt-image-2 is the pure official-key API route.Can default-group gpt-image-2 accept size?
Can default-group gpt-image-2 accept size?
No. Use
gpt-image-2-vip in the default group when you need size control.Can gpt-image-2-vip accept quality?
Can gpt-image-2-vip accept quality?
No.
gpt-image-2-vip supports size, but it does not support quality. Use gpt-image-2 in the Sora2Official or GPTImage2 Enterprise group when you need quality.Can gpt-image-2-vip use 4K sizes?
Can gpt-image-2-vip use 4K sizes?
Yes.
gpt-image-2-vip supports 4K-tier size values, including 3840x2160, 2160x3840, 2880x2880, and 3840x1632. It still does not support quality.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?
Create a token under the
Sora2Official or GPTImage2 Enterprise group, keep the official request body, 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.