Build with Seedream 4.0 Image to Image(Edit)
Make your first request
Use your Sorceress API key on your server. The playground uses your signed-in account; your application uses the same model with an API key.
curl -X POST 'https://sorceress.games/api/v1/jobs' \
-H 'Authorization: Bearer $SORCERESS_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"model": "bytedance-seedream-v4-edit",
"input": {
"image_size": "square_hd",
"max_images": 1,
"image_resolution": "1K",
"prompt": "<prompt>",
"image_urls": "<image_urls>"
}
}'Inputs & settings
seedintegerRandom seed for reproducible results. Integer, up to 1000000. Omit for a random seed.
promptstringRequiredThe text prompt used to edit the image (Max length: 5000 characters)
image_sizestringThe size of the generated image.
Options: square, square_hd, portrait_4_3, portrait_3_2, portrait_16_9, landscape_4_3, landscape_3_2, landscape_16_9, landscape_21_9
image_urlsarrayRequiredList of URLs of input images for editing. Presently, up to 10 image inputs are allowed. (Accepted types: image/jpeg, image/png, image/webp; Max size: 30.0MB)
max_imagesnumberSet this value (1–6) to cap how many images a single generation run can produce in one set—because they’re created in one shot rather than separate requests, you must also state the exact number you want in the prompt so both settings align. (Min: 1, Max: 6, Step: 1) (step: 1)
nsfw_checkerbooleanDefaults to false. When false, no additional content filtering is applied and results are returned directly by the model.
image_resolutionstringFinal image resolution is determined by combining image_size (aspect ratio) and image_resolution (pixel scale)..
Options: 1K, 2K, 4K
Full input schema
{
"type": "object",
"required": [
"prompt",
"image_urls"
],
"properties": {
"seed": {
"type": "integer",
"title": "Seed",
"maximum": 1000000,
"description": "Random seed for reproducible results. Integer, up to 1000000. Omit for a random seed."
},
"prompt": {
"type": "string",
"title": "Prompt",
"maxLength": 5000,
"description": "The text prompt used to edit the image (Max length: 5000 characters)"
},
"image_size": {
"enum": [
"square",
"square_hd",
"portrait_4_3",
"portrait_3_2",
"portrait_16_9",
"landscape_4_3",
"landscape_3_2",
"landscape_16_9",
"landscape_21_9"
],
"type": "string",
"title": "Image size",
"default": "square_hd",
"description": "The size of the generated image."
},
"image_urls": {
"type": "array",
"items": {
"type": "string",
"format": "uri"
},
"title": "Image URLs",
"x-media": "image",
"maxItems": 10,
"description": "List of URLs of input images for editing. Presently, up to 10 image inputs are allowed. (Accepted types: image/jpeg, image/png, image/webp; Max size: 30.0MB)"
},
"max_images": {
"type": "number",
"title": "Max images",
"default": 1,
"maximum": 6,
"minimum": 1,
"description": "Set this value (1–6) to cap how many images a single generation run can produce in one set—because they’re created in one shot rather than separate requests, you must also state the exact number you want in the prompt so both settings align. (Min: 1, Max: 6, Step: 1) (step: 1)"
},
"nsfw_checker": {
"type": "boolean",
"title": "NSFW checker",
"description": "Defaults to false. When false, no additional content filtering is applied and results are returned directly by the model."
},
"image_resolution": {
"enum": [
"1K",
"2K",
"4K"
],
"type": "string",
"title": "Image resolution",
"default": "1K",
"description": "Final image resolution is determined by combining image_size (aspect ratio) and image_resolution (pixel scale).."
}
}
}Results, saved runs & billing
Media requests return a job ID. Poll GET /api/v1/jobs/:id until it succeeds or fails; keep the same ID while it is processing. Long chat requests can also return a saved job to poll. Completed outputs are stored in your account, and successful work is billed using your model's current rates.
A multi-step workflow may include separately billed successful actions. If a connection drops, check your saved run before submitting it again.






