Skip to main content

Seedream 5.0 Pro

Use seedream-5.0-pro through separate synchronous endpoints for text-to-image generation and image editing. Use /v1/images/generations without image for text-to-image generation. Use /v1/images/edits with one to ten reference images for image-to-image generation and editing.

This guide reflects the public contract updated on July 25, 2026.

Overview

  • Both endpoints return the final image in the same HTTP response. No task polling is required.
  • Each request generates exactly one image.
  • You can select a 1K or 2K tier with an aspect ratio, or pass exact pixel dimensions.
  • Reference images can use public URLs or Base64 Data URLs.
  • The response can contain a temporary image URL or raw Base64 data.

Endpoint And Authentication

POST https://api.uniall.ai/v1/images/generations
POST https://api.uniall.ai/v1/images/edits
Authorization: Bearer sk-***
Content-Type: application/json
  • Text to image: call /v1/images/generations without image.
  • Image to image or image editing: call /v1/images/edits and provide image.

The Base URL is:

https://api.uniall.ai

If the UniAll.ai console provides a dedicated API address for your account, use the address shown in the console.

Quick Start

Text To Image

curl -X POST "https://api.uniall.ai/v1/images/generations" \
-H "Authorization: Bearer sk-***" \
-H "Content-Type: application/json" \
-d '{
"model": "seedream-5.0-pro",
"prompt": "Premium skincare advertising image, a glass bottle on light stone, soft natural light, sharp and readable brand typography",
"size": "2K",
"aspect_ratio": "16:9",
"output_format": "jpeg",
"response_format": "url"
}'

Image To Image

curl -X POST "https://api.uniall.ai/v1/images/edits" \
-H "Authorization: Bearer sk-***" \
-H "Content-Type: application/json" \
-d '{
"model": "seedream-5.0-pro",
"prompt": "Keep the product shape and label text, then replace the background with a bright studio scene.",
"image": "https://example.com/source-product.png",
"size": "1K",
"aspect_ratio": "1:1",
"output_format": "png",
"response_format": "url"
}'

Exact Dimensions

Pass exact dimensions through size when the output requires a fixed width and height. Do not pass aspect_ratio in the same request.

curl -X POST "https://api.uniall.ai/v1/images/generations" \
-H "Authorization: Bearer sk-***" \
-H "Content-Type: application/json" \
-d '{
"model": "seedream-5.0-pro",
"prompt": "Wide product-launch key visual, centered technology product, clean background",
"size": "2048x1024",
"output_format": "jpeg",
"response_format": "url"
}'

Request Parameters

ParameterTypeRequiredDefaultDescription
modelstringYesNoneMust be seedream-5.0-pro.
promptstringYesNoneInstructions for image generation or editing.
imagestring / string[]Required for image editingNoneReference images for /v1/images/edits. Accepts public URLs or Base64 Data URLs. Maximum: 10 images.
sizestringNo2K1K, 2K, or exact WIDTHxHEIGHT dimensions.
aspect_ratiostringNoModel-selectedSupported with the 1K and 2K tiers. Do not use with exact dimensions.
output_formatstringNojpegjpeg or png.
response_formatstringNourlurl or b64_json.
watermarkbooleanNotrueWhether to add an "AI generated" watermark.

The model always generates one image per request.

Size And Aspect Ratio

Choose one of the following size modes.

Resolution Tier And Aspect Ratio

{
"size": "2K",
"aspect_ratio": "16:9"
}

size supports 1K and 2K. aspect_ratio supports 1:1, 4:3, 3:4, 16:9, 9:16, 3:2, 2:3, and 21:9.

Common output dimensions are shown below. Treat data[0].size in the response as the final value.

Resolution1:14:33:416:99:163:22:321:9
1K1024x10241152x864864x11521424x800800x14241248x832832x12481568x672
2K2048x20482368x17761776x23682816x15841584x28162496x16641664x24963136x1344

When aspect_ratio is omitted, the model chooses the composition from the prompt and any reference images.

Exact Dimensions

{
"size": "2048x1024"
}

Exact dimensions must satisfy all of these conditions:

  • width * height must be between 921600 and 4624220, inclusive.
  • The width-to-height ratio must be between 1/16 and 16, inclusive.
  • There is no separate 4096-pixel maximum edge. For example, 4200x1000 is valid.
  • aspect_ratio must not be present because exact dimensions already determine the composition.

Reference Images

All image-to-image and image-editing requests use /v1/images/edits.

Pass a string for one reference image or an array for multiple images:

{
"image": [
"https://example.com/product.png",
"data:image/png;base64,..."
]
}

Public URLs and Base64 Data URLs can be mixed in one request.

Public URLs

  • The file must be directly reachable from the public internet.
  • The request must not depend on cookies, login state, or custom headers.

Base64 Data URLs

Use the complete Data URL format:

data:image/png;base64,...
  • The image media subtype must be lowercase. This rule does not require the Base64 payload itself to be lowercase.
  • Supported formats: JPEG, PNG, WEBP, BMP, TIFF, GIF, HEIC, and HEIF.
  • Each Data URL image can be up to 30 MB.
  • A request can contain at most 10 reference images in total.

Response Formats

Input and output formats are independent. A URL input can return Base64 data, and a Base64 input can return a URL.

URL Response

Request field:

{
"response_format": "url"
}

Response example:

{
"created": 1784900000,
"data": [
{
"url": "https://example.com/generated.jpeg",
"size": "2816x1584",
"output_format": "jpeg"
}
],
"usage": {
"generated_images": 1,
"input_images": 0,
"output_tokens": 17424,
"total_tokens": 17424
}
}

The returned URL may expire 24 hours after generation. Download and store the image promptly.

Base64 Response

Request field:

{
"response_format": "b64_json"
}

The image item contains b64_json instead of url:

{
"data": [
{
"b64_json": "...",
"size": "2048x1024",
"output_format": "png"
}
]
}

b64_json contains raw Base64 data without a Data URL prefix.

Response Fields

FieldTypeDescription
createdintegerUnix timestamp for the response.
dataarrayGenerated image items. The array contains one item.
data[].urlstringTemporary image URL when response_format is url.
data[].b64_jsonstringRaw Base64 image data when response_format is b64_json.
data[].sizestringFinal output dimensions as WIDTHxHEIGHT.
data[].output_formatstringFinal image format.
usage.generated_imagesintegerNumber of generated images.
usage.input_imagesintegerNumber of reference images.
usage.output_tokensintegerOutput usage reported by the API.
usage.total_tokensintegerTotal usage reported by the API.

Prompt Positioning And Markup

Express point placement, region edits, text replacement, arrows, sketches, and annotation boxes through the reference image and prompt. No additional request parameter is required.

Replace the sign inside <bbox>100 200 800 900</bbox> with "New collection"
Add a small desk lamp near <point>520 380</point>

Coordinates use the 0..999 range. You can also draw arrows, boxes, or other marks directly on the input image and describe the intended edit in the prompt.

Billing Notes

  • Each request produces exactly one output image.
  • The number of input images may affect billing. Use the current UniAll.ai model page as the source of truth.
  • Output billing is split by actual pixel count: up to 2360000 pixels, or more than 2360000 pixels.
  • The 1K and 2K labels do not determine billing directly. The final tier is based on width * height from the generated image.
  • Current unit prices, group multipliers, and final charges are shown on the UniAll.ai model page and in usage records.

Common Errors

ProblemLikely causeResolution
The request uses a reference image but does not run as an editThe request was sent to /v1/images/generations.Send every request containing image to /v1/images/edits.
Exact dimensions are rejectedaspect_ratio was also provided, or the pixel and ratio limits were exceeded.Remove aspect_ratio and verify the exact-size constraints.
Reference image is rejectedMore than 10 images were provided, the URL is not publicly reachable, or the Data URL is malformed.Reduce the image count and verify direct access or the complete Data URL format.
Image format is rejectedThe format is unsupported or the Data URL media subtype is not lowercase.Use a supported format and a lowercase subtype such as image/png.
The expected response field is missingThe client is reading url while requesting b64_json, or the reverse.Read the field selected by response_format.
The client times out before receiving an imageThe HTTP client timeout is too short for synchronous generation.Increase the client timeout and wait for the original request instead of polling a task endpoint.