Seedream 5.0 Lite: Image-to-Image Serverless API
Transform images intelligently with detailed text prompts.
POST /v2/seedream-v5-lite-image-to-image · submit + poll 1# pip install "segmind>=1.1.0"
2# export SEGMIND_API_KEY="YOUR_API_KEY"
3import segmind
4
5# Async (v2): submit to the queue and block until COMPLETED.
6# run() returns the final result dict (600s deadline, 1.0s poll by default).
7result = segmind.run(
8 "seedream-v5-lite-image-to-image",
9 prompt="Editorial street style fashion photograph of the model (image attached) standing against a textured gray stone wall. She wears an oversized brown wool coat (Image attached) with a sculptural silhouette, long drape, and minimal tailoring. Light beige trousers peek slightly from beneath the hem, complementing the look. \n In her hand, she carries a soft light bordeaux red leather tote bag with a minimal, refined design. Her hair is styled naturally, slightly tousled, framing her face with understated elegance. The scene includes subtle foreground blur, adding depth and a candid, cinematic atmosphere. \n Lighting is soft natural daylight with gentle shadow play across the stone wall, enhancing both texture and mood. The overall aesthetic is modern, architectural, and refined evoking quiet luxury in a timeless editorial campaign style.",
10 image_input=["https://segmind-resources.s3.amazonaws.com/input/c89647be-0069-4ea5-8a4c-3e33008a4db0-164dada0-e4fb-4e86-acfc-69f76cbb3028.jpeg", "https://segmind-resources.s3.amazonaws.com/input/c822c946-eee0-46cf-8bdc-58ccadcf8209-finale.jpeg"],
11 aspect_ratio="16:9",
12 size="3K",
13 max_images=1,
14 optimize_prompt="fast",
15 watermark=False,
16)
17print(result["status"]) # COMPLETED
18print(result.get("output")) # model output (e.g. media URL)
19print(result["metrics"]["inference_time"]) # server compute seconds
20
21# --- Or submit + poll manually (track request_id, control the cadence) ---
22from segmind import SegmindClient, InferenceFailed, InferenceTimeout
23
24client = SegmindClient() # reads SEGMIND_API_KEY
25payload = {
26 "prompt": "Editorial street style fashion photograph of the model (image attached) standing against a textured gray stone wall. She wears an oversized brown wool coat (Image attached) with a sculptural silhouette, long drape, and minimal tailoring. Light beige trousers peek slightly from beneath the hem, complementing the look. \n In her hand, she carries a soft light bordeaux red leather tote bag with a minimal, refined design. Her hair is styled naturally, slightly tousled, framing her face with understated elegance. The scene includes subtle foreground blur, adding depth and a candid, cinematic atmosphere. \n Lighting is soft natural daylight with gentle shadow play across the stone wall, enhancing both texture and mood. The overall aesthetic is modern, architectural, and refined evoking quiet luxury in a timeless editorial campaign style.",
27 "image_input": ["https://segmind-resources.s3.amazonaws.com/input/c89647be-0069-4ea5-8a4c-3e33008a4db0-164dada0-e4fb-4e86-acfc-69f76cbb3028.jpeg", "https://segmind-resources.s3.amazonaws.com/input/c822c946-eee0-46cf-8bdc-58ccadcf8209-finale.jpeg"],
28 "aspect_ratio": "16:9",
29 "size": "3K",
30 "max_images": 1,
31 "optimize_prompt": "fast",
32 "watermark": False,
33}
34job = client.submit_async("seedream-v5-lite-image-to-image", **payload)
35print(job.request_id) # available immediately
36try:
37 result = job.wait(timeout=600, interval=1.0)
38except InferenceTimeout as e:
39 print("still running:", e.request_id)
40except InferenceFailed as e:
41 print("failed:", e.detail) 1# pip install "segmind>=1.1.0"
2# export SEGMIND_API_KEY="YOUR_API_KEY"
3import segmind
4
5# Async (v2): submit to the queue and block until COMPLETED.
6# run() returns the final result dict (600s deadline, 1.0s poll by default).
7result = segmind.run(
8 "seedream-v5-lite-image-to-image",
9 prompt="Editorial street style fashion photograph of the model (image attached) standing against a textured gray stone wall. She wears an oversized brown wool coat (Image attached) with a sculptural silhouette, long drape, and minimal tailoring. Light beige trousers peek slightly from beneath the hem, complementing the look. \n In her hand, she carries a soft light bordeaux red leather tote bag with a minimal, refined design. Her hair is styled naturally, slightly tousled, framing her face with understated elegance. The scene includes subtle foreground blur, adding depth and a candid, cinematic atmosphere. \n Lighting is soft natural daylight with gentle shadow play across the stone wall, enhancing both texture and mood. The overall aesthetic is modern, architectural, and refined evoking quiet luxury in a timeless editorial campaign style.",
10 image_input=["https://segmind-resources.s3.amazonaws.com/input/c89647be-0069-4ea5-8a4c-3e33008a4db0-164dada0-e4fb-4e86-acfc-69f76cbb3028.jpeg", "https://segmind-resources.s3.amazonaws.com/input/c822c946-eee0-46cf-8bdc-58ccadcf8209-finale.jpeg"],
11 aspect_ratio="16:9",
12 size="3K",
13 max_images=1,
14 optimize_prompt="fast",
15 watermark=False,
16)
17print(result["status"]) # COMPLETED
18print(result.get("output")) # model output (e.g. media URL)
19print(result["metrics"]["inference_time"]) # server compute seconds
20
21# --- Or submit + poll manually (track request_id, control the cadence) ---
22from segmind import SegmindClient, InferenceFailed, InferenceTimeout
23
24client = SegmindClient() # reads SEGMIND_API_KEY
25payload = {
26 "prompt": "Editorial street style fashion photograph of the model (image attached) standing against a textured gray stone wall. She wears an oversized brown wool coat (Image attached) with a sculptural silhouette, long drape, and minimal tailoring. Light beige trousers peek slightly from beneath the hem, complementing the look. \n In her hand, she carries a soft light bordeaux red leather tote bag with a minimal, refined design. Her hair is styled naturally, slightly tousled, framing her face with understated elegance. The scene includes subtle foreground blur, adding depth and a candid, cinematic atmosphere. \n Lighting is soft natural daylight with gentle shadow play across the stone wall, enhancing both texture and mood. The overall aesthetic is modern, architectural, and refined evoking quiet luxury in a timeless editorial campaign style.",
27 "image_input": ["https://segmind-resources.s3.amazonaws.com/input/c89647be-0069-4ea5-8a4c-3e33008a4db0-164dada0-e4fb-4e86-acfc-69f76cbb3028.jpeg", "https://segmind-resources.s3.amazonaws.com/input/c822c946-eee0-46cf-8bdc-58ccadcf8209-finale.jpeg"],
28 "aspect_ratio": "16:9",
29 "size": "3K",
30 "max_images": 1,
31 "optimize_prompt": "fast",
32 "watermark": False,
33}
34job = client.submit_async("seedream-v5-lite-image-to-image", **payload)
35print(job.request_id) # available immediately
36try:
37 result = job.wait(timeout=600, interval=1.0)
38except InferenceTimeout as e:
39 print("still running:", e.request_id)
40except InferenceFailed as e:
41 print("failed:", e.detail)API Endpoint
https://api.segmind.com/v1/seedream-v5-lite-image-to-imageParameters
promptrequiredstringDescribe the desired image transformation or style change.
aspect_ratiooptionalstringImage aspect ratio. 16:9 for widescreen, 1:1 for square.
"16:9""1:1""4:3""3:4""16:9""9:16""3:2""2:3""21:9"image_inputoptionalstring[]Input images to guide creation, Upto 10 Images for reference.
max_imagesoptionalintegerNumber of images to generate. Use 1 for single output.
1Range: 1 - 15optimize_promptoptionalstringSelect optimization mode: 'fast' for quicker results, 'standard' for detailed transformation.
"fast""standard""fast"sizeoptionalstringImage resolution. 2K for moderate detail, 3K for fine detail.
"3K""2K""3K"watermarkoptionalbooleanAdd watermark to output. Set false to keep images clean.
falseResponse Type
Returns: Image
Asynchronous requests (v2)
Use Async for video, long-running (>~60s), or high-concurrency workloads; Sync is simplest for fast image & LLM calls. Async submits a request and you poll it to completion.
- 1
POST /v2/seedream-v5-lite-image-to-imageSubmit — returns request_id, status_url, response_url
- 2
GET /v2/requests/{id}/statusPoll — until COMPLETED or FAILED
- 3
GET /v2/requests/{id}Result — final response body
Status states
- A FAILED request is served as HTTP 422 — the body still carries the error detail.
- An unknown or expired request_id returns HTTP 404.
- Results are retained for 1 hour, then expire.
- Content / RAI blocks surface as FAILED, not a separate state.
- Track completion by polling the status endpoint.
Common Error Codes
The API returns standard HTTP status codes. Detailed error messages are provided in the response body.
Bad Request
Invalid parameters or request format
Unauthorized
Missing or invalid API key
Forbidden
Insufficient permissions
Not Found
Model or endpoint not found
Insufficient Credits
Not enough credits to process request
Rate Limited
Too many requests
Server Error
Internal server error
Bad Gateway
Service temporarily unavailable
Timeout
Request timed out