ElevenLabs Music

720.00积分起
ae_elevenlabs_music

根据文本提示或详细的作曲方案生成音乐,可设置歌词、风格、段落、时长和纯音乐曲目。

音频娱乐
720.00积分起

价格说明

720.00积分起
条件费用
指定时长或完整分段计划720.00积分/开始分钟
自动决定时长3600.00积分/次

按指定时长或自动时长模式计费。

起价适用于明确指定最低有效时长的成功调用;自动时长分支按上述固定费用收费。

工具参数

未传入的可选参数将使用平台默认值。

参数类型必填说明默认值
request_bodyobject是暂无参数说明。—
request_body.promptstring | unknown否The text prompt describing the music to generate—
request_body.output_formatenum (mp3_22050_32 | mp3_44100_32 | mp3_44100_64 | mp3_44100_96 | mp3_44100_128 | mp3_44100_192 | pcm_8000 | pcm_16000 | pcm_22050 | pcm_24000 | pcm_44100 | pcm_48000 | ulaw_8000 | alaw_8000 | opus_48000_32 | opus_48000_64 | opus_48000_96 | opus_48000_128 | opus_48000_192)否Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs.mp3_44100_128
request_body.music_length_msinteger | unknown否The length of the song to generate in milliseconds. Used only in conjunction with prompt. Must be between 3000ms and 600000ms. Optional - if not provided, the model will choose a length based on the prompt.—
request_body.composition_planobject | unknown否The composition plan for the music—
request_body.composition_plan.sectionsarray条件必填The sections of the song.—
request_body.composition_plan.sections[].linesarray是The lyrics of the section. Each line must be at most 200 characters long.—
request_body.composition_plan.sections[].duration_msinteger是The duration of the section in milliseconds. Must be between 3000ms and 120000ms.—
request_body.composition_plan.sections[].section_namestring是The name of the section. Must be between 1 and 100 characters.—
request_body.composition_plan.sections[].negative_local_stylesarray是The styles that should not be present in this section.—
request_body.composition_plan.sections[].positive_local_stylesarray是The styles that should be present in this section.—
request_body.composition_plan.negative_global_stylesarray条件必填The styles that should not be present in the entire song.—
request_body.composition_plan.positive_global_stylesarray条件必填The styles that should be present in the entire song.—
request_body.force_instrumentalboolean否If true, guarantees that the generated song will be instrumental. If false, the song may or may not be instrumental depending on the prompt. Can only be used with prompt.false
request_body.respect_sections_durationsboolean否Controls how strictly section durations in the composition_plan are enforced. It will only have an effect if it is used with composition_plan. When set to true, the model will precisely respect each section's duration_ms from the plan. When set to false, the model may adjust individual section durations which will generally lead to better generation quality and improved latency, while always preserving the total song duration from the plan.true

调用示例

提交任务并查询完成结果

POST/agent-api/v1/tool/executeX-Api-Key

先提交任务,再用返回的 task_id 查询,直至完成。

请求代码request.sh
curl --request POST \
  --url 'https://agentearth.ai/agent-api/v1/tool/execute?tool_name=ae_elevenlabs_music' \
  --header "X-Api-Key: $AGENTEARTH_API_KEY" \
  --header 'Content-Type: application/json' \
  --data-raw '{
  "params": {
    "request_body": {
      "composition_plan": {
        "negative_global_styles": [
          "spoken word",
          "talking",
          "narration",
          "speech",
          "recitation",
          "monotone",
          "chanting",
          "rap",
          "aggressive",
          "dark"
        ],
        "positive_global_styles": [
          "pop",
          "melodic",
          "sung vocals",
          "emotive female vocal",
          "melisma",
          "catchy singable melody",
          "bright uplifting",
          "mandopop"
        ],
        "sections": [
          {
            "duration_ms": 10000,
            "lines": [
              "上班族 想做近视手术呀",
              "纠结的不是价格 是请假呀",
              "其实不用纠结 一个双休就够啦"
            ],
            "negative_local_styles": [
              "talking",
              "spoken",
              "recitation"
            ],
            "positive_local_styles": [
              "melodic",
              "sung female vocal",
              "warm",
              "flowing melody"
            ],
            "section_name": "主歌"
          },
          {
            "duration_ms": 12500,
            "lines": [
              "不用请假 双休就够",
              "摘掉眼镜 换个清晰的世界哦",
              "不用请假 双休就够",
              "摘掉眼镜 去看更远的街"
            ],
            "negative_local_styles": [
              "talking",
              "spoken"
            ],
            "positive_local_styles": [
              "catchy hook",
              "melodic",
              "soaring melody",
              "bright female vocal",
              "sung"
            ],
            "section_name": "副歌"
          },
          {
            "duration_ms": 10000,
            "lines": [
              "激光手术 三趟就够啦",
              "检查加面诊 半天呀",
              "手术加休息 一天呀",
              "复查半天 就收工啦"
            ],
            "negative_local_styles": [
              "talking",
              "spoken",
              "recitation"
            ],
            "positive_local_styles": [
              "melodic",
              "clear sung female vocal",
              "upbeat",
              "flowing"
            ],
            "section_name": "主歌"
          },
          {
            "duration_ms": 10000,
            "lines": [
              "三条建议 你听好啦",
              "先看双休 倒排手术日呀",
              "检查当天 别安排费眼的活儿",
              "手术当天 有人陪 别开车啦"
            ],
            "negative_local_styles": [
              "talking",
              "spoken",
              "recitation",
              "rap"
            ],
            "positive_local_styles": [
              "melodic",
              "sung",
              "warm female vocal",
              "emotive",
              "melisma"
            ],
            "section_name": "桥段"
          },
          {
            "duration_ms": 7500,
            "lines": [
              "不用请假 双休就够",
              "摘掉眼镜 去见更远的天"
            ],
            "negative_local_styles": [
              "talking",
              "spoken"
            ],
            "positive_local_styles": [
              "catchy hook",
              "melodic",
              "bright sung female vocal",
              "uplifting"
            ],
            "section_name": "副歌"
          }
        ]
      },
      "output_format": "mp3_44100_128",
      "respect_sections_durations": true
    }
  }
}'
返回示例response.json
JSON
{
  "description": "task accepted; poll the result via query_tool with this task_id",
  "query_tool": "ae_get_result",
  "status": "created",
  "task_id": "6f57502b-2d1d-471c-b8c5-06a3c255e642"
}