Seedream 5.0 Lite: Image-to-Image Serverless API

Transform images intelligently with detailed text prompts.

~46.51s
$0.035 per generation
 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

POSThttps://api.segmind.com/v1/seedream-v5-lite-image-to-image

Parameters

promptrequired
string

Describe the desired image transformation or style change.

aspect_ratiooptional
string

Image aspect ratio. 16:9 for widescreen, 1:1 for square.

Default: "16:9"
Allowed values :
"1:1""4:3""3:4""16:9""9:16""3:2""2:3""21:9"
image_inputoptional
string[]

Input images to guide creation, Upto 10 Images for reference.

max_imagesoptional
integer

Number of images to generate. Use 1 for single output.

Default: 1Range: 1 - 15
optimize_promptoptional
string

Select optimization mode: 'fast' for quicker results, 'standard' for detailed transformation.

Default: "fast"
Allowed values :
"standard""fast"
sizeoptional
string

Image resolution. 2K for moderate detail, 3K for fine detail.

Default: "3K"
Allowed values :
"2K""3K"
watermarkoptional
boolean

Add watermark to output. Set false to keep images clean.

Default: false

Response Type

Returns: Image

Common Error Codes

The API returns standard HTTP status codes. Detailed error messages are provided in the response body.

400

Bad Request

Invalid parameters or request format

401

Unauthorized

Missing or invalid API key

403

Forbidden

Insufficient permissions

404

Not Found

Model or endpoint not found

406

Insufficient Credits

Not enough credits to process request

429

Rate Limited

Too many requests

500

Server Error

Internal server error

502

Bad Gateway

Service temporarily unavailable

504

Timeout

Request timed out