Documentation Index
Fetch the complete documentation index at: https://docs.apiyi.com/llms.txt
Use this file to discover all available pages before exploring further.
Overview
gpt-image-2-vip is the GPT image generation reverse-engineered model on the Codex line, available on the API易 platform. Same flat $0.03/image asgpt-image-2-all and identical request/response format — the only meaningful difference is that vip accepts a size field with 30 common sizes (10 aspect ratios × 3 resolution tiers: 1K Fast / 2K Recommended / 4K Detail), including 4K.
gpt-image-2-vip when you need to lock the output size (e-commerce hero shots, poster templates, video thumbnails, 4K wallpapers, etc.). Just swap the model field to gpt-image-2-vip and add a size field — every other line of code stays identical to gpt-image-2-all.Chat API
Text-to-Image API
/v1/images/generations — text prompt + size for explicit output dimensions.Image Editing API
/v1/images/edits — multipart upload with edit/fusion instructions.Key differences vs gpt-image-2-all
gpt-image-2-vip and gpt-image-2-all are both reverse-engineered channels, same price, same call code. They mirror each other — swap the model field on the same request and behavior is largely identical. The differences:
| Dimension | gpt-image-2-all | gpt-image-2-vip |
|---|---|---|
| Channel | Reverse-engineered ChatGPT web | Reverse-engineered Codex line |
| Price | $0.03 / image | $0.03 / image (flat across all sizes) |
size parameter | ❌ Not accepted (describe in prompt) | ✅ 30 sizes incl. 4K |
4K (e.g. 3840x2160) | ❌ | ✅ 4K Detail tier |
| Generation time | ~30 seconds | ~90–150 seconds (on par with the official gpt-image-2) |
quality parameter | ❌ Not accepted | ❌ Not accepted (do not pass) |
| Endpoints | /chat/completions + /images/generations + /images/edits | Same as left (identical) |
| Response format | url / b64_json (already prefixed) | Same as left |
| Best for | Prompt-driven, size-insensitive | Need locked output size (incl. 4K) |
Core Features
Locked output size
size field accepts 30 common sizes — e-commerce hero shots, poster templates, 4K wallpapers all output at exact pixels.4K High Resolution
Flat pricing across all sizes
Same call format as -all
gpt-image-2-all — switch models with just the model string.High Text Rendering
Chinese Prompt Friendly
Natural-Language Editing
Triple Endpoint Support
/images/generations, /images/edits, and /chat/completionsPricing
| Model | Billing | Price | Output |
|---|---|---|---|
gpt-image-2-vip | Per-call | $0.03 / image | 1 image per call, size field locks output dimension |
- Flat $0.03/image across all 30 sizes — no surcharge for 4K Detail
- Failed requests are not charged (auth failures, parameter validation errors)
- For N images, call the API N times in parallel
Group Setup
gpt-image-2-vip lives on the Default group — no extra group needed. The reverse channel currently has stable supply, so there’s no enterprise-group fallback story like the official-relay gpt-image-2 has.
| Model | Group | Notes |
|---|---|---|
gpt-image-2-vip | Default | Codex reverse line, flat $0.03/img, ~90–150s |
image2Enterprise group: /en/live/2026-04/image2-enterprise-stable
Technical Specs
| Attribute | Value |
|---|---|
| Model name | gpt-image-2-vip |
| Channel type | Official reverse-engineered (Codex line) |
| Pricing | $0.03 / image, per-call (flat across all sizes) |
| Generation time | ~90–150 seconds (on par with the official gpt-image-2; slower than gpt-image-2-all’s ~30s) |
size parameter | ✅ 30 sizes: 10 ratios × 3 resolution tiers (1K Fast / 2K Recommended / 4K Detail) |
| 4K support | ✅ 4K Detail tier (e.g., 3840x2160 / 2880x2880) |
quality parameter | ❌ Not supported, do not pass |
n parameter | ❌ Not supported, single image per call |
| Default response format | url (R2 CDN accelerated link, ~1-day validity) |
| Alternative format | b64_json (already prefixed with data:image/png;base64,) |
| Chinese prompts | ✅ Natively supported |
| Capabilities | Text-to-image, single-image editing, multi-image fusion, natural-language editing (all three endpoints) |
Endpoints
gpt-image-2-vip is compatible with the exact same three endpoints as gpt-image-2-all. Just swap the model field and add a size if needed:
| Endpoint | Purpose | Content-Type | Best for |
|---|---|---|---|
POST /v1/chat/completions | Chat-based (text-to-image / editing / multi-turn / reference images) | application/json | Pass online image URLs directly; one endpoint for both generation and editing |
POST /v1/images/generations | Text-to-image | application/json | OpenAI Images API standard format — same code can hit both official and reverse channels |
POST /v1/images/edits | Image editing (single/multi) | multipart/form-data | OpenAI Images API standard format — same code can hit both official and reverse channels |
Supported sizes (full 30-size table)
gpt-image-2-vip supports 10 aspect ratios × 3 resolution tiers = 30 sizes. Pass size: "WIDTHxHEIGHT" (lowercase ASCII x) directly in the request body.
1K Fast — drafts and low-cost iterations
| Ratio | Name | Pixels |
|---|---|---|
| 1:1 | Square | 1280x1280 |
| 2:3 | Portrait | 848x1280 |
| 3:2 | Photo | 1280x848 |
| 3:4 | Portrait | 960x1280 |
| 4:3 | Standard | 1280x960 |
| 4:5 | Social | 1024x1280 |
| 5:4 | Large | 1280x1024 |
| 9:16 | Story | 720x1280 |
| 16:9 | Wide | 1280x720 |
| 21:9 | Cinema | 1280x544 |
2K Recommended — default tier (most production outputs)
| Ratio | Name | Pixels |
|---|---|---|
| 1:1 | Square | 2048x2048 |
| 2:3 | Portrait | 1360x2048 |
| 3:2 | Photo | 2048x1360 |
| 3:4 | Portrait | 1536x2048 |
| 4:3 | Standard | 2048x1536 |
| 4:5 | Social | 1632x2048 |
| 5:4 | Large | 2048x1632 |
| 9:16 | Story | 1152x2048 |
| 16:9 | Wide | 2048x1152 |
| 21:9 | Cinema | 2048x864 |
4K Detail — large deliverables
| Ratio | Name | Pixels |
|---|---|---|
| 1:1 | Square | 2880x2880 |
| 2:3 | Portrait | 2336x3520 |
| 3:2 | Photo | 3520x2336 |
| 3:4 | Portrait | 2480x3312 |
| 4:3 | Standard | 3312x2480 |
| 4:5 | Social | 2560x3216 |
| 5:4 | Large | 3216x2560 |
| 9:16 | Story | 2160x3840 |
| 16:9 | Wide | 3840x2160 |
| 21:9 | Cinema | 3840x1632 |
size, do not pass quality):
Best Practices
Pick the size tier by deliverable
Do not pass quality or n
quality is rejected; n returns 1 image per call regardless — for multiple images, call in parallel.Use a 300s timeout
Choose response format by need
b64_json for direct web rendering; url for server-side storage/forwarding.Error Codes and Retries
| Status | Meaning | Suggestion |
|---|---|---|
400 | size not in the 30-size set, or malformed | Use the exact strings from the table above |
401 | Invalid token | Check Bearer Token |
429 | Rate limit / quota exhausted | Exponential backoff retry |
5xx | Transient gateway/backend error | Retry 1–2 times |
| Timeout | Codex peak + 4K long tail | Set client timeout ≥ 300s (conservative) |
- Request timeout starting at 300 seconds (conservative; typical 90–150s, but 4K Detail + peak tails go higher)
- Use exponential backoff for 5xx and timeouts (2–3 retries recommended)
- Log the
request-idresponse header for debugging
FAQ
Can I share code between vip and -all?
Can I share code between vip and -all?
Why is vip so much slower?
Why is vip so much slower?
gpt-image-2-vip uses the Codex reverse channel — typical 90–150 seconds, on par with the official gpt-image-2 (100–120s) and slower than ChatGPT-web-line gpt-image-2-all (~30s). For latency-sensitive workloads, prefer gpt-image-2-all; switch to vip only when you need locked size or 4K.Does size have to be exactly from the table? What if I send 1024x768?
Does size have to be exactly from the table? What if I send 1024x768?
invalid_request_error. Pick the closest tier for your deliverable.Is 4K really not surcharged?
Is 4K really not surcharged?
3840x2160 / 2880x2880 etc.) costs the same $0.03/image as 1K and 2K.Does it support n? What happens if I pass n=3?
Does it support n? What happens if I pass n=3?
n=3 in the request, billing will be 0.03 × 3 = $0.09, but only 1 image is actually returned. Drop the n field to avoid wasted charges.Do I need to add data:image/png;base64, prefix to b64_json?
Do I need to add data:image/png;base64, prefix to b64_json?
b64_json field already includes the prefix. You can use it directly as <img src> or write it to a file. If your code follows the old “prepend prefix” pattern, you’ll produce a broken data URL — add a startsWith('data:') check first.What's the max reference image size and supported formats?
What's the max reference image size and supported formats?
png / jpg / webp. Overly large images may hit gateway limits. Each image in multi-image fusion must meet this limit.How long are the returned image URLs valid? Do I need to download them?
How long are the returned image URLs valid? Do I need to download them?
url field is an R2 CDN link that expires in about 1 day (24 hours) — requests after that will 404.Strongly recommended: download and persist generated images to your own object storage (S3 / OSS / R2), CDN, or database shortly after generation.Does it support streaming?
Does it support streaming?
Can I use the official OpenAI SDK?
Can I use the official OpenAI SDK?
base_url to https://api.apiyi.com/v1 and set api_key to your API易 token. client.images.generate(model="gpt-image-2-vip", size="2048x1360", prompt=...) works directly.When should I switch to the official gpt-image-2?
When should I switch to the official gpt-image-2?
quality knob (low/medium/high), mask-based local repaint, or strict OpenAI-API field parity — use gpt-image-2. See the Official vs Reverse comparison.Related Documentation
- GPT-Image-2-All Overview - Sister model at the same price with faster output, ideal when you don’t need to lock size
- ⚖️ Official vs Reverse Comparison - Side-by-side selection guide vs the official
gpt-image-2(covers-all/-vip) - Chat Playground - Chat Completions style, one endpoint for text-to-image and editing
- Text-to-Image Playground -
/v1/images/generationscompatible endpoint, passsizeto lock dimensions - Image Editing Playground -
/v1/images/editsmulti-image fusion and editing - GPT-Image-2 Official - For
qualityparameter / mask-based repaint / strict OpenAI-API field parity - GPT-Image Series Overview - Official GPT-Image comparison
- API Manual - General calling conventions
gpt-image-2.