文档

Cover 改编

Flow Music 对整首歌做风格改编(翻唱 / 改风格),strength 控制编辑强度

Flow Music 对整首歌做风格改编(翻唱 / 改风格),strength 控制编辑强度

请求示例

bash curl --request POST \ --url https://api.openveer.com/v1/music/generations/coverFlowMusic \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "model": "flowmusic", "clip_id": "abc123-def456", "instruction": "将这首歌曲改为爵士风格", "strength": 0.5 }'

```python
import requests

url = "https://api.openveer.com/v1/music/generations/coverFlowMusic"

payload = {
"model": "flowmusic",
"clip_id": "abc123-def456",
"instruction": "将这首歌曲改为爵士风格",
"strength": 0.5
}

headers = {
"Authorization": "Bearer ",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = "https://api.openveer.com/v1/music/generations/coverFlowMusic";

const payload = {
model: "flowmusic",
clip_id: "abc123-def456",
instruction: "将这首歌曲改为爵士风格",
strength: 0.5
};

const headers = {
"Authorization": "Bearer ",
"Content-Type": "application/json"
};

fetch(url, {
method: "POST",
headers: headers,
body: JSON.stringify(payload)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
```

响应示例

json { "code": 200, "data": [ { "status": "submitted", "task_id": "task_01KWXVD0E653EZ9FWD2SD9NNB6" } ] }

json { "error": { "message": "strength must be between 0 and 1", "type": "invalid_request", "param": "", "code": "invalid_request" } }

json { "error": { "message": "余额不足", "type": "invalid_request", "param": "", "code": "quota_not_enough" } }

json { "error": { "message": "当前分组容量饱和,请稍后重试", "type": "rate_limit_error", "param": "", "code": "rate_limit_error" } }

认证

Authorization string
所有接口均需要使用 Bearer Token 进行认证 获取 API Key: 访问 [API Key 管理页面](https://openveer.com) 获取您的 API Key 使用时在请求头中添加: ``` Authorization: Bearer YOUR_API_KEY ```

请求参数

model string
模型名称,**固定传 `"flowmusic"`**(大小写不敏感)
clip_id string
源音乐的唯一标识符,来自已成功任务的 `result.music[].clip_id`
instruction string
Cover 编辑指令 示例:`"将这首歌曲改为爵士风格"`
strength number
编辑强度 取值范围:`0` \~ `1`,越大改动越大
title string
Cover 后的音乐标题
seed string
随机种子,用于结果复现

响应

code integer
响应状态码,成功时为 200
data array
返回数据数组 任务状态,初始提交时为 `submitted`
task_id string
任务唯一标识符,用于查询任务状态和结果

使用场景

场景 1:整曲改为爵士风格

{
  "model": "flowmusic",
  "clip_id": "abc123-def456",
  "instruction": "将这首歌曲改为爵士风格",
  "strength": 0.5
}

场景 2:外部音频导入后改编

先通过上传音频把外部音频导入换取 clip_id,再做 Cover:

{
  "model": "flowmusic",
  "clip_id": "1db3a20f-4ddc-44e8-8c9c-6c9093c16ffe",
  "instruction": "改成爵士风格",
  "strength": 0.6
}
注意
**查询任务结果** Cover 改编为异步任务,提交后会返回 `task_id`。使用 [获取任务状态](./query) 接口查询生成进度和结果。Cover 产物是**新的** `clip_id`,后续操作请使用新 clip\_id。

任务完成结果示例

查询返回示例GET /v1/music/tasks/{task_id}):

{
  "code": 200,
  "data": {
    "id": "task_01KWXVD0E653EZ9FWD2SD9NNB6",
    "status": "completed",
    "progress": 100,
    "created": 1783413244,
    "completed": 1783413315,
    "actual_time": 71,
    "cost": 0.048,
    "credits_cost": 0.48,
    "result": {
      "music": [
        {
          "clip_id": "ef3d804e-fa97-402f-ba17-4ff08270159b",
          "title": "Untitled (Cover)",
          "duration_seconds": "178.03733333",
          "create_time": "2026-07-07T08:34:58.112190Z",
          "lyrics": "[Verse 1]\nWaking up to the morning light,\n...",
          "lyrics_id": "c302d603-81b6-552f-8122-e512928d6aa1",
          "lyrics_timing_markers": [[10, 12], [212, 36]],
          "audio_url": "https://cdn.apimart.ai/audio/flowmusic_ef3d804e.m4a",
          "wav_url": "https://cdn.apimart.ai/audio/flowmusic_ef3d804e.wav",
          "image_url": "https://cdn.apimart.ai/image/flowmusic_ef3d804e_cover.jpg"
        }
      ]
    }
  }
}