Skip to content
English

Seedream 5.0 Flash

POST Base URL: https://api.hiapi.ai /v1/tasks

Image, video, and audio models are called through theUnified Async API POST /v1/tasks endpoint; only the input fields differ (see input parameters below).

Model summary

Model name seedream-5.0-flash
Type Image generation and editing (text-to-image / image-to-image)
Endpoint POST /v1/tasks
Pricing See HiAPI Pricing

Generate and edit with one model, with multiple references, size presets and custom dimensions.

Production guidance

Production guidance
  • In production, pass callback.url at the top level to receive terminal notifications. Do not place callback inside input.
  • Use callback.when=final. Both success and fail are terminal states; deduplicate notifications by taskId.
  • Use GET /v1/tasks/:id for local debugging or a missed callback. Once a taskId is returned, query that task instead of submitting duplicates.

Best suited for

Product scenes

Describe the subject, material, background and lighting. Omit image to generate one image from text.

prompt
Multiple canvas formats

Use size to specify pixel dimensions for landscape covers, portrait posters or square images.

size
Reference editing and blending

With one image, describe what to change and preserve. With multiple images, explain which supplies the subject, background or style.

promptimage

Request parameters

model string required

Use seedream-5.0-flash.

example seedream-5.0-flash
input object required

Image generation and editing parameters.

prompt string required

Describe the image or specify what to change and preserve in references. 1–5000 characters.

image string | string[] optional

One image URL, Base64 data URL, or an array of 1–10 images. Omit for text-to-image generation. Each image must be at most 30MB: JPEG, PNG, WebP, BMP, TIFF, GIF, HEIC or HEIF; both dimensions greater than 14px, 196–36000000 total pixels, aspect ratio 1:16–16:1.

size string optional

Use the 1K, 1.5K or 2K preset, or join pixel width and height with a lowercase x: for example, 1536x1024 (3:2 landscape), 1152x2048 (9:16 portrait), or 2048x2048 (square). Custom sizes require 921600–4624220 total pixels and an aspect ratio from 1:16 to 16:1. A 4K preset is not supported. See common size examples

default 2K example 1536x1024
output_format enum optional

Choose the file format. Omission normally uses JPEG, or PNG for transparent output.

enum: jpegpng
background enum optional

Use opaque for a normal background. Transparent requires editing one image with an alpha channel; select PNG or omit output_format.

default opaque enum: opaquetransparent
watermark boolean optional

Add an AI-generated watermark to the image. Off by default; set true to enable.

default false
callback object optional

Terminal task notifications.

url string required

HTTPS address receiving the notification.

when enum optional

Notify when the task finishes.

default final enum: final

size examples

These pixel dimensions satisfy the parameter limits and can be used as size strings. Presets such as 2K do not specify a fixed width and height. Use WIDTHxHEIGHT for a specific canvas; do not pass a ratio such as 16:9 as size.

Use caseAspect ratiosize value
Square image1:11024x1024
Large square image1:12048x2048
Landscape product image3:21536x1024
Portrait poster2:31024x1536
Landscape cover16:92048x1152
Portrait cover9:161152x2048

Example requests

Ceramic teapot in morning light

Compose a product scene from subject, material and lighting instructions.

Request body
{
  "model": "seedream-5.0-flash",
  "input": {
    "prompt": "Studio product photograph of a matte teal ceramic teapot with a curved walnut handle, on pale limestone, soft morning window light, subtle steam, warm cream background, realistic material texture, no text.",
    "size": "2K",
    "watermark": false
  }
}
Custom landscape cover

A 2048x1152, 16:9 landscape PNG with watermark disabled.

Request body
{
  "model": "seedream-5.0-flash",
  "input": {
    "prompt": "A minimalist landscape cover with an orange folded-paper sculpture on a warm cream background, directional studio light, generous negative space on the left, no text.",
    "size": "2048x1152",
    "output_format": "png",
    "watermark": false
  }
}
Single-reference editing

Replace the example image URL with an accessible reference URL, or supply a Base64 data URL. Preserve the product and change its background.

Request body
{
  "model": "seedream-5.0-flash",
  "input": {
    "prompt": "Keep the product shape, material and color unchanged. Replace the background with pale limestone and soft morning window light.",
    "image": "https://example.com/product.png",
    "size": "1536x1024",
    "watermark": false
  }
}
Production callback

Replace callback.url with your HTTPS receiver and process the terminal notification. Watermark is off by default; this example also sets false explicitly.

Request body
{
  "model": "seedream-5.0-flash",
  "input": {
    "prompt": "Studio product photograph of a matte teal ceramic teapot with a curved walnut handle, on pale limestone, soft morning window light, subtle steam, warm cream background, realistic material texture, no text.",
    "size": "2K",
    "watermark": false
  },
  "callback": {
    "url": "https://example.com/hiapi/callback",
    "when": "final"
  }
}

Getting the result

  1. Save data.taskId from the submission response. Acceptance does not mean image generation is complete.
  2. In production, wait for a terminal notification at callback.url. For debugging or reconciliation, query GET /v1/tasks/:id until data.status is success or fail.
  3. On success, read data.output[].url. Use the returned expireAt to determine retention and save images you need to keep.
  4. On failure, correct the request based on the returned error rather than repeatedly submitting invalid parameters.

FAQ

Can I generate and edit with the same model?

Omit references for text-to-image generation. Add one image for editing or several to combine subjects, scenes or styles. Both use the same model ID, with up to 10 references.

How do I control resolution and aspect ratio?

Set size to 1K, 1.5K, 2K or WIDTHxHEIGHT. Use pixel dimensions for an exact ratio: 921600–4624220 total pixels and a ratio between 1:16 and 16:1. A 4K preset is not available.

What does transparent background require?

Use transparent only when editing one reference that already has an alpha channel. Choose PNG or leave the format automatic. It is not a general background-removal switch.

Can I request batches or streamed images?

Each task returns one completed image through task retrieval. Batch generation, streamed images and layer decomposition are not exposed.

How do I retrieve the image?

Save the taskId, receive terminal notifications at callback.url in production, or query the task. On success, use output[].url and save the image before expireAt.

Is watermark enabled by default?

No. Omit watermark or pass false to disable it; pass true to enable it. The API and Playground share this default.

Next steps