GPT Image 2.6
GPT Image 2.6 Flare, an image generation model by OpenAI.
Usage-based: 15% off official token rates; up to 4 images per request and transparent backgrounds.
Overview
GPT Image 2.6 Flare, an image generation model by OpenAI.
- Model ID:
openai/gpt-image-2.6-flare - Maker: OpenAI
- Type:
image - Timeout: 600 s
- Typical time: ~13 s
- Endpoint:
POST https://api.kerox.ai/v1/tasks
Request example
Submit a task and get its id at once; get the result by polling (below) or by webhook. webhook_url and metadata are optional. To use a webhook, provide your own public HTTPS address in webhook_url. Every field is in Submit a task.
Set KEROX_API_KEY first. The polling example needs Bash, curl and jq. For Python, install requests with pip install requests.
curl --fail-with-body -X POST https://api.kerox.ai/v1/tasks \
-H "Authorization: Bearer $KEROX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "openai/gpt-image-2.6-flare",
"input": {
"prompt": "editorial portrait of a ceramicist in morning sunlight, 35mm film",
"resolution": "1K"
}
}'Edit a reference image
curl --fail-with-body -X POST https://api.kerox.ai/v1/tasks \
-H "Authorization: Bearer $KEROX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "openai/gpt-image-2.6-flare",
"input": {
"prompt": "Keep the lighthouse and change the sky to a clear sunrise",
"resolution": "1K",
"images": [
"https://cdn.kerox.ai/assets/samples/seedream-5.5/lighthouse-blue-hour.webp"
]
}
}'Parameters
The parameter names mean the same on every model.
| Parameter | Description | Values and example |
|---|---|---|
promptstring · Required | Text describing what to generate.Default · Unspecified | Values at least one non-whitespace character; 1–32000 characters Example "A lighthouse at dawn" |
imagesstring | string[] · Optional | Images for the model to draw on, in the order the prompt refers to them.Default · Unspecified | Values one public HTTPS URL; one string or an array of 1–16 items Example "https://example.com/photo.png" |
aspect_ratiostring · Optional | Width to height of the output.Default · "1:1" | Values 1:1, 3:2, 2:3, 4:3, 3:4, 16:9, 9:16, 21:9, auto Example "16:9" |
resolutionstring · Optional | Output resolution tier. The exact pixels follow from it and aspect_ratio.Default · "1K" | Values 1K, 2K, 4K Example "1K" |
ninteger · Optional | How many outputs one task may produce.Default · 1 | Values 1–4 Example 1 |
qualitystring · Optional | Rendering quality; auto lets the model choose.Default · "auto" | Values auto, low, medium, high, xhigh, max Example "auto" |
complexitystring · Optional | Planning before rendering. Higher effort suits dense text and complex layouts.Default · "high" | Values low, medium, high Example "high" |
output_formatstring · Optional | File format of the output.Default · "png" | Values png, webp, jpeg Example "png" |
backgroundstring · Optional | Background of the output image; transparent gives an image with an alpha channel.Default · "auto" | Values auto, opaque, transparent Example "auto" |
- When aspect_ratio = "auto": omit resolution
- When background = "transparent": output_format: png, webp
Use a public HTTPS URL directly for images, audio and video. For local media, upload with POST /v1/files and pass the returned url. For upload MIME and size limits, see Files & inputs.
Accepted and ignored: safety_identifier. A request may carry them; they are not passed to the model.
Not supported yet: mask, moderation, output_compression, size, response_format, stream.
Polling and output
Poll GET /v1/tasks/{id}, or pass webhook_url when you submit and receive the same task object when it finishes: see Webhooks for the setup. Output files expire at expires_at (7 days after completion), so download anything you want to keep. See every task field in Tasks & polling.
Set TASK_ID to the id returned on submission. The script waits up to 10 minutes, prints error on failure and downloads every outputs[].url on success.
(
set -eu
# Set TASK_ID to the id returned by the submit request.
: "${TASK_ID:?Set TASK_ID}"
deadline=$((SECONDS + 600))
while (( SECONDS < deadline )); do
task=$(curl --fail-with-body --silent --show-error --max-time "$((deadline - SECONDS))" https://api.kerox.ai/v1/tasks/"$TASK_ID" \
-H "Authorization: Bearer $KEROX_API_KEY")
case $(jq -er .status <<< "$task") in
succeeded)
if ! jq -e '.outputs | length > 0' <<< "$task" >/dev/null; then
echo "Result files are unavailable." >&2
exit 1
fi
i=0
while IFS= read -r url; do
file_path=${url%%\?*}
filename="output-${i}.${file_path##*.}"
curl --fail-with-body --silent --show-error --max-time 120 "$url" -o "$filename"
printf "%s\n" "$filename"
i=$((i + 1))
done < <(jq -r '.outputs[].url' <<< "$task")
exit 0 ;;
failed) jq -c .error <<< "$task" >&2; exit 1 ;;
processing) sleep 2 ;;
*) echo "Unexpected task status." >&2; exit 1 ;;
esac
done
echo "Poll timed out. Keep TASK_ID to check again later." >&2
exit 1
)Pricing
Price per million tokens
| Item | Official price | Kerox |
|---|---|---|
| Text input | $5.0000 | $4.2500 |
| Cached text input | $1.2500 | $1.0625 |
| Image input | $8.0000 | $6.8000 |
| Cached image input | $2.0000 | $1.7000 |
| Image output | $30.0000 | $25.5000 |
Estimated output per image (billed on actual usage)
| Item | Official price | Kerox |
|---|---|---|
| low · 1K | $0.0247 | $0.0210 |
| low · 2K | $0.0500 | $0.0425 |
| low · 4K | $0.0830 | $0.0706 |
| medium · 1K | $0.0435 | $0.0369 |
| medium · 2K | $0.0883 | $0.0751 |
| medium · 4K | $0.1468 | $0.1248 |
| high · 1K | $0.0527 | $0.0448 |
| high · 2K | $0.1070 | $0.0910 |
| high · 4K | $0.1779 | $0.1512 |
| xhigh · 1K | $0.0937 | $0.0796 |
| xhigh · 2K | $0.1903 | $0.1617 |
| xhigh · 4K | $0.3163 | $0.2688 |
| max · 1K | $0.2107 | $0.1791 |
| max · 2K | $0.4282 | $0.3639 |
| max · 4K | $0.7116 | $0.6048 |
Each output also incurs input charges. Four outputs using two references each are billed for four copies of the prompt and eight reference images.
Estimate before submitting
The returned amount is what submitting would hold. An estimate creates no task and charges nothing. When exact is false, the final charge may differ from the hold.
curl --fail-with-body -X POST https://api.kerox.ai/v1/estimate \
-H "Authorization: Bearer $KEROX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "openai/gpt-image-2.6-flare",
"input": {
"prompt": "editorial portrait of a ceramicist in morning sunlight, 35mm film",
"resolution": "1K"
}
}'Input schema (JSON)
The full JSON Schema, nested parameters included
{
"type": "object",
"allOf": [
{
"if": {
"required": [
"aspect_ratio"
],
"properties": {
"aspect_ratio": {
"const": "auto"
}
}
},
"then": {
"not": {
"required": [
"resolution"
],
"properties": {
"resolution": {}
}
},
"x-message": "Choose a concrete aspect_ratio or omit resolution for automatic sizing."
}
},
{
"if": {
"required": [
"background"
],
"properties": {
"background": {
"const": "transparent"
}
}
},
"then": {
"properties": {
"output_format": {
"enum": [
"png",
"webp"
],
"x-message": "Transparent backgrounds require PNG or WebP."
}
}
}
}
],
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"prompt"
],
"x-ignored": [
"safety_identifier"
],
"properties": {
"prompt": {
"type": "string",
"pattern": "\\S",
"maxLength": 32000,
"minLength": 1,
"description": "Text describing what to generate.",
"x-label-en": "Prompt",
"x-label-zh": "提示词",
"x-tier": "common"
},
"images": {
"oneOf": [
{
"type": "string",
"pattern": "^https://"
},
{
"type": "array",
"items": {
"type": "string",
"pattern": "^https://"
},
"maxItems": 16,
"minItems": 1
}
],
"description": "Images for the model to draw on, in the order the prompt refers to them.",
"x-label-en": "Reference images",
"x-label-zh": "参考图",
"x-tier": "common"
},
"aspect_ratio": {
"enum": [
"1:1",
"3:2",
"2:3",
"4:3",
"3:4",
"16:9",
"9:16",
"21:9",
"auto"
],
"type": "string",
"default": "1:1",
"description": "Width to height of the output.",
"x-label-en": "Aspect ratio",
"x-label-zh": "画面比例",
"x-tier": "common"
},
"resolution": {
"enum": [
"1K",
"2K",
"4K"
],
"type": "string",
"default": "1K",
"description": "Output resolution tier. The exact pixels follow from it and `aspect_ratio`.",
"x-label-en": "Resolution",
"x-label-zh": "分辨率",
"x-tier": "common"
},
"n": {
"type": "integer",
"default": 1,
"maximum": 4,
"minimum": 1,
"description": "How many outputs one task may produce.",
"x-label-en": "Number of outputs",
"x-label-zh": "生成数量",
"x-tier": "advanced"
},
"quality": {
"enum": [
"auto",
"low",
"medium",
"high",
"xhigh",
"max"
],
"type": "string",
"default": "auto",
"description": "Rendering quality; auto lets the model choose.",
"x-label-en": "Render quality",
"x-label-zh": "渲染画质",
"x-tier": "advanced"
},
"complexity": {
"enum": [
"low",
"medium",
"high"
],
"type": "string",
"default": "high",
"description": "Planning before rendering. Higher effort suits dense text and complex layouts.",
"x-label-en": "Planning effort",
"x-label-zh": "规划复杂度",
"x-tier": "advanced"
},
"output_format": {
"enum": [
"png",
"webp",
"jpeg"
],
"type": "string",
"default": "png",
"description": "File format of the output.",
"x-label-en": "Output format",
"x-label-zh": "输出格式",
"x-tier": "advanced"
},
"background": {
"enum": [
"auto",
"opaque",
"transparent"
],
"type": "string",
"default": "auto",
"description": "Background of the output image; `transparent` gives an image with an alpha channel.",
"x-label-en": "Background",
"x-label-zh": "背景",
"x-tier": "advanced"
}
},
"x-unsupported": [
"mask",
"moderation",
"output_compression",
"size",
"response_format",
"stream"
],
"additionalProperties": false
}