跳转到主要内容
POST
/
producer
/
audios
音频生成
curl --request POST \
  --url https://api.mountsea.ai/producer/audios \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data @- <<EOF
{
  "action": "create_music",
  "soundPrompt": "driving energetic beat, rapid rhythm, high BPM",
  "lyrics": "[Verse 1]\nI've been running in circles...\n\n[Chorus]\nI keep coming back to you...",
  "title": "Back to You",
  "model": "Lyria 3 Pro",
  "seed": 877369,
  "makeInstrumental": false,
  "imageUrl": "https://example.com/cover.jpg"
}
EOF
{
  "taskId": "<string>"
}
使用 Google DeepMind 的 Lyria 3 Pro 模型生成音乐。提供音效提示来描述所需风格,和/或提供歌词来创作原创曲目。
这是一个异步任务。响应中包含一个 taskId — 使用获取任务状态来轮询生成的音频。

提示

  • 音效提示:描述音乐风格、氛围、乐器和节奏(例如 "emotional pop with gentle piano, warm synths, and a catchy beat"
  • 歌词:使用段落标签如 [Verse][Chorus][Bridge] 来获得结构化输出
  • 图片引导:提供 imageUrl 让模型从图片中推断氛围和风格
  • 纯器乐:设置 makeInstrumental: true 生成无人声曲目
  • 可重复性:使用 seed 进行确定性生成 — 相同的 seed + 相同的参数 = 相同的输出

授权

Authorization
string
header
必填

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

请求体

application/json
action
enum<string>
必填

Action type to perform

可用选项:
create_music
示例:

"create_music"

soundPrompt
string

Sound/style prompt describing the desired music style

示例:

"driving energetic beat, rapid rhythm, high BPM"

lyrics
string

Lyrics content with section tags like [Verse], [Chorus], etc. For create_music: either soundPrompt or lyrics should be provided. Set makeInstrumental=true to ignore lyrics.

示例:

"[Verse 1]\nI've been running in circles...\n\n[Chorus]\nI keep coming back to you..."

title
string

Song title (max 80 characters)

Maximum string length: 80
示例:

"Back to You"

model
enum<string>

Music generation model (currently only Lyria 3 Pro)

可用选项:
Lyria 3 Pro
示例:

"Lyria 3 Pro"

seed
number

Random seed for reproducible generation

示例:

877369

makeInstrumental
boolean

Generate instrumental only (ignores lyrics). Default: false

示例:

false

imageUrl
string

Image URL for image-guided generation (will be uploaded automatically)

示例:

"https://example.com/cover.jpg"

响应

任务创建成功

taskId
string
必填

任务 ID,用于后续查询结果