Seedream 5.0 Lite: Image-to-Image Serverless API

Transform images intelligently with detailed text prompts.

~45.56s
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)

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

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. 1
    POST /v2/seedream-v5-lite-image-to-image

    Submitreturns request_id, status_url, response_url

  2. 2
    GET /v2/requests/{id}/status

    Polluntil COMPLETED or FAILED

  3. 3
    GET /v2/requests/{id}

    Resultfinal response body

Status states

QUEUEDAccepted, waiting for a worker
PROCESSINGRunning on a worker
COMPLETEDDone — result body is ready
FAILEDErrored (incl. content/RAI blocks)
  • 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.

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