Seedream 4.0 文生圖 API
描述圖像內容(最多 300 個中文字或 600 個英文單字)
Output image size preset. Model auto-determines dimensions from prompt. Total pixels must be in [921,600 ~ 16,777,216], aspect ratio [1:16 ~ 16:1]
結果
結果將顯示在此處
費用: $0.03/張圖片
Seedream 4.0 API 實作指南
Seedream 4.0 API 文件
請先在演練場執行,再開啟完整 API 文件查看整合細節。
簡介
支援多圖輸入的高品質文字生成圖像
程式碼範例
1curl -X POST https://api.modelhunter.ai/api/v1/seedream/text-to-image \2-H "Authorization: Bearer YOUR_API_KEY" \3-H "Content-Type: application/json" \4-d '{5"model": "seedream-4-0",6"input": {7"prompt": "A futuristic cityscape at sunset with neon signs",8"size": "2K"9}10}'
Schema
查看完整 API 文件輸入
model此能力對應的模型 ID。
值: seedream-4-0
prompt描述圖像內容(最多 300 個中文字或 600 個英文單字)
sizeOutput image size preset. Model auto-determines dimensions from prompt. Total pixels must be in [921,600 ~ 16,777,216], aspect ratio [1:16 ~ 16:1]
選項: 1K, 2K, 4K
預設值: 2K
widthCustom width in pixels (alternative to size). Total pixels (w×h) must be in [921,600 ~ 16,777,216], aspect ratio [1:16 ~ 16:1], 128-aligned
heightCustom height in pixels (alternative to size). Total pixels (w×h) must be in [921,600 ~ 16,777,216], aspect ratio [1:16 ~ 16:1], 128-aligned
watermark浮水印
預設值: true
optimize_prompt增強提示詞以獲得更好的生成結果
選項: standard, fast
response_format回應格式
選項: url
預設值: url
webhookUrl任務完成時接收 Webhook 通知的 URL。
metadata附加到任務上用於追蹤的自訂鍵值中繼資料。
回應 (HTTP 202)
success請求是否已成功受理。
data.id唯一任務 ID,可輪詢 GET /api/v1/tasks/{id} 取得結果。
data.status任務狀態: pending, processing, completed, failed.
data.type生成類型: text-to-image.
data.provider供應商: seedream.
data.model本次生成使用的模型 ID。
data.created_at任務建立時間(ISO 8601)。
data.estimated_seconds任務完成前的預估秒數。