GPT-Image(1/1.5)
GPT-Image(1/1.5) Image Generation
- Asynchronous processing mode, returns task ID for subsequent queries
- Supports text-to-image, image-to-image, and inpainting generation modes
- Supports transparent backgrounds, multiple output formats, and quality tiers
- Generate up to 4 images per request, with up to 15 reference images
POST
Documentation Index
Fetch the complete documentation index at: https://gccai.heqingsong.uk/llms.txt
Use this file to discover all available pages before exploring further.
Supported Models
| Model | Description | Modes | Image-to-Image | Max Images | Billing |
|---|---|---|---|---|---|
gpt-image-1-official | Stability-first, suitable for general image generation | Text-to-Image / Image-to-Image | Supported | 4 | Size x Quality |
gpt-image-1.5-official | New version, suitable for higher quality and complex editing | Text-to-Image / Image-to-Image | Supported | 4 | Size x Quality |
Authorizations
All API requests require Bearer Token authenticationGet your API Key:Visit the API Key management page to obtain your API KeyAdd the following to your request headers:
Body
Model name
gpt-image-1-official- Stability-first, suitable for general image generationgpt-image-1.5-official- New version, suitable for higher quality and complex editing
Text description for image generation, supports both Chinese and English
Aspect ratioSupported ratios:
1:1- Square (default)3:2- Landscape2:3- Portrait
Number of images to generateRange: 1-4
- Values ≤ 0 will be treated as
1 - Values > 4 will be treated as
4
1), do not add quotes, otherwise it will cause an errorImage quality
auto- Auto quality selection (default)low- Faster, more economicalmedium- Balance between quality and costhigh- Higher quality, higher cost
Background mode
auto- Auto background (default)opaque- Opaque backgroundtransparent- Transparent background, recommended withpngoutput format
Moderation level
auto- Default moderation levellow- More lenient moderation
Output format
png- Default format, suitable for transparent backgroundsjpeg- Smaller file size, suitable for general image output
Output compression level, range 0-100
- Recommended only for
jpeg - Not recommended for
png
Array of reference image URLs, enables image-to-image mode when providedLimit: Up to 15 reference images
Mask image URL for inpainting
- Must be used together with
image_urls - Will be submitted via the official editing API
Size Reference
Aspect ratios are used externally; the system automatically maps them to official dimensions internally.| Ratio | Actual Size | Description |
|---|---|---|
1:1 | 1024x1024 | Square |
2:3 | 1024x1536 | Portrait |
3:2 | 1536x1024 | Landscape |
Usage Examples
Text-to-Image (minimal)Response
Response status code
Response data array
Notes
- Asynchronous processing: After submission, a
task_idis returned. Poll/v1/tasks/{task_id}to get results - Model selection: Use
gpt-image-1-officialfor general image generation; usegpt-image-1.5-officialfor high-quality editing and complex image-to-image tasks - Image URL requirements: For image-to-image, use publicly accessible and stable image URLs
- Billing: Charged per successfully generated image; no charge for failures