Skip to main content

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 the model 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%.
Check the token type first, then the model name. The default group is a per-call token; Sora2Official and GPTImage2 Enterprise are usage-billed tokens. Setting model="gpt-image-2" in the request body does not turn a per-call token into a usage-billed token.
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.
Do not put Sora2Official or GPTImage2 Enterprise in the request body’s model field. They are token groups selected when the token is created; the request body still uses model="gpt-image-2".

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-group gpt-image-2 is the legacy ChatGPT web route. Use it when you want the simplest integration and do not need size control.
  • size: not supported
  • quality: not supported
  • Price: $0.03/call

Default-group gpt-image-2-vip

Default-group gpt-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 as 1024x1024, 2048x2048, and 3840x2160
  • Supports quality, including low, medium, and high
  • Returns data[0].b64_json by default
  • Use an official-forward group when you need pure official-key routing and stricter official parameter compatibility
  • Price: $0.03/call
quality has a visible effect on generation time and output token usage. Use low / medium for cheaper previews or batch tests, then use high for final assets.

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:
  1. Create a new usage-billed token in the console.
  2. Select Sora2Official for the mixed official route, or GPTImage2 Enterprise when you want the pure official-key route.
  3. Keep model="gpt-image-2" in the request body.
  4. Keep the official request body and replace only the base URL and API key.
This route supports official parameters, including size, quality, and other parameters supported by the official API. Common size values:
  • 1024x1024
  • 1536x1024
  • 1024x1536
  • 2048x2048
  • 2048x1152
  • 3840x2160
  • 2160x3840
  • auto
Available quality values:
  • low
  • medium
  • high
  • auto

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 pass size 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 pass size 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

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.
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.
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.
Yes. gpt-image-2-vip currently supports low, medium, and high quality tiers. Higher quality usually increases wait time and output token usage.
Yes. The current route can use 4K landscape sizes such as 3840x2160; for portrait 4K, test 2160x3840 against your production prompt.
This page keeps only the Images API integration path: use /v1/images/generations for generation and /v1/images/edits for edits.
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.
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.