Skip to content

Seedream 5.0 Pro Region Edit

Changes or combines images by instruction.

Model ID seedream-5.0-pro-region-edit
Task edit-image
Output image
Family Seedream
Status Active

Prices are live, so this page does not show them. GET /v1/models/seedream-5.0-pro-region-edit returns the published price (price), and POST /v1/quotes returns the binding maximum for one request, with the processor that will run it. You are never charged more than the quoted maximum, and failed work is free. See Pricing and quotes.

Send these in input. Omitted parameters take their default; unknown parameters are refused with 422 parameter_unknown. The same schema is input_schema in GET /v1/models/seedream-5.0-pro-region-edit.

Name Type Default Allowed Required Description
prompt string 1 to 4000 characters Yes Describe the change for the marked area of the source. Other references are Image 2, Image 3 and so on. To point at a spot, add x y, or a box x1 y1 x2 y2, after the image it is on: 0 0 is the top left and 999 999 the bottom right.
aspect_ratio string match match, 1:1, 4:3, 3:4, 16:9, 9:16, 3:2, 2:3, 21:9, 9:21, 4:5, 5:4 No Frame shape of the image. “Match” lets the model follow the first reference.
size string 2K 1K, 1.5K, 2K No Output size. 1K and 1.5K cost the same; 2K costs twice as much.
prompt_mode string standard standard, fast No Standard gives the best quality; Fast is quicker and may lose a little detail.

Each media input takes an asset ID (asset_…), a generation ID (gen_…, its first output), a public HTTPS URL or a small data: URI. URLs and data URIs are imported into the project first; see Uploading media.

Name Accepts How many Required Notes
source image 1 Yes
references image 0 to 9 No

region is required: the area of source to change, in source pixels from the top-left corner. Send a rectangle or a polygon of 3 to 500 points.

{
"type": "rectangle",
"x": 470,
"y": 190,
"width": 340,
"height": 340
}
{"type":"polygon","points":[[470,190],[810,190],[640,530]]}

Price the request first. A quote is free and starts nothing:

Quote
curl https://api.halationlab.ai/v1/quotes \
-H "Authorization: Bearer $HALATIONLAB_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d @- <<'JSON'
{
"model": "seedream-5.0-pro-region-edit",
"input": {
"prompt": "Make the background a sunny beach",
"aspect_ratio": "match",
"source": "https://docs.halationlab.ai/media/sample-image.png",
"region": {
"type": "rectangle",
"x": 470,
"y": 190,
"width": 340,
"height": 340
}
}
}
JSON

Then start it, paying at most MAX_COST tokens. If the price is higher, nothing starts and the 402 max_cost_exceeded answer carries the quote:

Generate
MAX_COST=${MAX_COST:?Set MAX_COST to the most you will pay, in tokens}
curl https://api.halationlab.ai/v1/generations \
-H "Authorization: Bearer $HALATIONLAB_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Prefer: wait=60" \
-H "Content-Type: application/json" \
-d @- <<JSON
{
"model": "seedream-5.0-pro-region-edit",
"input": {
"prompt": "Make the background a sunny beach",
"aspect_ratio": "match",
"source": "https://docs.halationlab.ai/media/sample-image.png",
"region": {
"type": "rectangle",
"x": 470,
"y": 190,
"width": 340,
"height": 340
}
},
"max_cost": $MAX_COST
}
JSON

The media URLs point at small sample files on this site. Replace them with your own asset IDs, generation IDs or URLs.