Image 2 image models

This page covers how to call each Image 2 model ID and how it is billed. The shared protocol is described in Image generation API.

Model ID Endpoint Max images per request Price (by resolution)
Image-2.0-high POST /v1/images/generations 1 1080p $0.15 / 2K $0.30 / 4K $0.60 per image
Image-2.0-medium POST /v1/images/generations 1 1080p $0.15 / 2K $0.30 / 4K $0.60 per image
Image-2.5-flare POST /v1/images/generations 10 1080p $0.15 / 2K $0.30 / 4K $0.60 per image
Image-2.5-sunburst POST /v1/images/generations 10 1080p $0.15 / 2K $0.30 / 4K $0.60 per image

The console model page is authoritative for prices. Model IDs are case-sensitive; use them exactly as shown.

How calls work

  • The request is synchronous: the gateway waits for the images to finish and returns them in one response. It waits up to 10 minutes, then returns 504 upstream_timeout.
  • Images are returned as b64_json only (Base64 PNG), never as url. Omit response_format or set it to b64_json; any other value returns 400.
  • Output size is defined by aspect ratio + resolution tier. Pass aspect_ratio and resolution directly, or pass an OpenAI-style size (WIDTHxHEIGHT); the gateway maps the short side to a tier: 1080 → 1080p, 1440 → 2K, 2160 → 4K, any other short side returns 400, and the size ratio must be one the model supports. If you pass both forms they must agree.
  • Reference images go in image (one URL or an array) or images (array). Only publicly reachable HTTP(S) image URLs are accepted, not Base64.
  • Image-2.0-high / Image-2.0-medium generate one image per request; Image-2.5-flare / Image-2.5-sunburst generate up to 10 per request and support quality.
  • stream is not supported, and /v1/images/edits is not available.

Request parameters

One complete parameter table per model ID. Pick a model in Model ID at the top to see only its parameters.

Image-2.0-high

Parameter Type Required Default Allowed values Description
model string Yes — Image-2.0-high Model ID
prompt string Yes — 1–32000 characters Image description; must not be empty
n integer No 1 1 only One image per request
aspect_ratio string No 1:1 1:1 / 4:3 / 3:4 / 16:9 / 9:16 / 3:2 / 2:3 / 21:9 / 9:21 Output aspect ratio; does not affect price
resolution string No 1080p 1080p / 2k / 4k (1440p / 2160p also accepted) Resolution tier; sets the price
size string No — WIDTHxHEIGHT with short side 1080 / 1440 / 2160 Alternative to aspect_ratio + resolution, e.g. 1920x1080 = 16:9 + 1080p. auto is not allowed
image / images string / string[] No — Up to 16 HTTP(S) image URLs Reference images; omit for text-to-image. Does not affect price
response_format string No b64_json b64_json only Returns Base64 images
stream boolean No false false only Streaming is not supported; true returns 400

Image-2.0-medium

Parameter Type Required Default Allowed values Description
model string Yes — Image-2.0-medium Model ID
prompt string Yes — 1–32000 characters Image description; must not be empty
n integer No 1 1 only One image per request
aspect_ratio string No 1:1 1:1 / 4:3 / 3:4 / 16:9 / 9:16 / 3:2 / 2:3 / 21:9 / 9:21 Output aspect ratio; does not affect price
resolution string No 1080p 1080p / 2k / 4k (1440p / 2160p also accepted) Resolution tier; sets the price
size string No — WIDTHxHEIGHT with short side 1080 / 1440 / 2160 Alternative to aspect_ratio + resolution, e.g. 1920x1080 = 16:9 + 1080p. auto is not allowed
image / images string / string[] No — Up to 16 HTTP(S) image URLs Reference images; omit for text-to-image. Does not affect price
response_format string No b64_json b64_json only Returns Base64 images
stream boolean No false false only Streaming is not supported; true returns 400

Image-2.5-flare

Parameter Type Required Default Allowed values Description
model string Yes — Image-2.5-flare Model ID
prompt string Yes — 1–32000 characters Image description; must not be empty
n integer No 1 1–10 Number of images; billed on images actually returned
aspect_ratio string No 1:1 1:1 / 4:3 / 3:4 / 16:9 / 9:16 / 3:2 / 2:3 / 21:9 / 9:21 Output aspect ratio; does not affect price
resolution string No 1080p 1080p / 2k / 4k (1440p / 2160p also accepted) Resolution tier; sets the price
size string No — WIDTHxHEIGHT with short side 1080 / 1440 / 2160 Alternative to aspect_ratio + resolution, e.g. 1920x1080 = 16:9 + 1080p. auto is not allowed
quality string No auto auto / low / medium / high / xhigh / max Quality; does not affect price
image / images string / string[] No — Up to 16 HTTP(S) image URLs Reference images; omit for text-to-image. Does not affect price
response_format string No b64_json b64_json only Returns Base64 images
stream boolean No false false only Streaming is not supported; true returns 400

Image-2.5-sunburst

Parameter Type Required Default Allowed values Description
model string Yes — Image-2.5-sunburst Model ID
prompt string Yes — 1–32000 characters Image description; must not be empty
n integer No 1 1–10 Number of images; billed on images actually returned
aspect_ratio string No 1:1 1:1 / 4:3 / 3:4 / 16:9 / 9:16 / 3:2 / 2:3 / 21:9 / 9:21 Output aspect ratio; does not affect price
resolution string No 1080p 1080p / 2k / 4k (1440p / 2160p also accepted) Resolution tier; sets the price
size string No — WIDTHxHEIGHT with short side 1080 / 1440 / 2160 Alternative to aspect_ratio + resolution, e.g. 1920x1080 = 16:9 + 1080p. auto is not allowed
quality string No auto auto / low / medium / high / xhigh / max Quality; does not affect price
image / images string / string[] No — Up to 16 HTTP(S) image URLs Reference images; omit for text-to-image. Does not affect price
response_format string No b64_json b64_json only Returns Base64 images
stream boolean No false false only Streaming is not supported; true returns 400

Billing

  • Billed per image. The price depends only on the resolution tier (or the tier derived from the short side of size), not on the aspect ratio, quality or the number of reference images.
  • "n × per-image price for that tier" is held at submission and settled on the number of images actually returned (no more than n); the rest is released.
  • Failed or timed-out generations are not charged.

Example: two Image-2.5-flare images with "resolution": "2k" cost 2 × $0.30 = $0.60.

Example

curl https://api.admesh.ai/v1/images/generations \
  -H "Authorization: Bearer $ADMESH_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "Image-2.5-flare",
    "prompt": "A watercolor lighthouse on a cliff at dawn",
    "n": 2,
    "size": "1920x1080",
    "quality": "high"
  }'

Response:

{
  "created": 1762650000,
  "data": [
    { "b64_json": "iVBORw0KGgo…" },
    { "b64_json": "iVBORw0KGgo…" }
  ]
}