This Python SDK supports the Seedream 5.5 API and the separate Seedream 5.0 Pro API from ByteDance through MuAPI. Generate images, edit up to 10 reference images, and split a flat image into transparent layers with Seedream 5.5. Existing Seedream 5.0 Pro methods remain available for workflows that need its 4K output.
Model version note: Seedream 5.5 and Seedream 5.0 Pro are different model versions with different API endpoints and parameters. ByteDance says a Seedream 5.5 Pro version will follow; this repository's 5.5 methods use the currently available Seedream 5.5 endpoints. See the ByteDance Seedream 5.5 announcement.
β Seedream 5.0 Pro (a.k.a. Seedream 5 Pro API, Seedream v5.0 Pro) is ByteDance's flagship text-to-image model β up to 4K resolution, complex scene construction, consistent character generation, and real-time knowledge integration for accurate, contextually relevant visuals.
- π§ͺ Try Seedream 5.0 Pro now: Text-to-Image Playground Β· Edit Playground
- π¨ This wrapper also supports the base Seedream 5.0, Seedream 4.5, Seedream v4, and Seedream v3 models for teams that need version pinning.
π Also explore these top AI generation models:
- π¬ Seedance 2.0 API β ByteDance's video generation model, Text-to-Video & Image-to-Video
- π HappyHorse 1.0 API β Alibaba's #1 ranked video model (1392 Elo I2V)
- π¬ Veo 4 API β Google DeepMind's native 4K video model
- Seedance-2-API β Python wrapper for ByteDance's Seedance 2.0 video generation API
- awesome-seedance-2.5-api-prompts β Curated Seedance 2.5 API guide and prompts
- Awesome-GPT-Image-2-API-Prompts β Curated GPT-Image-2 prompts for the OpenAI API
- gpt-image-2-comfyui β ComfyUI custom nodes for GPT-Image-2
Use the Seedream 5.5 API through three MuAPI endpoints: text-to-image generation, image editing, and layer decomposition. Seedream 5.5 supports 1K, 1.5K, and 2K output, eight aspect ratios, PNG or JPEG output, and a background option for transparent PNG assets. The MuAPI Seedream 5.5 guide has current endpoint details and pricing.
from seedream_api import SeedreamAPI
api = SeedreamAPI() # reads MUAPI_API_KEY from the environment or .env
submission = api.text_to_image_v5_5(
prompt="A glass perfume bottle on pale travertine, soft morning light",
aspect_ratio="4:3",
resolution="2K",
background="transparent",
)
result = api.wait_for_completion(submission["request_id"])
print(result)| Workflow | Endpoint | Python method | Notes |
|---|---|---|---|
| Text-to-image | POST /api/v1/seedream-5.5 |
text_to_image_v5_5() |
8 ratios; 1K, 1.5K, or 2K; PNG or JPEG; transparent background option |
| Image editing | POST /api/v1/seedream-5.5-edit |
edit_image_v5_5() |
Up to 10 reference image URLs; omit aspect_ratio to keep the first image's ratio |
| Layer decomposition | POST /api/v1/seedream-5.5-layer |
decompose_layers_v5_5() |
One input image; returns a base image and transparent layers |
All three endpoints return an asynchronous task with a request_id. Use wait_for_completion() or get_result() to retrieve the result. For layer decomposition, the max_images parameter is the number of output slots requested and billing follows that value, even when fewer layers are returned.
curl -X POST "https://api.muapi.ai/api/v1/seedream-5.5" \
-H "Content-Type: application/json" \
-H "x-api-key: $MUAPI_API_KEY" \
-d '{
"prompt": "A frosted glass serum bottle on wet travertine stone, soft morning light",
"aspect_ratio": "4:3",
"resolution": "2K",
"output_format": "png",
"background": "transparent"
}'submission = api.edit_image_v5_5(
prompt="Remove the background and preserve the product edges",
images_list=["https://example.com/product.png"],
background="transparent",
)
result = api.wait_for_completion(submission["request_id"])
print(result)submission = api.decompose_layers_v5_5(
image_url="https://example.com/poster.png",
prompt="Separate the headline, product photo, and border",
max_images=6,
)
result = api.wait_for_completion(submission["request_id"])
print(result)The Seedream 5.5 API accepts aspect ratios 1:1, 4:3, 3:4, 16:9, 9:16, 2:3, 3:2, and 21:9. For transparent output, use output_format="png" with background="transparent". In image editing, images_list accepts up to 10 reference image URLs. Layer decomposition accepts one source image; max_images can be set from 2 to 100.
Try the Seedream 5.5 API on MuAPI or read ByteDance's Seedream 5.5 model overview.
Seedream 5.0 Pro is ByteDance's flagship text-to-image and image-editing model, offering maximum fidelity, prompt adherence, and typography accuracy.
- 4K Resolution: Generate ultra-high-fidelity images up to native 4K.
- Advanced Visual Reasoning: Handles complex, multi-subject scene construction with strong prompt adherence.
- Precise Typography: Renders legible, accurate text and logos inside generated images β ideal for posters, UI mockups, and product visuals.
- Consistent Character Generation: Maintain the same subject/character across multiple generations.
- Natural-Language Image Editing: Style transfer (Anime, Cyberpunk, Fantasy), background swaps, and object modification via
edit_image()β no masking required. - Developer-First: Fast processing via the MuAPI infrastructure with a simple Python SDK and MCP server.
- β
Seedream 5.0 Pro Text-to-Image: Transform descriptive prompts into 4K AI images with
text_to_image(). - β
Seedream 5.0 Pro Edit: Edit existing images using natural language with
edit_image()β preserves lighting, color tones, and character consistency. - β
Multiple Aspect Ratios:
1:1,16:9,9:16,4:3,3:4and more. - β
Flexible Resolutions:
1K,2K, and4Koutput sizes. - β
Multi-Image Generation: Generate up to 4 images per request with
num_images. - β
Reproducible Seeds: Pass a
seedfor deterministic, repeatable generations. - β
File Upload: Directly upload local images using
upload_file()for use in edit tasks. - β Base & Legacy Version Support: Also wraps base Seedream 5.0, Seedream 4.5, Seedream v4, and Seedream v3 for version-pinned pipelines.
- β MCP Server Included: Use Seedream 5.0 Pro as a Model Context Protocol server with Claude Desktop, Cursor, or any MCP client.
pip install git+https://github.com/Anil-matcha/Seedream-5-Pro-API.gitThe published PyPI release may not include the newest Seedream 5.5 methods yet. Install it for the existing Seedream 5.0 Pro wrapper:
pip install seedream-5-pro-api# Clone the Seedream 5.0 Pro API repository
git clone https://github.com/Anil-matcha/Seedream-5-Pro-API.git
cd Seedream-5-Pro-API
# Install required dependencies
pip install -r requirements.txtCreate a .env file in the root directory and add your MuAPI API key:
MUAPI_API_KEY=your_muapi_api_key_hereUse the included MCP (Model Context Protocol) server with Claude Desktop, Cursor, or another MCP client. It exposes Seedream 5.5 image generation, editing, and layer decomposition alongside the existing Seedream 5.0 Pro and older-version tools.
- Ensure
MUAPI_API_KEYis set in your environment. - Run the server:
python3 mcp_server.py
- To test with the MCP Inspector:
npx -y @modelcontextprotocol/inspector python3 mcp_server.py
from seedream_api import SeedreamAPI
# Initialize the Seedream 5.0 Pro client
api = SeedreamAPI()
# 1. Generate an image from text using Seedream 5.0 Pro API
print("Generating AI image using Seedream 5.0 Pro...")
submission = api.text_to_image(
prompt="A cinematic portrait of a cyberpunk samurai in a neon-lit Tokyo alley, 4k, hyperrealistic",
aspect_ratio="16:9",
size="4K",
)
# 2. Wait for completion
result = api.wait_for_completion(submission["request_id"])
print(f"Success! View your Seedream 5.0 Pro image here: {result['outputs'][0]}")
# 3. Edit an existing image using natural language
edit_submission = api.edit_image(
prompt="Change the outfit to samurai armor with gold trim, keep the face identical",
image_urls=["https://example.com/portrait.jpg"],
aspect_ratio="16:9",
)
edit_result = api.wait_for_completion(edit_submission["request_id"])
print(f"Edited image: {edit_result['outputs'][0]}")Endpoint: POST https://api.muapi.ai/api/v1/bytedance-seedream-v5.0-pro
curl --location --request POST "https://api.muapi.ai/api/v1/bytedance-seedream-v5.0-pro" \
--header "Content-Type: application/json" \
--header "x-api-key: YOUR_API_KEY" \
--data-raw '{
"prompt": "A majestic eagle soaring over the snow-capped Himalayas, 4k, cinematic lighting",
"aspect_ratio": "16:9",
"size": "4K",
"num_images": 1
}'Endpoint: POST https://api.muapi.ai/api/v1/bytedance-seedream-v5.0-pro-edit
curl --location --request POST "https://api.muapi.ai/api/v1/bytedance-seedream-v5.0-pro-edit" \
--header "Content-Type: application/json" \
--header "x-api-key: YOUR_API_KEY" \
--data-raw '{
"prompt": "Turn the background into a cyberpunk cityscape at night, keep the subject unchanged",
"image_urls": ["https://example.com/photo.jpg"],
"aspect_ratio": "16:9",
"size": "2K"
}'Endpoint: POST https://api.muapi.ai/api/v1/bytedance-seedream-v5.0
Python SDK:
result = api.text_to_image_v5(prompt="A quick draft of a mountain landscape at dawn")Endpoint: POST https://api.muapi.ai/api/v1/bytedance-seedream-v5.0-edit
Python SDK:
result = api.edit_image_v5(
prompt="Add fog rolling through the valley",
image_urls=["https://example.com/landscape.jpg"],
)Endpoint: POST https://api.muapi.ai/api/v1/bytedance-seedream-v4.5
curl --location --request POST "https://api.muapi.ai/api/v1/bytedance-seedream-v4.5" \
--header "Content-Type: application/json" \
--header "x-api-key: YOUR_API_KEY" \
--data-raw '{
"prompt": "A surreal sci-fi cityscape floating above the clouds, photoreal, cinematic",
"aspect_ratio": "1:1",
"size": "2K"
}'Endpoint: POST https://api.muapi.ai/api/v1/bytedance-seedream-v4.5-edit
Python SDK:
result = api.edit_image_v4_5(
prompt="Replace the sky with a dramatic sunset",
image_urls=["https://example.com/landscape.jpg"],
)Endpoint: POST https://api.muapi.ai/api/v1/bytedance-seedream-v4
Python SDK:
result = api.text_to_image_v4(prompt="A fantasy castle on a floating island, artstation quality")Endpoint: POST https://api.muapi.ai/api/v1/bytedance-seedream-v4-edit
Python SDK:
result = api.edit_image_v4(
prompt="Change the season from summer to winter",
image_urls=["https://example.com/scene.jpg"],
)Endpoint: POST https://api.muapi.ai/api/v1/bytedance-seedream-v3
Python SDK:
result = api.text_to_image_v3(prompt="An anime-style portrait of a warrior princess, vibrant colors")| Method | Parameters | Description |
|---|---|---|
text_to_image_v5_5 |
prompt, aspect_ratio, resolution, output_format, background |
Generate an image with the Seedream 5.5 API. |
edit_image_v5_5 |
prompt, images_list, aspect_ratio, resolution, output_format, background |
Edit up to 10 reference images with Seedream 5.5 Edit. |
decompose_layers_v5_5 |
image_url, prompt, resolution, max_images, output_format |
Split an image into a base image and transparent layers with Seedream 5.5. |
text_to_image |
prompt, aspect_ratio, size, num_images, seed |
Generate a 4K image from text using Seedream 5.0 Pro. |
edit_image |
prompt, image_urls, aspect_ratio, size, seed |
Edit an existing image using natural language via Seedream 5.0 Pro Edit. |
text_to_image_v5 |
prompt, aspect_ratio, size, num_images, seed |
Generate an image using base Seedream 5.0. |
edit_image_v5 |
prompt, image_urls, aspect_ratio, size, seed |
Edit an image using base Seedream 5.0 Edit. |
text_to_image_v4_5 |
prompt, aspect_ratio, size, num_images, seed |
Generate an image using Seedream 4.5. |
edit_image_v4_5 |
prompt, image_urls, aspect_ratio, size, seed |
Edit an image using Seedream 4.5 Edit. |
text_to_image_v4 |
prompt, aspect_ratio, size, num_images, seed |
Generate an image using Seedream v4. |
edit_image_v4 |
prompt, image_urls, aspect_ratio, size, seed |
Edit an image using Seedream v4 Edit. |
text_to_image_v3 |
prompt, aspect_ratio, size, num_images, seed |
Generate an image using Seedream v3. |
upload_file |
file_path |
Upload a local image to MuAPI for use in edit tasks. |
get_result |
request_id |
Check task status for a Seedream generation task. |
wait_for_completion |
request_id, poll_interval, timeout |
Blocking helper for Seedream generation tasks. |
- Seedream 5.5 API: MuAPI model guide and pricing Β· ByteDance model overview Β· ByteDance launch announcement
- Playground β Seedream 5.0 Pro: Text-to-Image Β· Edit
- Playground β Seedream 5.0 (Base): Text-to-Image Β· Edit
- Playground β Seedream 4.5: Text-to-Image Β· Edit
- Playground β Seedream v4: Text-to-Image Β· Edit
- API Provider: MuAPI.ai
This project is licensed under the MIT License - see the LICENSE file for details.
Keywords: Seedream 5.5 API, Seedream 5.5 Python SDK, Seedream 5.5 image generation API, Seedream 5.5 image editing API, Seedream 5.5 layer decomposition API, Seedream transparent background API, Seedream 5.0 Pro API, Seedream 5 Pro API, Seedream v5.0 Pro, ByteDance Seedream, Seedream AI, Seedream Text-to-Image, Seedream Image Editing, Seedream Python SDK, Seedream API Python, Seedream 5.0 Pro Python Wrapper, AI Image Generator, Text-to-Image API, Image-to-Image API, 4K AI Image Generation, Seedream 5.0 API, Seedream 4.5 API, Seedream v4 API, Seedream v3 API, MuAPI, Image Generation API, AI Art Generator, ByteDance Image AI, Seedream API Documentation, Seedream Character Consistency, Seedream Typography, Python Image Generation API, Seedream 5.0 Pro Tutorial, Seedream 5.0 Pro Edit API.