Seedream 5.0 Lite: Image-to-Image Serverless API
Transform images intelligently based on detailed prompts, enhancing creativity and precision in visual design.
1import requests
2import json
3
4url = "https://api.segmind.com/v1/seedream-v5-lite-image-to-image"
5headers = {
6 "x-api-key": "YOUR_API_KEY",
7 "Content-Type": "application/json"
8}
9
10data = {
11 "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.",
12 "image_input": [
13 "https://segmind-resources.s3.amazonaws.com/input/c89647be-0069-4ea5-8a4c-3e33008a4db0-164dada0-e4fb-4e86-acfc-69f76cbb3028.jpeg",
14 "https://segmind-resources.s3.amazonaws.com/input/c822c946-eee0-46cf-8bdc-58ccadcf8209-finale.jpeg"
15 ],
16 "aspect_ratio": "16:9",
17 "size": "3K",
18 "max_images": 1,
19 "optimize_prompt": "fast",
20 "watermark": false
21}
22
23response = requests.post(url, headers=headers, json=data)
24
25if response.status_code == 200:
26 result = response.json()
27 print(json.dumps(result, indent=2))
28else:
29 print(f"Error: {response.status_code}")
30 print(response.text) 1import requests
2import json
3
4url = "https://api.segmind.com/v1/seedream-v5-lite-image-to-image"
5headers = {
6 "x-api-key": "YOUR_API_KEY",
7 "Content-Type": "application/json"
8}
9
10data = {
11 "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.",
12 "image_input": [
13 "https://segmind-resources.s3.amazonaws.com/input/c89647be-0069-4ea5-8a4c-3e33008a4db0-164dada0-e4fb-4e86-acfc-69f76cbb3028.jpeg",
14 "https://segmind-resources.s3.amazonaws.com/input/c822c946-eee0-46cf-8bdc-58ccadcf8209-finale.jpeg"
15 ],
16 "aspect_ratio": "16:9",
17 "size": "3K",
18 "max_images": 1,
19 "optimize_prompt": "fast",
20 "watermark": false
21}
22
23response = requests.post(url, headers=headers, json=data)
24
25if response.status_code == 200:
26 result = response.json()
27 print(json.dumps(result, indent=2))
28else:
29 print(f"Error: {response.status_code}")
30 print(response.text)API Endpoint
https://api.segmind.com/v1/seedream-v5-lite-image-to-imageParameters
promptrequiredstringDescribe the desired transformation. For example, 'Convert to watercolor style with soft edges'.
aspect_ratiooptionalstringSet the image aspect ratio. Choose '16:9' for widescreen displays or '1:1' for square images.
"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_imagesoptionalintegerSpecify the number of images to generate. Use '3' for variations or '1' for a single output.
1Range: 1 - 15optimize_promptoptionalstringSelect optimization mode: 'fast' for quicker results, 'standard' for detailed transformation.
"fast""standard""fast"sizeoptionalstringChoose image resolution; '3K' is ideal for detailed images, while '2K' suits moderate detail.
"3K""2K""3K"watermarkoptionalbooleanAdd a watermark for protecting your content or set to 'false' to keep it watermark-free.
falseResponse Type
Returns: Image
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