Skip to content

Seedream

POST /v1/images/generations

The Seedream family is a synchronous image API: one request returns the finished images; there is no task to poll. All four models share the same endpoint and request shape.

Model IDSizesReference imagesNotes
dola-seedream-5-0-pro-2606281K, 1.5K, 2K (or explicit W×H)up to 10Best single-image quality; interactive editing; text rendering; standard content moderation
dola-seedream-5-0-pro-260628-ep1K, 1.5K, 2K (or explicit W×H)up to 10Same capability as the pro model, without NSFW filtering
seedream-5-0-lite-2601282K, 3K, 4K (or explicit W×H)up to 14Group generation (sequential images) and streaming-capable upstream
seedream-4-5-2511282K, 4K (or explicit W×H)up to 14Previous generation; group generation; JPEG output only
API fieldTypeRequiredValues / limit
modelstringYesOne of the model IDs above
promptstringYesNonempty; recommended ≤300 Chinese characters or 600 English words
imagestring or arrayNoReference images: public HTTPS URLs or data:image/…;base64 strings; up to 10 (pro) / 14 (lite, 4-5)
sizestringNoResolution tier or explicit W×H; default 2K
response_formatstringNourl (default) or b64_json
watermarkbooleanNoDefault true; set false for no “AI-generated” watermark
output_formatstringNopng or jpeg; 5.0-series models only (rejected by seedream-4-5)
optimize_prompt_optionsobject or stringNo{mode: "fast"} / "fast" shortens latency; pro models only
sequential_image_generation + _options.max_imagesstring + integerNoGroup generation, lite/4-5 only; up to 15 images total
nintegerNoPlayground shorthand: mapped to group generation on lite/4-5; values >1 are rejected by pro models
streambooleanNoStreaming is not exposed on this integration and is rejected

Explicit W×H sizes must satisfy the model’s pixel-count range and 1:16–16:1 aspect ratio at the same time. Group generation is constrained to inputs + outputs ≤ 15 images.

  • Reference images are public HTTPS URLs or base64 data URLs; each ≤30 MB, dimensions >14 px, total pixels ≤6000×6000, aspect ratio 1:16–16:1.
  • Prompt-referencing: refer to them by order (“Image 1”, “Image 2”).
  • Pro models support interactive editing — hand-drawn markers described in the prompt, or <bbox>x1 y1 x2 y2</bbox> coordinates.
Terminal window
curl https://api.apimart.cc/v1/images/generations \
-H "Authorization: Bearer $HIPIX_API_KEY" \
-H "Content-Type: application/json" \
--data-raw '{"model": "dola-seedream-5-0-pro-260628", "prompt": "Minimalist product poster, a perfume bottle centered on a white background, headline text \"AURORA\"", "size": "2K", "watermark": false}'

With a reference image:

Terminal window
curl https://api.apimart.cc/v1/images/generations \
-H "Authorization: Bearer $HIPIX_API_KEY" \
-H "Content-Type: application/json" \
--data-raw '{"model": "dola-seedream-5-0-pro-260628", "prompt": "Replace the jacket with a red leather one; keep the face, pose and background unchanged", "image": "https://example.com/photo.jpg", "size": "2K"}'

The response contains data[] with url (valid for 24 hours — download or re-host immediately) or b64_json, plus usage.generated_images, which is the billing basis. usage.output_tokens is a usage statistic and is not the billing basis.

  • Billed per generated image: usage.generated_images — the actual number of successfully generated images. Group generation bills the actual count, not max_images.
  • Images blocked by moderation or lost to server errors are not billed; they carry an error entry in data[] and are excluded from the count.
  • Pro models (dola-seedream-5-0-pro-*) price by output pixel count per image: at most 2.61 megapixels uses the standard rate, anything larger the high rate. The tier is judged by the exact dimensions the vendor returns in data[].size.
  • Pro reference images: the first reference image per request is free; each additional one is billed. lite and 4-5 reference images are free.
  • lite / 4-5 bill a flat per-image rate regardless of output size.
  • Failed tasks are not billed.

Current per-image rates are shown on the model square and in the pricing details.