Skill: gamaleldientarek/seedream-5-byteplus (version 0.1.0)

--- name: seedream-5-byteplus description: Generate images with Seedream 5 through the BytePlus Ark API using a direct API key. Use when the user wants Seedream 5 image generation, mentions BytePlus Ark, Seedream, or has a Seedream/Ark API key. If the user asks for a specific format, poster, wallpaper, social post, or exact dimensions, ask for the required size or aspect ratio before generating. --- # Seedream 5 via BytePlus Ark Generate images through **BytePlus Ark** using the bundled script in `scripts/seedream-generate.sh`. ## Quick start 1. Ensure `SEEDREAM_API_KEY` is available in the environment or in `/root/.clawdbot/.env`. 2. Run: ```bash /root/clawd/skills/seedream-5-byteplus/scripts/seedream-generate.sh "your prompt here" [output-file] ``` Example: ```bash /root/clawd/skills/seedream-5-byteplus/scripts/seedream-generate.sh \ "A cinematic scene of a monkey sitting proudly on top of a red Ferrari sports car" \ /root/clawd/output/seedream-monkey-ferrari.jpg ``` The script prints the saved file path on success. ## When to use this skill Use this skill when: - The user has a **Seedream / BytePlus Ark API key** - The user wants **Seedream 5** specifically - The user mentions **BytePlus Ark**, **Seedream**, or `seedream-5-0-260128` Do **not** use this skill for: - Black Forest Labs direct FLUX API - fal.ai keys (`FAL_KEY`) - OpenAI image generation - Google Gemini image generation ## Ask about size when needed If the user clearly needs a specific layout or delivery format, ask for the target size or aspect ratio before generating. Examples: - social post - story / reel cover - wallpaper - poster - banner - print asset - exact pixel dimensions If the user does not care, use the default size. ## Default behavior The script defaults to: - model: `seedream-5-0-260128` - size: `2K` - response format: `url` - watermark: `false` Override these with environment variables before running: ```bash export SEEDREAM_MODEL=seedream-5-0-260128 export SEEDREAM_SIZE=1K ``` Then call the script normally. ## How it works The script sends a POST request to the BytePlus Ark image generation endpoint, extracts the returned image URL, and downloads the image locally. ## Troubleshooting - If the script says `SEEDREAM_API_KEY not set`, add the key to the environment first. - If generation fails, inspect the JSON returned by the API; the script prints it to stderr. - If the provider returns no image URL, inspect the raw response to confirm the response schema. ## scripts/ - `scripts/seedream-generate.sh` — direct Seedream 5 image generation via BytePlus Ark API

path: scripts/seedream-generate.sh
content: #!/usr/bin/env bash
set -euo pipefail

if [[ -f /root/.clawdbot/.env ]]; then
  # shellcheck disable=SC1091
  source /root/.clawdbot/.env
fi

if [[ -z "${SEEDREAM_API_KEY:-}" ]]; then
  echo "Error: SEEDREAM_API_KEY not set" >&2
  exit 1
fi

PROMPT="${1:-}"
OUTFILE="${2:-/root/clawd/output/seedream-image-$(date +%s).jpg}"
MODEL="${SEEDREAM_MODEL:-seedream-5-0-260128}"
SIZE="${SEEDREAM_SIZE:-2K}"

if [[ -z "$PROMPT" ]]; then
  echo "Usage: $0 \"prompt\" [outfile]" >&2
  exit 1
fi

mkdir -p "$(dirname "$OUTFILE")"

PAYLOAD=$(python3 - "$MODEL" "$PROMPT" "$SIZE" <<'PY'
import json, sys
model, prompt, size = sys.argv[1], sys.argv[2], sys.argv[3]
print(json.dumps({
  "model": model,
  "prompt": prompt,
  "sequential_image_generation": "disabled",
  "response_format": "url",
  "size": size,
  "stream": False,
  "watermark": False,
}))
PY
)

RESP=$(curl -sS -X POST 'https://ark.ap-southeast.bytepluses.com/api/v3/images/generations' \
  -H 'Content-Type: application/json' \
  -H "Authorization: Bearer ${SEEDREAM_API_KEY}" \
  -d "$PAYLOAD")

IMAGE_URL=$(python3 - "$RESP" <<'PY'
import json, sys
obj = json.loads(sys.argv[1])
if isinstance(obj.get('data'), list) and obj['data']:
    item = obj['data'][0]
    print(item.get('url',''))
else:
    print(obj.get('url',''))
PY
)

if [[ -z "$IMAGE_URL" ]]; then
  echo "Seedream request failed:" >&2
  echo "$RESP" >&2
  exit 1
fi

curl -sS "$IMAGE_URL" -o "$OUTFILE"
echo "$OUTFILE"


Security scan verdicts — ClawScan: clean | static analysis: clean | VirusTotal: clean | SkillSpector: clean (LOW)