MixMedia API
API keys Sign inTry it
MixMedia Sign in
Open as Markdown
← Try it on the website

GPT Image 2.6

OpenAI · under 1 min
from $0.035per picture

ChatGPT image model: realism, layouts and edits. 1K; 2K and 4K are an upscale of the finished picture.

Prompt only — the model creates the picture from scratch.

ID: gpt-image-2.6-text-to-image · $0.035–$0.265 (depends on quality and resolution) per image · under 1 min

Parameters (field input)

ParameterRequiredDescriptionValues (default in bold)
promptyesWhat to draw or what to changetext, up to 32000 chars
resolutionnoLong side: 0.5K ≈ 512 px, 1K ≈ 1024 px, 2K ≈ 2048 px, 4K ≈ 4096 px. Sizes above native are an upscale of the finished picture (Lanczos + light sharpening): 4K on Nano Banana 2.1 and Pro from 2K, 2K on Nano Banana from 1K, 2K and 4K on GPT Image from its native ~1.5K1K 2K 4K
aspect_rationoImage shapeauto 1:1 1:3 3:1 3:2 2:3 4:3 3:4 5:4 4:5 16:9 9:16 2:1 1:2 21:9 9:21
output_formatnoFile formatpng jpeg webp gif svg
backgroundnoBackground: auto, opaque, transparent (only with png or webp)auto opaque transparent
moderationnoAccepted for compatibility with other APIs, does not change the resultlow auto
qualitynoRendering effort; passed to ChatGPT. Changes the price (see the table below), auto = mediumauto low medium high xhigh max
complexitynoПланированиеlow medium high
frame_countnoКадров GIF2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
frame_duration_msnoДлительность кадра GIF50 100 150 200 250 300 400 500
svg_modelnoМодель для SVGgpt-5.4-mini gpt-5.6-sol

Example

curl -X POST https://mixmedia.tech/api/v1/jobs/createTask \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"gpt-image-2.6-text-to-image","input":{"prompt":"A cat astronaut in a neon city, cinematic light","resolution":"1K","aspect_ratio":"auto","moderation":"low","quality":"auto","complexity":"high","frame_count":"9","frame_duration_ms":"200","svg_model":"gpt-5.4-mini"}}'
import os, requests

r = requests.post(
    "https://mixmedia.tech/api/v1/jobs/createTask",
    headers={"Authorization": f"Bearer {os.environ['API_KEY']}"},
    json={
      "model": "gpt-image-2.6-text-to-image",
      "input": {
        "prompt": "A cat astronaut in a neon city, cinematic light",
        "resolution": "1K",
        "aspect_ratio": "auto",
        "moderation": "low",
        "quality": "auto",
        "complexity": "high",
        "frame_count": "9",
        "frame_duration_ms": "200",
        "svg_model": "gpt-5.4-mini"
      }
    },
)
print(r.json())  # {"code": 200, "data": {"taskId": "..."}}
const r = await fetch("https://mixmedia.tech/api/v1/jobs/createTask", {
  method: "POST",
  headers: { Authorization: `Bearer ${process.env.API_KEY}`, "Content-Type": "application/json" },
  body: JSON.stringify({
    "model": "gpt-image-2.6-text-to-image",
    "input": {
      "prompt": "A cat astronaut in a neon city, cinematic light",
      "resolution": "1K",
      "aspect_ratio": "auto",
      "moderation": "low",
      "quality": "auto",
      "complexity": "high",
      "frame_count": "9",
      "frame_duration_ms": "200",
      "svg_model": "gpt-5.4-mini"
    }
  }),
});
console.log(await r.json()); // { code: 200, data: { taskId: "..." } }

With photos in input: describe what to change.

ID: gpt-image-2.6-image-to-image · $0.035–$0.265 (depends on quality and resolution) per image · under 1 min

Parameters (field input)

ParameterRequiredDescriptionValues (default in bold)
promptyesWhat to draw or what to changetext, up to 32000 chars
input_urlsyesLinks to your photos (https), up to 16["https://…"]
resolutionnoLong side: 0.5K ≈ 512 px, 1K ≈ 1024 px, 2K ≈ 2048 px, 4K ≈ 4096 px. Sizes above native are an upscale of the finished picture (Lanczos + light sharpening): 4K on Nano Banana 2.1 and Pro from 2K, 2K on Nano Banana from 1K, 2K and 4K on GPT Image from its native ~1.5K1K 2K 4K
aspect_rationoImage shapeauto 1:1 1:3 3:1 3:2 2:3 4:3 3:4 5:4 4:5 16:9 9:16 2:1 1:2 21:9 9:21
output_formatnoFile formatpng jpeg webp
backgroundnoBackground: auto, opaque, transparent (only with png or webp)auto opaque transparent
moderationnoAccepted for compatibility with other APIs, does not change the resultlow auto
qualitynoRendering effort; passed to ChatGPT. Changes the price (see the table below), auto = mediumauto low medium high xhigh max
complexitynoПланированиеlow medium high

Example

curl -X POST https://mixmedia.tech/api/v1/jobs/createTask \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"gpt-image-2.6-image-to-image","input":{"prompt":"Make the background a neon city at night","input_urls":["https://mixmedia.tech/static/img/previews/gpt-t2i.jpg"],"resolution":"1K","aspect_ratio":"auto","moderation":"low","quality":"auto","complexity":"high"}}'
import os, requests

r = requests.post(
    "https://mixmedia.tech/api/v1/jobs/createTask",
    headers={"Authorization": f"Bearer {os.environ['API_KEY']}"},
    json={
      "model": "gpt-image-2.6-image-to-image",
      "input": {
        "prompt": "Make the background a neon city at night",
        "input_urls": [
          "https://mixmedia.tech/static/img/previews/gpt-t2i.jpg"
        ],
        "resolution": "1K",
        "aspect_ratio": "auto",
        "moderation": "low",
        "quality": "auto",
        "complexity": "high"
      }
    },
)
print(r.json())  # {"code": 200, "data": {"taskId": "..."}}
const r = await fetch("https://mixmedia.tech/api/v1/jobs/createTask", {
  method: "POST",
  headers: { Authorization: `Bearer ${process.env.API_KEY}`, "Content-Type": "application/json" },
  body: JSON.stringify({
    "model": "gpt-image-2.6-image-to-image",
    "input": {
      "prompt": "Make the background a neon city at night",
      "input_urls": [
        "https://mixmedia.tech/static/img/previews/gpt-t2i.jpg"
      ],
      "resolution": "1K",
      "aspect_ratio": "auto",
      "moderation": "low",
      "quality": "auto",
      "complexity": "high"
    }
  }),
});
console.log(await r.json()); // { code: 200, data: { taskId: "..." } }

Price by quality and resolution

Per picture. auto costs the same as medium.

quality1K2K4K
auto$0.055$0.06$0.07
low$0.035$0.04$0.05
medium$0.055$0.06$0.07
high$0.065$0.07$0.08
xhigh$0.115$0.12$0.13
max$0.25$0.255$0.265

Compatibility

Requests in the OpenAI format and other popular API formats work too:

  • model: gpt-image-2.6-text-to-image, gpt-image-2.6, gpt-image-2-6, gpt-image-2.6-flare, gpt-image-2.6-sunburst, gpt-image-2.6-image-to-image, gpt-image-2.6-edit.
  • size instead of aspect_ratio: a ratio (16:9) or exact pixels (1600x1200) — we use the closest supported ratio.
  • Photos can go in image_urls, image_input or input_urls. Parameters may also be sent at the top level of the body, without the input wrapper.
  • resolution in any case (1k, 2K); jpg and jpeg are the same. n must be 1 (one image per request).
  • One name, gpt-image-2.5, for both modes: with photos the task runs as Photo → Photo. resolution: 1k, 2k or 4k — ChatGPT draws about 1.5K; 2K and 4K are an upscale of the finished picture (Lanczos + light sharpening) to a 2048 / 4096 px long side. quality (auto, low, medium, high; hd, xhigh, max = high, standard = medium) is passed to ChatGPT: the size stays the same, detail changes a little; the price follows the table below. model: gpt-image-2.5-flare and gpt-image-2.5-sunburst are the same model. moderation and mask_url are accepted but do not change the result.

Result

Same as any task: call recordInfo or receive a callback. Image links are in resultJson (kept for 24 hours — download right away).

Upload your photos via files/upload or pass any public https links.

Error handling

API responses are JSON {"code", "msg", "data"}; errors also have a string error field (type). On /api/v1/* the HTTP status matches body code.

Example response bodies

400

{
  "code": 400,
  "msg": "input.duration: must be between 4 and 30, or \"auto\" / -1",
  "data": null,
  "error": "invalid_request_error"
}

401

{
  "code": 401,
  "msg": "Authentication failed. Please check your API key",
  "data": null,
  "error": "authentication_error"
}

402

{
  "code": 402,
  "msg": "Insufficient balance. Please top up and try again. Available: $0.01, required: $0.015. Top up at https://mixmedia.tech/cabinet/billing",
  "data": {
    "balance": "0.0100",
    "required": "0.0150",
    "currency": "USD",
    "topUpUrl": "https://mixmedia.tech/cabinet/billing"
  },
  "error": "payment_required"
}

429

{
  "code": 429,
  "msg": "Rate limit exceeded: 10 createTask/upload requests per 10 s per key. Retry after 8s",
  "data": null,
  "error": "rate_limit_error"
}

500

{
  "code": 500,
  "msg": "Internal server error",
  "data": null,
  "error": "server_error"
}

Codes on createTask / upload

codeerrorMeaningWhat to do
400invalid_request_errorInvalid parameter or bodySee msg
400unsupported_modelUnknown modelModel list
401authentication_errorMissing or invalid keyCheck the key
402payment_requiredNot enough balanceTop up
403permission_errorNo accessContact support
429rate_limit_errorToo many requestsWait for Retry-After
505model_disabledModel temporarily disabledPick another
500server_errorOur failureRetry later

Example msg values: Authentication failed. Please check your API key (401); Insufficient balance. Please top up and try again… (402).

Task errors (recordInfo)

If the task was created and then failed: state: "fail" (alias status: "failed"), failCode / failMsg, and error: { code, message, type }. Money is refunded (refunded: true).

failCodeerror.typeMeaning
400nsfw_content_detected / invalid_request_errorModeration — failMsg is upstream text verbatim
422invalid_request_errorThe model rejected the parameters (e.g. a photo could not be downloaded)
501server_errorThe model could not generate (failMsg)
504timeout_errorTimed out — retry
500 / 503server_errorService temporarily unavailable

Rate limits

WhatLimit
createTask and upload20 per 10 s per key
recordInfo / list / balance100 per 10 s per key

Over the limit — HTTP 429 and Retry-After.

Try the same models on the website or see prices.

© 2026 MixMedia