Seedream
Generate and edit images with Seedream: parameters, responses, and caveats.
| Item | Value |
|---|---|
| Base URL | https://api.hop-base.com/v1 |
| Generate (incl. reference edits) | POST /v1/images/generations |
| Edit (multipart-compatible entry) | POST /v1/images/edits |
| Key group | Seedream 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
| Model | Model ID | Size shorthands | Official price |
|---|---|---|---|
| Seedream 5.0 Pro | seedream-5-0-pro | 1K / 1.5K / 2K | $0.045from/ image |
| Seedream 5.0 Lite | seedream-5-0-lite | 2K / 3K / 4K | $0.035/ image |
| Seedream 4.5 | seedream-4-5 | 2K / 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.
| Parameter | Required | Type and limits | Default | Description |
|---|---|---|---|---|
model | Required | String, see the table above | — | Use the ID returned by GET /v1/models for your key |
prompt | Required | String, non-empty after trimming | — | Content, composition, style, or edit instruction |
size | Optional | A model size shorthand, or WIDTHxHEIGHT | — | auto is rejected; pixel ranges below |
n | Optional | Must be 1 | 1 | Any other value (incl. null) returns 400 |
response_format | Optional | Only url | url | Returns a signed link |
output_format | Optional | Per model, see below | — | Output image format |
optimize_prompt_options | Optional | Object; mode values per model | — | Prompt optimization mode |
image | Optional | URL / Data URL, string or string array | — | References; enables image-to-image / editing |
Per-model limits:
| Model ID | size total pixels | Max references | output_format | optimize_prompt_options.mode |
|---|---|---|---|---|
seedream-5-0-pro | 921,600–4,624,220 | 10 | png / jpeg | standard / fast |
seedream-5-0-lite | 3,686,400–16,777,216 | 14 | png / jpeg | standard |
seedream-4-5 | 3,686,400–16,777,216 | 14 | jpeg | standard |
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.
| Parameter | Required | Type and limits | Default | Description |
|---|---|---|---|---|
image / image[] | Required | File or URL string, repeatable | — | Each upload ≤ 30 MB |
model, prompt | Required | Same as Generate | — | — |
size, n, response_format, output_format | Optional | Same as Generate | — | — |
optimize_prompt_options[mode] | Optional | Same 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.
| Field | Type | Description |
|---|---|---|
created | integer | Unix seconds |
model | string | The requested model ID |
data[].url | string | Signed image link, valid for 24 hours |
data[].size | string | Actual output WIDTHxHEIGHT |
usage | object | May 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
}
}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-asyncis ignored and the request still returns synchronously. - Results come only as
url;b64_jsonis not supported. sizedoes not acceptauto, and Lite and 4.5 output at least 2K.seedream-4-5outputs JPEG only.- Traditional masks are not supported; for local edits, use an annotated reference plus a prompt description.
watermarkis fixed to false by the server; passing it has no effect.- Plural
images,quality,stream, and similar fields have no effect and are ignored. seedream-5-0-liteis the lightweight Seedream 5.0 model, publicly named Seedream 5.0 Lite; do not treat it as Pro.- Data URLs must be base64-encoded, and the MIME type must match the image.
- Official specification: each input image can be up to 30 MB / 36 MP.
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.
| Error | Fix |
|---|---|
model seedream-5-0-pro only supports size 1K, 1.5K, 2K or a valid WIDTHxHEIGHT pixel size | Use 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 16777216 | Bring the total pixels into the range |
size aspect ratio must be between 1:16 and 16:1 | Adjust the aspect ratio |
only a single output is supported (n=1) | Drop n; send separate requests for more |
response_format only supports url | Drop the field or set it to url |
model seedream-4-5 only supports output_format jpeg | Pass jpeg or omit it |
at most 10 reference images are supported | Send fewer references |
seedream does not accept a traditional mask; ... | Drop mask and use an annotated reference |
model seedream-5-0-pro only supports size 1K, 1.5K, 2K or a valid WIDTHxHEIGHT pixel size # e.g. "size": "auto"
model seedream-5-0-lite requires the total pixel count of size to be between 3686400 and 16777216
size aspect ratio must be between 1:16 and 16:1
missing prompt
response_format only supports url
only a single output is supported (n=1)
model seedream-4-5 only supports output_format jpeg
model seedream-5-0-lite only supports optimize_prompt_options.mode standard
optimize_prompt_options must be an object
image must be a URL/data URL string or an array of strings
every item in the image array must be a URL or data URL string
image must not be empty
at most 10 reference images are supported
reference image 1 is invalid: data URL must be base64-encoded
reference image 1 is invalid: unsupported image format image/svg+xml
reference image 1 is invalid: a single image must not exceed 30 MB
image edits require at least one image reference # /v1/images/edits without an image
seedream does not accept a traditional mask; ... # any "mask" on /v1/images/edits, even nullBilling
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
- Image generation overview
- GPT Image, Gemini images, Grok images, Kling images
- API reference: Create image, Edit image
- When something fails, check Troubleshooting