Skip to content

About

Seedream 5.5 API and Seedream 5.0 Pro API Python SDK for ByteDance image generation, editing, transparent backgrounds, and layer decomposition.

Topics

Resources

Stars

3 stars

Watchers

0 watching

Forks

Latest commit

Β 

History

4 Commits

Folders and files

Repository files navigation

Seedream 5.5 API and Seedream 5 Pro API: Python SDK for ByteDance Image Generation

Powered by MuAPI

PyPI version GitHub stars License: MIT Python 3.7+

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

Related Projects

Seedream 5.5 API: Python SDK, Endpoints, and Quick Start

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.

Generate an image with the Seedream 5.5 API

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)

Seedream 5.5 API endpoints

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.

Seedream 5.5 text-to-image API request

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"
  }'

Edit images with the Seedream 5.5 API

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)

Decompose an image into layers

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.

πŸš€ Why Use Seedream 5.0 Pro API?

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.

🌟 Key Features of Seedream 5.0 Pro API

  • βœ… 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:4 and more.
  • βœ… Flexible Resolutions: 1K, 2K, and 4K output sizes.
  • βœ… Multi-Image Generation: Generate up to 4 images per request with num_images.
  • βœ… Reproducible Seeds: Pass a seed for 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.

πŸ›  Installation

From GitHub (includes the Seedream 5.5 methods)

pip install git+https://github.com/Anil-matcha/Seedream-5-Pro-API.git

Existing PyPI release

The 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

From Source

# 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.txt

Configuration

Create a .env file in the root directory and add your MuAPI API key:

MUAPI_API_KEY=your_muapi_api_key_here

πŸ€– Seedream 5.5 and Seedream 5.0 Pro MCP Server

Use 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.

Running the MCP Server

  1. Ensure MUAPI_API_KEY is set in your environment.
  2. Run the server:
    python3 mcp_server.py
  3. To test with the MCP Inspector:
    npx -y @modelcontextprotocol/inspector python3 mcp_server.py

πŸ’» Quick Start with Seedream 5.0 Pro API (Python)

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]}")

πŸ“‘ API Endpoints & Reference

1. Seedream 5.0 Pro Text-to-Image

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
  }'

2. Seedream 5.0 Pro Edit (Image-to-Image)

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"
  }'

3. Seedream 5.0 (Base) Text-to-Image

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")

4. Seedream 5.0 (Base) Edit

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"],
)

5. Seedream 4.5 Text-to-Image

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"
  }'

6. Seedream 4.5 Edit

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"],
)

7. Seedream v4 Text-to-Image

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")

8. Seedream v4 Edit

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"],
)

9. Seedream v3 Text-to-Image

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")

πŸ“– Documentation & Guides

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.

πŸ”— Official Resources

πŸ“„ License

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.

About

Seedream 5.5 API and Seedream 5.0 Pro API Python SDK for ByteDance image generation, editing, transparent backgrounds, and layer decomposition.

Topics

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages