Skip to content

Seedream

Generate and edit images with Seedream: parameters, responses, and caveats.

ItemValue
Base URLhttps://api.hop-base.com/v1
Generate (incl. reference edits)POST /v1/images/generations
Edit (multipart-compatible entry)POST /v1/images/edits
Key groupSeedream Image Generation or Seedance overseas + Seedream

Seedream is sync only, returns one image per request, and gives you an image URL valid for 24 hours.

Available models

ModelModel IDSize shorthandsOfficial price
Seedream 5.0 Proseedream-5-0-pro1K / 1.5K / 2K$0.045from/ image
Seedream 5.0 Liteseedream-5-0-lite2K / 3K / 4K$0.035/ image
Seedream 4.5seedream-4-52K / 4K$0.04/ image

Choosing a model: only Pro can output 1K, and on Pro 1.5K costs the same as 1K with better quality, so prefer 1.5K; Lite and 4.5 output at least 2K. The Seedance overseas + Seedream group offers only seedream-5-0-pro.

Request parameters

Generate

POST /v1/images/generations with a JSON body. Adding image turns it into a single-image edit, multi-image composition, or local edit.

ParameterRequiredType and limitsDefaultDescription
modelRequiredString, see the table above—Use the ID returned by GET /v1/models for your key
promptRequiredString, non-empty after trimming—Content, composition, style, or edit instruction
sizeOptionalA model size shorthand, or WIDTHxHEIGHT—auto is rejected; pixel ranges below
nOptionalMust be 11Any other value (incl. null) returns 400
response_formatOptionalOnly urlurlReturns a signed link
output_formatOptionalPer model, see below—Output image format
optimize_prompt_optionsOptionalObject; mode values per model—Prompt optimization mode
imageOptionalURL / Data URL, string or string array—References; enables image-to-image / editing

Per-model limits:

Model IDsize total pixelsMax referencesoutput_formatoptimize_prompt_options.mode
seedream-5-0-pro921,600–4,624,22010png / jpegstandard / fast
seedream-5-0-lite3,686,400–16,777,21614png / jpegstandard
seedream-4-53,686,400–16,777,21614jpegstandard

A WIDTHxHEIGHT aspect ratio must be within 1:16–16:1. An invalid size returns 400 before generation and is not billed.

Each image item is an http(s) URL or a base64 Data URL; each Data URL must be ≤ 30 MB. Supported formats: JPEG, PNG, WebP, BMP, TIFF, GIF, HEIC, HEIF. URLs are not downloaded or size-checked at submission and must be public addresses the server can reach.

Local edits do not use a mask: draw the annotation on a reference image and describe its coordinates, bounding box, arrow, or painted region in the prompt.

Edit

POST /v1/images/edits is a compatibility entry for existing OpenAI Images editing code. Prefer multipart/form-data; the same JSON as generations also works. At least one reference image is required.

ParameterRequiredType and limitsDefaultDescription
image / image[]RequiredFile or URL string, repeatable—Each upload ≤ 30 MB
model, promptRequiredSame as Generate——
size, n, response_format, output_formatOptionalSame as Generate——
optimize_prompt_options[mode]OptionalSame mode as Generate—optimize_prompt_mode also works

Any mask field returns 400, even null. Multipart fields not listed above are ignored.

Response

A sync response in the standard OpenAI Images JSON; the image is in data[].url.

FieldTypeDescription
createdintegerUnix seconds
modelstringThe requested model ID
data[].urlstringSigned image link, valid for 24 hours
data[].sizestringActual output WIDTHxHEIGHT
usageobjectMay be present, with generated_images and similar
{
  "model": "seedream-5-0-pro",
  "created": 1760000000,
  "data": [
    {
      "url": "https://…/result.jpeg?X-Signature=…",
      "size": "2048x2048"
    }
  ],
  "usage": {
    "generated_images": 1,
    "output_tokens": 16384,
    "total_tokens": 16384
  }
}
Download results right away.

The returned URL is a signed link valid for 24 hours. After it expires it cannot be retrieved again; you can only regenerate, which is billed again, so download it as soon as you receive it.

Examples

Text to image

curl https://api.hop-base.com/v1/images/generations \
  -H "Authorization: Bearer sk-your-key" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "seedream-5-0-pro",
    "prompt": "A futuristic city street at neon night, cinematic framing",
    "size": "2048x2048",
    "response_format": "url"
  }'

Edit with references

curl https://api.hop-base.com/v1/images/generations \
  -H "Authorization: Bearer sk-your-key" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "seedream-5-0-pro",
    "prompt": "Move the cup in the first image to the right; keep the rest",
    "image": ["https://example.com/source.png"],
    "size": "2K",
    "output_format": "png",
    "response_format": "url"
  }'

Notes

  • Each request returns one image; send separate requests for more.
  • Sync only: Prefer: respond-async is ignored and the request still returns synchronously.
  • Results come only as url; b64_json is not supported.
  • size does not accept auto, and Lite and 4.5 output at least 2K.
  • seedream-4-5 outputs JPEG only.
  • Traditional masks are not supported; for local edits, use an annotated reference plus a prompt description.

Common errors

Invalid parameters return 400 before generation and are not billed. Content-safety rejections also return 400 without charge, with the reason in error.message.

ErrorFix
model seedream-5-0-pro only supports size 1K, 1.5K, 2K or a valid WIDTHxHEIGHT pixel sizeUse a size shorthand of that model or a valid WIDTHxHEIGHT
model seedream-5-0-lite requires the total pixel count of size to be between 3686400 and 16777216Bring the total pixels into the range
size aspect ratio must be between 1:16 and 16:1Adjust the aspect ratio
only a single output is supported (n=1)Drop n; send separate requests for more
response_format only supports urlDrop the field or set it to url
model seedream-4-5 only supports output_format jpegPass jpeg or omit it
at most 10 reference images are supportedSend fewer references
seedream does not accept a traditional mask; ...Drop mask and use an annotated reference

Billing

Billed per output image, and 5.0 Pro also charges for each reference image; failed generations and safety rejections are not billed. 5.0 Pro is priced by output pixel tier, and 1K and 1.5K cost the same.

See each model card and the signed-in model catalog for unit prices.

Next steps