# RIFF.8 人声替换模式

**方法**: `POST`
**路径**: `/riffusion/generate`

请求参数: 与RIFF.1相同，但必须包含morph对象，且transform设为"swap\_vocals"。

## 请求参数

### Header 参数

```text
Authorization
string
可选
默认值:
Bearer {{YOUR_API_KEY}}
```

### Body 参数 application/json

```text
model
string
必需
lyrics
string
必需
tag
string
必需
title
string
必需
morph
object
必需
riff_id
string
必需
transform
string
必需
normalized_lyrics_strength
number
必需
normalized_sound_prompt_strength
number
必需
normalized_weirdness
number
必需
normalized_cover_strength
integer
必需
normalized_variation_strength
null
必需
duration
integer
必需
示例
{
"model"
:
"string"
,
"lyrics"
:
"string"
,
"tag"
:
"string"
,
"title"
:
"string"
,
"morph"
:
{
"riff_id"
:
"string"
,
"transform"
:
"string"
,
"normalized_lyrics_strength"
:
0
,
"normalized_sound_prompt_strength"
:
0
,
"normalized_weirdness"
:
0
,
"normalized_cover_strength"
:
0
,
"normalized_variation_strength"
:
null
,
"duration"
:
0
}
}
```

## 请求示例代码

### Shell

```bash
curl --location --request POST '/riffusion/generate' \
--header 'Authorization: Bearer {{YOUR_API_KEY}}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "model": "string",
    "lyrics": "string",
    "tag": "string",
    "title": "string",
    "morph": {
        "riff_id": "string",
        "transform": "string",
        "normalized_lyrics_strength": 0,
        "normalized_sound_prompt_strength": 0,
        "normalized_weirdness": 0,
        "normalized_cover_strength": 0,
        "normalized_variation_strength": null,
        "duration": 0
    }
}'
```

## 返回响应

### 🟢 200 成功

**内容类型**: `application/json`

#### 响应结构

```text
object
```

#### 示例

```json
{}
```
