ByteDance Seed logoImage

Seedream 5.0 Pro

ByteDance 的多模態圖像模型,可理解設計要求並編輯製作用途的圖像。

價格

Core 公開價格為即時報價,並非鎖定費率。

模型詳情
規格價格基準價參考價格 · 非 OneAster 報價折扣
1K
4.5 每 1 張圖片 點數4.5 每 1 張圖片 點數—
2K
9 每 1 張圖片 點數4.5 每 1 張圖片 點數—

線上試用

圖片生成器

模型

Seedream 5.0 Pro
設定

尚未生成圖片

輸入提示詞並按下生成,建立第一張 AI 圖片。

模型介紹

能力與規格

輸入類型
文字 · 圖片
輸出類型
圖片
分辨率
1K · 2K

Seedream 5.0 Pro 著重把創意需求轉成可用的圖像素材。官方發布資料說明了圖文一致性、結構連貫性、排版和複雜資訊視覺化方面的改進。

圖片生成圖像編輯

範例

串接 Seedream 5.0 Pro

管理 API 金鑰
  • Bash
  • cURL >= 8.4
  • jq >= 1.6
  • uuidgen
bash
set -euo pipefail
: "${ONEASTER_API_KEY:?Set ONEASTER_API_KEY}"
base=$(printf '%s' 'aHR0cHM6Ly9hcGkub25lYXN0ZXIuYWkvdjE=' | jq -Rr '@base64d')
intent="${ONEASTER_INTENT_ID:-$(uuidgen)}"
printf 'Keep this intent and input: %s\n' "$intent" >&2
body=$(printf '%s' 'eyJraW5kIjoiaW1hZ2UiLCJtb2RlbCI6InNlZWRyZWFtLTUuMC1wcm8iLCJpbnB1dCI6eyJwcm9tcHQiOiJBIHF1aWV0IG1vdW50YWluIGxha2UgYXQgc3VucmlzZSIsImFzcGVjdF9yYXRpbyI6IjE2OjkifX0=' | jq -Rr '@base64d')
work=$(mktemp -d)
trap 'rm -rf "$work"' EXIT
request() {
  curl --fail-with-body --silent --show-error --max-time 60 --max-filesize 8388608 \
    --header "Authorization: Bearer $ONEASTER_API_KEY" "$@"
}
if [ 'task' = 'sse' ]; then
  printf '%s' "$body" | request --no-buffer --request POST "$base/chat/completions" --header 'Content-Type: application/json' --header "Idempotency-Key: $intent" --data-binary @- |
  while IFS= read -r line; do
    case "$line" in
      'data: '*)
        data="${line#data: }"
        if [ "$data" = '[DONE]' ]; then touch "$work/done"; break; fi
        printf '%s\n' "$data" | jq -e 'if .error then error("Stream failed; inspect original intent") else . end' | jq -jr '.choices[]?.delta.content // empty'
        ;;
    esac
  done
  test -f "$work/done" || { printf 'Incomplete stream; keep intent %s\n' "$intent" >&2; exit 1; }
else
  if [ 'task' = 'transcription' ]; then
    [ -n "${ONEASTER_AUDIO_FILE:-}" ] || { printf 'Set ONEASTER_AUDIO_FILE to a PCM WAV file\n' >&2; exit 1; }
    size=$(wc -c < "$ONEASTER_AUDIO_FILE")
    [ "$size" -ge 44 ] && [ "$size" -le 8388608 ] || { printf 'PCM WAV must be 44 bytes to 8 MiB\n' >&2; exit 1; }
    request --request POST "$base/audio/transcriptions" --header "Idempotency-Key: $intent" \
      --form-string "model=$(printf '%s' "$body" | jq -er '.model')" \
      --form-string "language=$(printf '%s' "$body" | jq -r '.language // empty')" \
      --form 'file=@-;type=audio/wav;filename=input.wav' < "$ONEASTER_AUDIO_FILE" > "$work/accepted"
  else
    printf '%s' "$body" | request --request POST "$base/tasks" --header 'Content-Type: application/json' --header "Idempotency-Key: $intent" --data-binary @- > "$work/accepted"
  fi
  task=$(jq -er 'select(.success == true) | .data.id | select(test("^[0-9a-fA-F-]{36}$"))' "$work/accepted")
  deadline=$(( $(date +%s) + 600 ))
  complete=false
  while [ "$(date +%s)" -lt "$deadline" ]; do
    request "$base/tasks/$task" > "$work/task"
    state=$(jq -er 'select(.success == true) | .data.state' "$work/task")
    if [ "$state" = 'success' ]; then
      jq -e '.data.billing_state == "settled" and .data.artifact_available == true' "$work/task" > /dev/null
      case "$(jq -r '.data.kind' "$work/task")" in
        image) request "$base/tasks/$task/content" --output result.png;;
        music) request "$base/tasks/$task/content" --output result.mp3;;
        asr) jq -er '.data.artifact.text' "$work/task";;
        video) jq -er '.data.artifact.url' "$work/task";;
        *) printf 'Unsupported task kind\n' >&2; exit 1;;
      esac
      complete=true; break
    fi
    case "$state" in failed|rejected|unknown) printf 'Task %s ended: %s\n' "$task" "$state" >&2; exit 1;; esac
    sleep 2
  done
  [ "$complete" = true ] || { printf 'Polling deadline; retain task %s\n' "$task" >&2; exit 1; }
fi

常見問答

Seedream 5.0 Pro的規格來自哪裡?

下列資料列出模型能力的來源。串接前請向服務提供商確認目前的存取方式、請求限制和價格。

Seedream 5.0 Pro的規格來自哪裡?

使用須知

使用前請檢查生成結果。可用模式和請求限制因服務而異,串接前請查閱連結中的文件。

模型資料來源

  • Seedream 5.0 Pro引用