SuperAPI AI Directory

seedream

Coding & development

View repository

Updated 10-15 20:29

About this skill

Seedream

This Skill encapsulates the Volcengine Seedream-4.5 image generation capability, supporting the generation of high-quality AI images through text prompts or reference images.

Usage

Text-to-Image

Generate a single image (default resolution):

uv run {baseDir}/scripts/generate_image.py --prompt "一只赛博朋克风格的猫" --api-key YOUR_API_KEY

Specify resolution (e.g., 2K, 4K, or specific pixels):

uv run {baseDir}/scripts/generate_image.py --prompt "壮丽的山川日出" --size "2K" --api-key YOUR_API_KEY

Image-to-Image

Provide a reference image URL:

uv run {baseDir}/scripts/generate_image.py --prompt "将其风格变为印象派" --image "https://example.com/input.jpg" --api-key YOUR_API_KEY

Generate Image Group

Generate a group of content-related images (up to 15 images):

uv run {baseDir}/scripts/generate_image.py --prompt "一个宇航员在不同行星上的探险经历" --sequential --max-images 4 --api-key YOUR_API_KEY

API Key Configuration

You can provide the API Key in the following ways:

  1. Command-line parameter --api-key
  2. Environment variable VOLC_API_KEY

Parameter Description

  • --prompt: (Required) The text description for image generation.
  • --model: (Optional) Model ID, defaults to doubao-seedream-4-5-251128。
  • --size: (Optional) Image size. Supports 2K, 4K or 2048x2048 and other formats.
  • --image: (Optional) Reference image URL or Base64 encoding.
  • --sequential: (Optional) Enable the image group generation feature.
  • --max-images: (Optional) The maximum number of images to generate in an image group (1-15).

Workflow

  1. Call the generate_image.py script.
  2. The script will output image links starting with MEDIA_URL: .
  3. Extract the links and display them using Markdown syntax:![Generated Image](URL)。
  4. Unless requested by the user, there is no need to download the images.

Notes

  • Seedream-4.5 supports Chinese and English prompts.
  • The image group feature is only effective in the Seedream-4.5/4.0 models.
  • Ensure that the provided image URL is publicly accessible.