跳轉到主要內容

簡介

Producer 是 Ace Data Cloud 提供的 AI 音頻服務,FUZZ Producer AI 音樂生成。透過 Ace Data Cloud 統一 API,你可以使用 cURL 快速調用 Producer,實現文本生成音樂、自訂歌詞、歌曲續寫、翻唱、人聲分離、MV 生成等功能。

前置條件

  • 擁有 Ace Data Cloud 帳號並取得 API Token
  • 安裝了 cURL 的終端環境

基礎用法

調用 Producer API 的主端點為:
POST https://api.acedata.cloud/producer/audios
本範例使用 FUZZ-2.0 Pro 模型。 可用模型包括:FUZZ-2.0 ProFUZZ-2.0FUZZ-1.1 ProFUZZ-1.0 Pro 完整 cURL 指令範例:
curl -X POST https://api.acedata.cloud/producer/audios \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"action": "generate", "prompt": "A relaxing jazz piece for a coffee shop", "model": "FUZZ-2.0 Pro", "lyric": "[Verse]\nSoft piano keys in the morning light", "custom": true}'
請將 YOUR_API_TOKEN 替換為你在 Ace Data Cloud 平台取得的實際 Token。

回應範例

成功調用後返回 JSON 格式資料,例如:
{
  "status": "success",
  "data": {
    ...
  }
}

使用 jq 處理回應

建議使用 jq 工具格式化輸出:
curl -s -X POST https://api.acedata.cloud/producer/audios \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"action": "generate", "prompt": "A relaxing jazz piece for a coffee shop", "model": "FUZZ-2.0 Pro", "lyric": "[Verse]\nSoft piano keys in the morning light", "custom": true}' | jq .

錯誤處理

常見錯誤碼:
狀態碼說明
401認證失敗,請檢查 API Token
403餘額不足或無權限訪問
429請求頻率超限
500伺服器內部錯誤

下一步