curl --request POST \
--url https://api.evolink.ai/v1/images/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "gpt-image-2.6-sunburst",
"prompt": "A beautiful colorful sunset over the ocean"
}
'{
"created": 1757156493,
"id": "task-unified-1757156493-imcg5zqt",
"model": "gpt-image-2.6-sunburst",
"object": "image.generation.task",
"progress": 1,
"status": "processing",
"task_info": {
"can_cancel": true,
"estimated_time": 100
},
"type": "image",
"usage": {
"billing_rule": "per_1k_tokens",
"credits_reserved": 2.5,
"user_group": "default"
}
}{
"error": {
"code": "invalid_request",
"message": "Invalid request parameters",
"type": "invalid_request_error"
}
}{
"error": {
"code": "unauthorized",
"message": "Invalid or expired token",
"type": "authentication_error"
}
}{
"error": {
"code": "insufficient_quota",
"message": "Insufficient quota. Please top up your account.",
"type": "insufficient_quota"
}
}{
"error": {
"code": "model_access_denied",
"message": "Token does not have access to model: gpt-image-2.6-sunburst",
"type": "invalid_request_error"
}
}{
"error": {
"code": "rate_limit_exceeded",
"message": "Too many requests, please try again later",
"type": "rate_limit_error"
}
}{
"error": {
"code": "internal_error",
"message": "Internal server error",
"type": "api_error"
}
}GPT Image 2.6 Image Generation
- GPT Image 2.6 (gpt-image-2.6-sunburst / gpt-image-2.6-flare) supports text-to-image, image-to-image, image editing and markup-guided editing, with animated GIF and SVG vector output
- Asynchronous processing: use the returned task ID to query the task
- Generated image links are valid for 24 hours. Save the results promptly
curl --request POST \
--url https://api.evolink.ai/v1/images/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "gpt-image-2.6-sunburst",
"prompt": "A beautiful colorful sunset over the ocean"
}
'{
"created": 1757156493,
"id": "task-unified-1757156493-imcg5zqt",
"model": "gpt-image-2.6-sunburst",
"object": "image.generation.task",
"progress": 1,
"status": "processing",
"task_info": {
"can_cancel": true,
"estimated_time": 100
},
"type": "image",
"usage": {
"billing_rule": "per_1k_tokens",
"credits_reserved": 2.5,
"user_group": "default"
}
}{
"error": {
"code": "invalid_request",
"message": "Invalid request parameters",
"type": "invalid_request_error"
}
}{
"error": {
"code": "unauthorized",
"message": "Invalid or expired token",
"type": "authentication_error"
}
}{
"error": {
"code": "insufficient_quota",
"message": "Insufficient quota. Please top up your account.",
"type": "insufficient_quota"
}
}{
"error": {
"code": "model_access_denied",
"message": "Token does not have access to model: gpt-image-2.6-sunburst",
"type": "invalid_request_error"
}
}{
"error": {
"code": "rate_limit_exceeded",
"message": "Too many requests, please try again later",
"type": "rate_limit_error"
}
}{
"error": {
"code": "internal_error",
"message": "Internal server error",
"type": "api_error"
}
}Authorizations
All APIs require Bearer Token authentication.
Get API Key:
Visit API Key Management Page to get your API Key
Add to request header:
Authorization: Bearer YOUR_API_KEY
Body
Image generation model name, with improved stability and control for commercial use
| Model ID | Best suited for |
|---|---|
gpt-image-2.6-sunburst | Greater detail for precise visual work |
gpt-image-2.6-flare | Faster generation for quick iteration |
Both models accept exactly the same parameters. Actual token consumption at the same quality tier may differ slightly; use the returned usage as the source of truth.
gpt-image-2.6-sunburst, gpt-image-2.6-flare "gpt-image-2.6-sunburst"
Prompt describing the image to generate or how to edit the input image
Length limits (both must be met):
- Up to
32,000characters (counted as Unicode code points) - The
prompttext itself must not exceed60,000bytes when encoded in UTF-8
Different characters use different numbers of UTF-8 bytes. Use the actual encoded byte count.
If either limit is exceeded, shorten the prompt before resubmitting.
Recommendation: If the prompt exceeds 8000 tokens, the generated image may not match expectations; shortening the prompt is recommended.
32000"A beautiful colorful sunset over the ocean"
Reference images as public URLs, for image-to-image and image editing
Note:
- Number of input images per request:
1~16 - Size of a single image: not exceeding
50MB - Pixels of a single image: width × height not exceeding
178,956,970px - Side length of a single image: width / height each not exceeding
23170px; exceeding this may cause errors - Supported file formats:
.jpeg,.jpg,.png,.webp - Image URLs must be directly accessible by the server, or the image URL should directly download when accessed (typically these URLs end with image file extensions, such as
.png,.jpg) - In image-to-image / image editing scenarios, the reference images themselves also incur additional image input token consumption
- With
markup_url, markup applies to the first image and the others serve as references; the first image must have width × height ≤16,777,216px - Reference images are not supported when
output_formatissvg
[
"https://example.com/image1.png",
"https://example.com/image2.png"
]
Inpainting mask URL — marks the region of the reference image to regenerate. Only valid in image edit mode (must be combined with image_urls); the mask is silently ignored in pure text-to-image requests.
Format requirements:
- Must be a PNG with an alpha channel: transparent pixels (
alpha < 255) = regions to regenerate; opaque pixels = preserved - Mask dimensions must exactly match the reference image dimensions (width × height in pixels)
- Single mask per request
Note:
- At least one reference image is required in
image_urls; a mask sent alone has no effect - Cannot be combined with
markup_url - Common errors:
Invalid mask image format - mask image missing alpha channel: the uploaded image has no alpha channel (JPEG, opaque PNG, etc.). Re-export the mask as a PNG with transparent regions.Invalid mask image format - mask size does not match image size: the mask dimensions don't match the reference image. Resize the mask to the same pixel dimensions as your reference image.
"https://example.com/mask.png"
Public URL of a markup layer. Use circles, arrows or freehand marks to indicate what to change in the reference image, and describe the changes in prompt. Only valid in image editing mode (requires image_urls).
Format requirements:
- Must be a PNG with transparent pixels: draw only the annotations and leave the rest transparent. Do not draw directly on the original image
- Dimensions must exactly match the first reference image (width × height in pixels)
- The first reference image and the markup layer must each have width × height ≤
16,777,216px - File size: no more than
50MB
Note:
- Markup applies to the first image in
image_urls; the remaining images serve as references - Cannot be combined with
mask_url - Supports standard image and GIF editing, but not SVG
- Can also be supplied as
model_params.markup_url; the top-level value takes precedence when both are present - In
prompt, also specify what to preserve, for example, "keep everything else unchanged and remove the red circle"
"https://example.com/markup.png"
Generated image dimensions. Defaults to auto. Standard images and SVG reference images share the following rules; GIF uses the separate rules in section ④.
① Standard images / SVG reference images: ratio format (15 options)
1:1: Square1:2/2:1: Extreme portrait / landscape1:3/3:1: Ultra portrait / landscape (3:1 limit)2:3/3:2: Standard portrait / landscape3:4/4:3: Classic portrait / landscape4:5/5:4: Common social media9:16/16:9: Mobile / desktop widescreen9:21/21:9: Ultra-wide
② Standard images / SVG reference images: explicit pixel format: WxH (or W×H), e.g. 1024x1024, 1536x1024, 3840×2160
- Both width and height must be multiples of
16 - Each edge range:
[16, 3840] - Pixel budget:
655,360 ≤ width × height ≤ 8,294,400(about 0.65 MP ~ 8.29 MP) - Aspect ratio:
≤ 3:1
③ Standard images / SVG reference images: auto: The model decides the size automatically (resolution does not apply in this mode)
④ GIF output: size specifies the dimensions of each frame. Only auto and explicit pixel dimensions are supported, not ratios.
- With
auto, each frame is512×512 - Explicit frame width and height must be positive multiples of
16 - The
655,360minimum pixel count for standard images does not apply to individual GIF frames; for example,512x512is valid - The image combining all frames must satisfy the edge, total pixel and aspect ratio limits; see
model_params.frame_countfor grid layouts and per-frame limits resolutiondoes not apply
Out-of-range handling:
- For standard images / SVG reference images, a ratio +
resolutioncombination that exceeds the budget is automatically scaled down proportionally (e.g. 4K 2:1 → 3840×1920) - Explicit GIF frame dimensions that exceed the limits return HTTP 400 and are not automatically scaled down
"auto"
Resolution tier shortcut, only effective when size is a ratio; ignored in explicit pixel mode and for GIF output
Pixel budget rules (dimensions are derived from the target pixel count and the size ratio, aligned to multiples of 16):
1K: ~1 MP (1024² = 1,048,576 pixels)2K: ~4 MP (2048² = 4,194,304 pixels)4K: ~8.29 MP (3840×2160 = 8,294,400 pixels, the maximum)
Landscape / square output dimensions (portrait dimensions are the landscape width/height swapped, e.g. 2:3 = 3:2 reversed):
| Ratio | 1K | 2K | 4K |
|---|---|---|---|
1:1 | 1024×1024 | 2048×2048 | 2880×2880 |
2:1 | 1456×720 | 2896×1456 | 3840×1920 * |
3:1 | 1776×592 | 3552×1184 | 3840×1280 * |
3:2 | 1248×832 | 2512×1680 | 3520×2352 |
4:3 | 1184×880 | 2368×1776 | 3312×2480 * |
5:4 | 1152×912 | 2288×1824 | 3216×2576 |
16:9 | 1360×768 | 2736×1536 | 3840×2160 (UHD) |
21:9 | 1568×672 | 3136×1344 | 3840×1648 * |
* Marks combinations that are auto-downscaled to fit the pixel budget. Values are case-insensitive.
1K, 2K, 4K "1K"
Rendering quality, which directly affects output token count and cost. Defaults to medium
| Value | Output tokens (1024²) | Relative image output cost (1024²) |
|---|---|---|
low | 824 | ~0.57× |
medium | 1,449 | 1.0× |
high | 1,756 | ~1.21× |
xhigh | 3,122 | ~2.15× |
max | 7,024 | ~4.85× |
Note:
- This table compares image output costs only, excluding input costs and SVG author model costs
- Calculated for
1024×1024; output tokens vary with total pixels and aspect ratio. Use the returnedusagefor actual consumption - For GIF output, tokens are calculated for the combined image containing all frames; for SVG output, quality applies to the reference image
- Use
lowfor quick drafts. For final assets, compare tiers to balance detail, latency and cost
low, medium, high, xhigh, max "medium"
Planning depth before image generation, independent of quality. Defaults to high
low: Suitable for local changes such as replacing a background or changing sign textmedium: Balancedhigh: Suitable for text-heavy images, complex layouts or complex relationships between objects
Note:
- Higher levels take longer and may introduce unwanted changes; compare results for your task
- Changing
complexitydoes not incur an additional charge - For SVG output, this applies to the reference image
- Can also be supplied as
model_params.complexity; the top-level value takes precedence when both are present
low, medium, high "high"
Alpha channel of the output image. Defaults to opaque
opaque: Flat background, no alpha channeltransparent: Keeps the alpha channel
Note:
transparentis a Preview feature and results may be unstable- When using
transparent,output_formatmust bepngorwebp - When
output_formatisgiforsvg, onlyopaqueis supported
opaque, transparent "opaque"
Output file format. Defaults to png
png: Lossless, supports transparent backgroundsjpeg: Lossy compression with smaller fileswebp: Balances file size and quality; also supports transparencygif: Animated GIF; seemodel_paramsfor frame count and frame durationsvg: SVG vector image, suitable for logos, icons and other graphics that need lossless scaling
Note:
- When
backgroundistransparent, onlypngorwebpis allowed gifsupports both text-to-image and image editing- For
gifandsvg,nmust be1 svgsupports text-to-image only- SVG output is created by first generating a reference image, then using an author model (
model_params.svg_model) to convert it to vector graphics. Author model tokens are billed separately at that model's rates
png, jpeg, webp, gif, svg "png"
Number of images to generate, each billed independently
Note:
- Text input tokens scale linearly with
n - Support for
n > 1is currently unreliable: even with a value greater than 1, only one image is often returned. The actual count is whateverresultsholds in the response, and billing follows the returnedusage. If you need several images, send multiple single-image requests instead - When
output_formatisgiforsvg, this must be1
1 <= x <= 101
Model-specific parameters. GIF frame parameters and SVG author parameters must be supplied in this object.
frame_countandframe_duration_msare only allowed withoutput_format=gifsvg_modelandsvg_reasoning_effortare only allowed withoutput_format=svg- Parameters incompatible with the output format return HTTP 400; they are not silently ignored
Show child attributes
Show child attributes
HTTPS callback address after task completion
Callback Timing:
- Triggered when task is completed, failed, or cancelled
- Sent after billing confirmation is completed
Security Restrictions:
- Only HTTPS protocol is supported
- Callback to internal IP addresses is prohibited (127.0.0.1, 10.x.x.x, 172.16-31.x.x, 192.168.x.x, etc.)
- URL length must not exceed
2048characters
Callback Mechanism:
- Timeout:
10seconds - Maximum
3retries on failure (retries after1second/2seconds/4seconds) - Callback response body format is consistent with the task query API response format
- Callback address returning 2xx status code is considered successful, other status codes will trigger retry
"https://your-domain.com/webhooks/image-task-completed"
Response
Image generation task created successfully
Task creation timestamp
1757156493
Task ID
"task-unified-1757156493-imcg5zqt"
Actual model name used
"gpt-image-2.6-sunburst"
Specific task type
image.generation.task Task progress percentage (0-100)
0 <= x <= 1001
Task status. Queued and running tasks both return processing; the final status is completed or failed.
processing, completed, failed "processing"
Asynchronous task information
Show child attributes
Show child attributes
Task output type
text, image, audio, video "image"
Usage and billing information
Show child attributes
Show child attributes