---
title: Suno Separate-Audio-Stems
url: https://runapi.ai/zh-CN/docs/api/suno/separate-audio-stems.md
canonical: https://runapi.ai/zh-CN/docs/api/suno/separate-audio-stems
locale: zh-CN
---

# Suno Separate-Audio-Stems

## 概览

使用必填输入提交Separate Audio Stems请求。使用返回的 Task ID 查询状态，或提供 callback_url 接收下方列出的投递。

### 快速开始

1. 创建 API Key，并将其设置为 RUNAPI_API_KEY。
2. 发送与请求 Schema 匹配的 POST 请求。
3. 保存返回的任务 ID，随后轮询到终态，或处理下方列出的回调。

## 端点

POST /api/v1/suno/separate_audio_stems

基础 URL: https://runapi.ai

API 版本: v1

身份验证: Authorization: Bearer YOUR_API_TOKEN

## 支持的模型

打开模型页可查看当前价格、限流和商业使用详情。

- [Suno](/models/suno)

## 请求 Schema

只发送文档列出的字段。提供 callback_url 后，它会收到下方列出的 Task 投递。

### 请求体

```json
{
  "audio_id": {
    "description": "Audio ID within the source task.",
    "required": true,
    "type": "string"
  },
  "callback_url": {
    "description": "Webhook URL for async notifications.",
    "type": "string"
  },
  "stem_name": {
    "description": "Target stem for advanced separation. Required when type is split_stem_advanced.",
    "enum": [
      "Lead Vocal",
      "Drum Kit",
      "Kick",
      "Snare",
      "Risers",
      "Bass",
      "Backing Vocals",
      "Piano",
      "Electric Guitar",
      "Percussion",
      "String Section",
      "Synth",
      "Acoustic Guitar",
      "Sound Effects",
      "Synth Pad",
      "Synth Bass",
      "Guitar",
      "Brass Section",
      "Organ",
      "Electronic Drum Kit",
      "Lead Electric Guitar",
      "Synth Keys",
      "Rhythm Electric Guitar",
      "Electric Piano",
      "Upright Bass",
      "Keyboards",
      "Distorted Electric Guitar",
      "Synth Strings",
      "Synth Lead",
      "Woodwinds",
      "Rhythm Acoustic Guitar",
      "Flute",
      "Harp",
      "Tambourine",
      "Trumpet",
      "Arpeggiator",
      "Accordion",
      "Fiddle",
      "Pedal Steel Guitar",
      "Synth Voice",
      "Violin",
      "Digital Piano",
      "Synth Brass",
      "Mandolin",
      "Choir",
      "Banjo",
      "Bells",
      "Clarinet",
      "Tenor Saxophone",
      "Trombone",
      "Shaker",
      "French Horn",
      "Glockenspiel",
      "Electric Bass",
      "Cello",
      "Timpani",
      "Harmonica",
      "Marimba",
      "Vibraphone",
      "Lap Steel Guitar",
      "Saxophone",
      "Orchestra",
      "Horns",
      "Cymbals",
      "Hand Clap",
      "Oboe",
      "Celesta",
      "Congas",
      "Drone",
      "Alto Saxophone",
      "Double Bass",
      "Ukulele",
      "Harpsichord",
      "Baritone Saxophone",
      "Xylophone",
      "Tuba",
      "Bass Guitar",
      "Whistle",
      "Lead Guitar",
      "Rhodes",
      "808",
      "Bongos",
      "Bassoon",
      "Cowbell",
      "Viola",
      "Sitar",
      "Steel Drums",
      "Piccolo",
      "Theremin",
      "Bagpipes",
      "Hi-Hat",
      "Music Box",
      "Melodica",
      "Tabla",
      "Koto",
      "Djembe",
      "Taiko",
      "Didgeridoo"
    ],
    "type": "string"
  },
  "task_id": {
    "description": "Source task ID.",
    "required": true,
    "type": "string"
  },
  "type": {
    "default": "separate_vocal",
    "description": "Stem separation mode.",
    "enum": [
      "separate_vocal",
      "split_stem",
      "split_stem_advanced"
    ],
    "type": "string"
  }
}
```

#### 条件规则

当列出的全部条件同时匹配时，应用这些要求。

- **当**: `type` = `split_stem_advanced`; **必填**: `stem_name`

## 创建已接受

HTTP 202 - POST /api/v1/suno/separate_audio_stems

### 响应 Schema

```json
{
  "properties": {
    "billing": {
      "properties": {
        "refund": {
          "oneOf": [
            {
              "properties": {
                "refunded_at": {
                  "type": "string"
                }
              },
              "required": [
                "refunded_at"
              ],
              "type": "object",
              "unevaluatedProperties": false
            },
            {
              "enum": [
                null
              ]
            }
          ]
        },
        "reservation": {
          "oneOf": [
            {
              "properties": {
                "amount_cents": {
                  "type": "integer"
                }
              },
              "required": [
                "amount_cents"
              ],
              "type": "object",
              "unevaluatedProperties": false
            },
            {
              "enum": [
                null
              ]
            }
          ]
        },
        "settlement": {
          "oneOf": [
            {
              "properties": {
                "amount_micro_cents": {
                  "type": "integer"
                },
                "charged_amount_cents": {
                  "type": "integer"
                }
              },
              "required": [
                "charged_amount_cents",
                "amount_micro_cents"
              ],
              "type": "object",
              "unevaluatedProperties": false
            },
            {
              "enum": [
                null
              ]
            }
          ]
        }
      },
      "required": [
        "reservation",
        "settlement",
        "refund"
      ],
      "type": "object",
      "unevaluatedProperties": false
    },
    "id": {
      "type": "string"
    },
    "status": {
      "enum": [
        "processing"
      ],
      "type": "string"
    },
    "task_replayed": {
      "type": "boolean"
    }
  },
  "required": [
    "id",
    "status",
    "billing"
  ],
  "type": "object",
  "unevaluatedProperties": false
}
```

### 响应示例

```json
{
  "billing": {
    "refund": null,
    "reservation": null,
    "settlement": null
  },
  "id": "tsk_reference_demo",
  "status": "processing"
}
```

## 轮询处理中

HTTP 200 - GET /api/v1/suno/separate_audio_stems/:id

### 响应 Schema

```json
{
  "properties": {
    "billing": {
      "properties": {
        "refund": {
          "oneOf": [
            {
              "properties": {
                "refunded_at": {
                  "type": "string"
                }
              },
              "required": [
                "refunded_at"
              ],
              "type": "object",
              "unevaluatedProperties": false
            },
            {
              "enum": [
                null
              ]
            }
          ]
        },
        "reservation": {
          "oneOf": [
            {
              "properties": {
                "amount_cents": {
                  "type": "integer"
                }
              },
              "required": [
                "amount_cents"
              ],
              "type": "object",
              "unevaluatedProperties": false
            },
            {
              "enum": [
                null
              ]
            }
          ]
        },
        "settlement": {
          "oneOf": [
            {
              "properties": {
                "amount_micro_cents": {
                  "type": "integer"
                },
                "charged_amount_cents": {
                  "type": "integer"
                }
              },
              "required": [
                "charged_amount_cents",
                "amount_micro_cents"
              ],
              "type": "object",
              "unevaluatedProperties": false
            },
            {
              "enum": [
                null
              ]
            }
          ]
        }
      },
      "required": [
        "reservation",
        "settlement",
        "refund"
      ],
      "type": "object",
      "unevaluatedProperties": false
    },
    "id": {
      "type": "string"
    },
    "separated_audios": {
      "properties": {
        "backing_vocals_url": {
          "type": "string"
        },
        "bass_url": {
          "type": "string"
        },
        "brass_url": {
          "type": "string"
        },
        "drums_url": {
          "type": "string"
        },
        "fx_url": {
          "type": "string"
        },
        "guitar_url": {
          "type": "string"
        },
        "instrumental_url": {
          "type": "string"
        },
        "keyboard_url": {
          "type": "string"
        },
        "pairs": {
          "items": {
            "properties": {
              "extracted_audio": {
                "properties": {
                  "audio_url": {
                    "type": "string"
                  },
                  "duration_seconds": {
                    "type": "number"
                  },
                  "id": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "duration_seconds",
                  "audio_url"
                ],
                "type": "object",
                "unevaluatedProperties": false
              },
              "remaining_audio": {
                "properties": {
                  "audio_url": {
                    "type": "string"
                  },
                  "duration_seconds": {
                    "type": "number"
                  },
                  "id": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "duration_seconds",
                  "audio_url"
                ],
                "type": "object",
                "unevaluatedProperties": false
              },
              "stem_name": {
                "type": "string"
              }
            },
            "required": [
              "stem_name",
              "extracted_audio",
              "remaining_audio"
            ],
            "type": "object",
            "unevaluatedProperties": false
          },
          "type": "array"
        },
        "percussion_url": {
          "type": "string"
        },
        "piano_url": {
          "type": "string"
        },
        "strings_url": {
          "type": "string"
        },
        "synth_url": {
          "type": "string"
        },
        "vocal_url": {
          "type": "string"
        },
        "woodwinds_url": {
          "type": "string"
        }
      },
      "type": "object",
      "unevaluatedProperties": false
    },
    "status": {
      "enum": [
        "processing"
      ],
      "type": "string"
    }
  },
  "required": [
    "id",
    "status",
    "billing"
  ],
  "type": "object",
  "unevaluatedProperties": false
}
```

### 响应示例

```json
{
  "billing": {
    "refund": null,
    "reservation": null,
    "settlement": null
  },
  "id": "tsk_reference_demo",
  "status": "processing"
}
```

## 轮询已完成

HTTP 200 - GET /api/v1/suno/separate_audio_stems/:id

### 响应 Schema

```json
{
  "properties": {
    "billing": {
      "properties": {
        "refund": {
          "oneOf": [
            {
              "properties": {
                "refunded_at": {
                  "type": "string"
                }
              },
              "required": [
                "refunded_at"
              ],
              "type": "object",
              "unevaluatedProperties": false
            },
            {
              "enum": [
                null
              ]
            }
          ]
        },
        "reservation": {
          "oneOf": [
            {
              "properties": {
                "amount_cents": {
                  "type": "integer"
                }
              },
              "required": [
                "amount_cents"
              ],
              "type": "object",
              "unevaluatedProperties": false
            },
            {
              "enum": [
                null
              ]
            }
          ]
        },
        "settlement": {
          "oneOf": [
            {
              "properties": {
                "amount_micro_cents": {
                  "type": "integer"
                },
                "charged_amount_cents": {
                  "type": "integer"
                }
              },
              "required": [
                "charged_amount_cents",
                "amount_micro_cents"
              ],
              "type": "object",
              "unevaluatedProperties": false
            },
            {
              "enum": [
                null
              ]
            }
          ]
        }
      },
      "required": [
        "reservation",
        "settlement",
        "refund"
      ],
      "type": "object",
      "unevaluatedProperties": false
    },
    "id": {
      "type": "string"
    },
    "separated_audios": {
      "properties": {
        "backing_vocals_url": {
          "type": "string"
        },
        "bass_url": {
          "type": "string"
        },
        "brass_url": {
          "type": "string"
        },
        "drums_url": {
          "type": "string"
        },
        "fx_url": {
          "type": "string"
        },
        "guitar_url": {
          "type": "string"
        },
        "instrumental_url": {
          "type": "string"
        },
        "keyboard_url": {
          "type": "string"
        },
        "pairs": {
          "items": {
            "properties": {
              "extracted_audio": {
                "properties": {
                  "audio_url": {
                    "type": "string"
                  },
                  "duration_seconds": {
                    "type": "number"
                  },
                  "id": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "duration_seconds",
                  "audio_url"
                ],
                "type": "object",
                "unevaluatedProperties": false
              },
              "remaining_audio": {
                "properties": {
                  "audio_url": {
                    "type": "string"
                  },
                  "duration_seconds": {
                    "type": "number"
                  },
                  "id": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "duration_seconds",
                  "audio_url"
                ],
                "type": "object",
                "unevaluatedProperties": false
              },
              "stem_name": {
                "type": "string"
              }
            },
            "required": [
              "stem_name",
              "extracted_audio",
              "remaining_audio"
            ],
            "type": "object",
            "unevaluatedProperties": false
          },
          "type": "array"
        },
        "percussion_url": {
          "type": "string"
        },
        "piano_url": {
          "type": "string"
        },
        "strings_url": {
          "type": "string"
        },
        "synth_url": {
          "type": "string"
        },
        "vocal_url": {
          "type": "string"
        },
        "woodwinds_url": {
          "type": "string"
        }
      },
      "type": "object",
      "unevaluatedProperties": false
    },
    "status": {
      "enum": [
        "completed"
      ],
      "type": "string"
    }
  },
  "required": [
    "id",
    "status",
    "separated_audios",
    "billing"
  ],
  "type": "object",
  "unevaluatedProperties": false
}
```

### 响应示例

```json
{
  "billing": {
    "refund": null,
    "reservation": null,
    "settlement": null
  },
  "id": "tsk_reference_demo",
  "separated_audios": {
    "instrumental_url": "https://file.runapi.ai/reference-instrumental.mp3",
    "vocal_url": "https://file.runapi.ai/reference-vocals.mp3"
  },
  "status": "completed"
}
```

## 轮询失败

HTTP 200 - GET /api/v1/suno/separate_audio_stems/:id

### 响应 Schema

```json
{
  "properties": {
    "billing": {
      "properties": {
        "refund": {
          "oneOf": [
            {
              "properties": {
                "refunded_at": {
                  "type": "string"
                }
              },
              "required": [
                "refunded_at"
              ],
              "type": "object",
              "unevaluatedProperties": false
            },
            {
              "enum": [
                null
              ]
            }
          ]
        },
        "reservation": {
          "oneOf": [
            {
              "properties": {
                "amount_cents": {
                  "type": "integer"
                }
              },
              "required": [
                "amount_cents"
              ],
              "type": "object",
              "unevaluatedProperties": false
            },
            {
              "enum": [
                null
              ]
            }
          ]
        },
        "settlement": {
          "oneOf": [
            {
              "properties": {
                "amount_micro_cents": {
                  "type": "integer"
                },
                "charged_amount_cents": {
                  "type": "integer"
                }
              },
              "required": [
                "charged_amount_cents",
                "amount_micro_cents"
              ],
              "type": "object",
              "unevaluatedProperties": false
            },
            {
              "enum": [
                null
              ]
            }
          ]
        }
      },
      "required": [
        "reservation",
        "settlement",
        "refund"
      ],
      "type": "object",
      "unevaluatedProperties": false
    },
    "error": {
      "type": "string"
    },
    "id": {
      "type": "string"
    },
    "status": {
      "enum": [
        "failed"
      ],
      "type": "string"
    }
  },
  "required": [
    "id",
    "status",
    "error",
    "billing"
  ],
  "type": "object",
  "unevaluatedProperties": false
}
```

### 响应示例

```json
{
  "billing": {
    "refund": null,
    "reservation": null,
    "settlement": null
  },
  "error": "Task processing failed.",
  "id": "tsk_reference_demo",
  "status": "failed"
}
```

## 客户回调：已完成

HTTP 200 - POST callback_url

### 响应 Schema

```json
{
  "properties": {
    "id": {
      "type": "string"
    },
    "separated_audios": {
      "properties": {
        "backing_vocals_url": {
          "type": "string"
        },
        "bass_url": {
          "type": "string"
        },
        "brass_url": {
          "type": "string"
        },
        "drums_url": {
          "type": "string"
        },
        "fx_url": {
          "type": "string"
        },
        "guitar_url": {
          "type": "string"
        },
        "instrumental_url": {
          "type": "string"
        },
        "keyboard_url": {
          "type": "string"
        },
        "pairs": {
          "items": {
            "properties": {
              "extracted_audio": {
                "properties": {
                  "audio_url": {
                    "type": "string"
                  },
                  "duration_seconds": {
                    "type": "number"
                  },
                  "id": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "duration_seconds",
                  "audio_url"
                ],
                "type": "object",
                "unevaluatedProperties": false
              },
              "remaining_audio": {
                "properties": {
                  "audio_url": {
                    "type": "string"
                  },
                  "duration_seconds": {
                    "type": "number"
                  },
                  "id": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "duration_seconds",
                  "audio_url"
                ],
                "type": "object",
                "unevaluatedProperties": false
              },
              "stem_name": {
                "type": "string"
              }
            },
            "required": [
              "stem_name",
              "extracted_audio",
              "remaining_audio"
            ],
            "type": "object",
            "unevaluatedProperties": false
          },
          "type": "array"
        },
        "percussion_url": {
          "type": "string"
        },
        "piano_url": {
          "type": "string"
        },
        "strings_url": {
          "type": "string"
        },
        "synth_url": {
          "type": "string"
        },
        "vocal_url": {
          "type": "string"
        },
        "woodwinds_url": {
          "type": "string"
        }
      },
      "type": "object",
      "unevaluatedProperties": false
    },
    "status": {
      "enum": [
        "completed"
      ],
      "type": "string"
    }
  },
  "required": [
    "id",
    "status",
    "separated_audios"
  ],
  "type": "object",
  "unevaluatedProperties": false
}
```

### 响应示例

```json
{
  "id": "tsk_reference_demo",
  "separated_audios": {
    "instrumental_url": "https://file.runapi.ai/reference-instrumental.mp3",
    "vocal_url": "https://file.runapi.ai/reference-vocals.mp3"
  },
  "status": "completed"
}
```

## 客户回调：失败

HTTP 200 - POST callback_url

### 响应 Schema

```json
{
  "properties": {
    "error": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "properties": {
            "code": {
              "type": "string"
            },
            "message": {
              "type": "string"
            }
          },
          "required": [
            "code",
            "message"
          ],
          "type": "object",
          "unevaluatedProperties": false
        }
      ]
    },
    "id": {
      "type": "string"
    },
    "status": {
      "enum": [
        "failed"
      ],
      "type": "string"
    }
  },
  "required": [
    "id",
    "status",
    "error"
  ],
  "type": "object",
  "unevaluatedProperties": false
}
```

### 响应示例

```json
{
  "error": {
    "code": "generation_failed",
    "message": "Task processing failed."
  },
  "id": "tsk_reference_demo",
  "status": "failed"
}
```

## 错误

HTTP 401 - POST /api/v1/suno/separate_audio_stems

此响应不包含正文。

## 错误

HTTP 401 - GET /api/v1/suno/separate_audio_stems/:id

此响应不包含正文。

## 错误

HTTP 400 - POST /api/v1/suno/separate_audio_stems

### 响应 Schema

```json
{
  "properties": {
    "billing": {
      "properties": {
        "refund": {
          "oneOf": [
            {
              "properties": {
                "refunded_at": {
                  "type": "string"
                }
              },
              "required": [
                "refunded_at"
              ],
              "type": "object",
              "unevaluatedProperties": false
            },
            {
              "enum": [
                null
              ]
            }
          ]
        },
        "reservation": {
          "oneOf": [
            {
              "properties": {
                "amount_cents": {
                  "type": "integer"
                }
              },
              "required": [
                "amount_cents"
              ],
              "type": "object",
              "unevaluatedProperties": false
            },
            {
              "enum": [
                null
              ]
            }
          ]
        },
        "settlement": {
          "oneOf": [
            {
              "properties": {
                "amount_micro_cents": {
                  "type": "integer"
                },
                "charged_amount_cents": {
                  "type": "integer"
                }
              },
              "required": [
                "charged_amount_cents",
                "amount_micro_cents"
              ],
              "type": "object",
              "unevaluatedProperties": false
            },
            {
              "enum": [
                null
              ]
            }
          ]
        }
      },
      "required": [
        "reservation",
        "settlement",
        "refund"
      ],
      "type": "object",
      "unevaluatedProperties": false
    },
    "error": {
      "properties": {
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        }
      },
      "required": [
        "code",
        "message"
      ],
      "type": "object",
      "unevaluatedProperties": false
    }
  },
  "required": [
    "error"
  ],
  "type": "object",
  "unevaluatedProperties": false
}
```

### 响应示例

```json
{
  "error": {
    "code": "task_id_is_required",
    "message": "task_id is required"
  }
}
```

## 错误

HTTP 402 - POST /api/v1/suno/separate_audio_stems

### 响应 Schema

```json
{
  "properties": {
    "billing": {
      "properties": {
        "refund": {
          "oneOf": [
            {
              "properties": {
                "refunded_at": {
                  "type": "string"
                }
              },
              "required": [
                "refunded_at"
              ],
              "type": "object",
              "unevaluatedProperties": false
            },
            {
              "enum": [
                null
              ]
            }
          ]
        },
        "reservation": {
          "oneOf": [
            {
              "properties": {
                "amount_cents": {
                  "type": "integer"
                }
              },
              "required": [
                "amount_cents"
              ],
              "type": "object",
              "unevaluatedProperties": false
            },
            {
              "enum": [
                null
              ]
            }
          ]
        },
        "settlement": {
          "oneOf": [
            {
              "properties": {
                "amount_micro_cents": {
                  "type": "integer"
                },
                "charged_amount_cents": {
                  "type": "integer"
                }
              },
              "required": [
                "charged_amount_cents",
                "amount_micro_cents"
              ],
              "type": "object",
              "unevaluatedProperties": false
            },
            {
              "enum": [
                null
              ]
            }
          ]
        }
      },
      "required": [
        "reservation",
        "settlement",
        "refund"
      ],
      "type": "object",
      "unevaluatedProperties": false
    },
    "error": {
      "properties": {
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        }
      },
      "required": [
        "code",
        "message"
      ],
      "type": "object",
      "unevaluatedProperties": false
    }
  },
  "required": [
    "error"
  ],
  "type": "object",
  "unevaluatedProperties": false
}
```

### 响应示例

```json
{
  "error": {
    "code": "insufficient_balance",
    "message": "Insufficient balance"
  }
}
```

## 错误

HTTP 403 - POST /api/v1/suno/separate_audio_stems

### 响应 Schema

```json
{
  "properties": {
    "billing": {
      "properties": {
        "refund": {
          "oneOf": [
            {
              "properties": {
                "refunded_at": {
                  "type": "string"
                }
              },
              "required": [
                "refunded_at"
              ],
              "type": "object",
              "unevaluatedProperties": false
            },
            {
              "enum": [
                null
              ]
            }
          ]
        },
        "reservation": {
          "oneOf": [
            {
              "properties": {
                "amount_cents": {
                  "type": "integer"
                }
              },
              "required": [
                "amount_cents"
              ],
              "type": "object",
              "unevaluatedProperties": false
            },
            {
              "enum": [
                null
              ]
            }
          ]
        },
        "settlement": {
          "oneOf": [
            {
              "properties": {
                "amount_micro_cents": {
                  "type": "integer"
                },
                "charged_amount_cents": {
                  "type": "integer"
                }
              },
              "required": [
                "charged_amount_cents",
                "amount_micro_cents"
              ],
              "type": "object",
              "unevaluatedProperties": false
            },
            {
              "enum": [
                null
              ]
            }
          ]
        }
      },
      "required": [
        "reservation",
        "settlement",
        "refund"
      ],
      "type": "object",
      "unevaluatedProperties": false
    },
    "error": {
      "properties": {
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        }
      },
      "required": [
        "code",
        "message"
      ],
      "type": "object",
      "unevaluatedProperties": false
    }
  },
  "required": [
    "error"
  ],
  "type": "object",
  "unevaluatedProperties": false
}
```

### 响应示例

```json
{
  "error": {
    "code": "api_token_credit_limit_exceeded",
    "message": "API key credit limit exceeded"
  }
}
```

## 错误

HTTP 409 - POST /api/v1/suno/separate_audio_stems

### 响应 Schema

```json
{
  "properties": {
    "billing": {
      "properties": {
        "refund": {
          "oneOf": [
            {
              "properties": {
                "refunded_at": {
                  "type": "string"
                }
              },
              "required": [
                "refunded_at"
              ],
              "type": "object",
              "unevaluatedProperties": false
            },
            {
              "enum": [
                null
              ]
            }
          ]
        },
        "reservation": {
          "oneOf": [
            {
              "properties": {
                "amount_cents": {
                  "type": "integer"
                }
              },
              "required": [
                "amount_cents"
              ],
              "type": "object",
              "unevaluatedProperties": false
            },
            {
              "enum": [
                null
              ]
            }
          ]
        },
        "settlement": {
          "oneOf": [
            {
              "properties": {
                "amount_micro_cents": {
                  "type": "integer"
                },
                "charged_amount_cents": {
                  "type": "integer"
                }
              },
              "required": [
                "charged_amount_cents",
                "amount_micro_cents"
              ],
              "type": "object",
              "unevaluatedProperties": false
            },
            {
              "enum": [
                null
              ]
            }
          ]
        }
      },
      "required": [
        "reservation",
        "settlement",
        "refund"
      ],
      "type": "object",
      "unevaluatedProperties": false
    },
    "error": {
      "properties": {
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        }
      },
      "required": [
        "code",
        "message"
      ],
      "type": "object",
      "unevaluatedProperties": false
    }
  },
  "required": [
    "error"
  ],
  "type": "object",
  "unevaluatedProperties": false
}
```

### 响应示例

```json
{
  "error": {
    "code": "request_conflict",
    "message": "The request uses features that are not supported for the selected model"
  }
}
```

## 错误

HTTP 429 - POST /api/v1/suno/separate_audio_stems

### 响应 Schema

```json
{
  "properties": {
    "billing": {
      "properties": {
        "refund": {
          "oneOf": [
            {
              "properties": {
                "refunded_at": {
                  "type": "string"
                }
              },
              "required": [
                "refunded_at"
              ],
              "type": "object",
              "unevaluatedProperties": false
            },
            {
              "enum": [
                null
              ]
            }
          ]
        },
        "reservation": {
          "oneOf": [
            {
              "properties": {
                "amount_cents": {
                  "type": "integer"
                }
              },
              "required": [
                "amount_cents"
              ],
              "type": "object",
              "unevaluatedProperties": false
            },
            {
              "enum": [
                null
              ]
            }
          ]
        },
        "settlement": {
          "oneOf": [
            {
              "properties": {
                "amount_micro_cents": {
                  "type": "integer"
                },
                "charged_amount_cents": {
                  "type": "integer"
                }
              },
              "required": [
                "charged_amount_cents",
                "amount_micro_cents"
              ],
              "type": "object",
              "unevaluatedProperties": false
            },
            {
              "enum": [
                null
              ]
            }
          ]
        }
      },
      "required": [
        "reservation",
        "settlement",
        "refund"
      ],
      "type": "object",
      "unevaluatedProperties": false
    },
    "error": {
      "properties": {
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        }
      },
      "required": [
        "code",
        "message"
      ],
      "type": "object",
      "unevaluatedProperties": false
    }
  },
  "required": [
    "error"
  ],
  "type": "object",
  "unevaluatedProperties": false
}
```

### 响应示例

```json
{
  "error": {
    "code": "rate_limited",
    "message": "Rate limit reached. Please retry later."
  }
}
```

## 错误

HTTP 503 - POST /api/v1/suno/separate_audio_stems

### 响应 Schema

```json
{
  "properties": {
    "billing": {
      "properties": {
        "refund": {
          "oneOf": [
            {
              "properties": {
                "refunded_at": {
                  "type": "string"
                }
              },
              "required": [
                "refunded_at"
              ],
              "type": "object",
              "unevaluatedProperties": false
            },
            {
              "enum": [
                null
              ]
            }
          ]
        },
        "reservation": {
          "oneOf": [
            {
              "properties": {
                "amount_cents": {
                  "type": "integer"
                }
              },
              "required": [
                "amount_cents"
              ],
              "type": "object",
              "unevaluatedProperties": false
            },
            {
              "enum": [
                null
              ]
            }
          ]
        },
        "settlement": {
          "oneOf": [
            {
              "properties": {
                "amount_micro_cents": {
                  "type": "integer"
                },
                "charged_amount_cents": {
                  "type": "integer"
                }
              },
              "required": [
                "charged_amount_cents",
                "amount_micro_cents"
              ],
              "type": "object",
              "unevaluatedProperties": false
            },
            {
              "enum": [
                null
              ]
            }
          ]
        }
      },
      "required": [
        "reservation",
        "settlement",
        "refund"
      ],
      "type": "object",
      "unevaluatedProperties": false
    },
    "error": {
      "properties": {
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        }
      },
      "required": [
        "code",
        "message"
      ],
      "type": "object",
      "unevaluatedProperties": false
    }
  },
  "required": [
    "error"
  ],
  "type": "object",
  "unevaluatedProperties": false
}
```

### 响应示例

```json
{
  "error": {
    "code": "service_unavailable",
    "message": "Service under maintenance, please try again later"
  }
}
```

## 错误

HTTP 504 - POST /api/v1/suno/separate_audio_stems

### 响应 Schema

```json
{
  "properties": {
    "billing": {
      "properties": {
        "refund": {
          "oneOf": [
            {
              "properties": {
                "refunded_at": {
                  "type": "string"
                }
              },
              "required": [
                "refunded_at"
              ],
              "type": "object",
              "unevaluatedProperties": false
            },
            {
              "enum": [
                null
              ]
            }
          ]
        },
        "reservation": {
          "oneOf": [
            {
              "properties": {
                "amount_cents": {
                  "type": "integer"
                }
              },
              "required": [
                "amount_cents"
              ],
              "type": "object",
              "unevaluatedProperties": false
            },
            {
              "enum": [
                null
              ]
            }
          ]
        },
        "settlement": {
          "oneOf": [
            {
              "properties": {
                "amount_micro_cents": {
                  "type": "integer"
                },
                "charged_amount_cents": {
                  "type": "integer"
                }
              },
              "required": [
                "charged_amount_cents",
                "amount_micro_cents"
              ],
              "type": "object",
              "unevaluatedProperties": false
            },
            {
              "enum": [
                null
              ]
            }
          ]
        }
      },
      "required": [
        "reservation",
        "settlement",
        "refund"
      ],
      "type": "object",
      "unevaluatedProperties": false
    },
    "error": {
      "properties": {
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        }
      },
      "required": [
        "code",
        "message"
      ],
      "type": "object",
      "unevaluatedProperties": false
    }
  },
  "required": [
    "error"
  ],
  "type": "object",
  "unevaluatedProperties": false
}
```

### 响应示例

```json
{
  "billing": {
    "refund": null,
    "reservation": null,
    "settlement": null
  },
  "error": {
    "code": "timeout_error",
    "message": "The request timed out"
  }
}
```

## 错误

HTTP 404 - GET /api/v1/suno/separate_audio_stems/:id

### 响应 Schema

```json
{
  "properties": {
    "billing": {
      "properties": {
        "refund": {
          "oneOf": [
            {
              "properties": {
                "refunded_at": {
                  "type": "string"
                }
              },
              "required": [
                "refunded_at"
              ],
              "type": "object",
              "unevaluatedProperties": false
            },
            {
              "enum": [
                null
              ]
            }
          ]
        },
        "reservation": {
          "oneOf": [
            {
              "properties": {
                "amount_cents": {
                  "type": "integer"
                }
              },
              "required": [
                "amount_cents"
              ],
              "type": "object",
              "unevaluatedProperties": false
            },
            {
              "enum": [
                null
              ]
            }
          ]
        },
        "settlement": {
          "oneOf": [
            {
              "properties": {
                "amount_micro_cents": {
                  "type": "integer"
                },
                "charged_amount_cents": {
                  "type": "integer"
                }
              },
              "required": [
                "charged_amount_cents",
                "amount_micro_cents"
              ],
              "type": "object",
              "unevaluatedProperties": false
            },
            {
              "enum": [
                null
              ]
            }
          ]
        }
      },
      "required": [
        "reservation",
        "settlement",
        "refund"
      ],
      "type": "object",
      "unevaluatedProperties": false
    },
    "error": {
      "properties": {
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        }
      },
      "required": [
        "code",
        "message"
      ],
      "type": "object",
      "unevaluatedProperties": false
    }
  },
  "required": [
    "error"
  ],
  "type": "object",
  "unevaluatedProperties": false
}
```

### 响应示例

```json
{
  "error": {
    "code": "not_found",
    "message": "Task with id 'tsk_reference_demo' not found"
  }
}
```

## 生成的代码示例

直接使用 cURL，或安装所用语言的 SDK。每个示例都会提交本参考中经过验证的请求。

### curl

```curl
curl -X POST https://runapi.ai/api/v1/suno/separate_audio_stems \
  -H 'Authorization: Bearer YOUR_API_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"task_id":"tsk_source_music","audio_id":"audio_reference","type":"separate_vocal"}'
```

### javascript

#### 安装

```bash
npm install @runapi.ai/suno
```

```javascript
import { SunoClient } from "@runapi.ai/suno";

const client = new SunoClient({ apiKey: process.env.RUNAPI_API_KEY });
const task = await client.separateAudioStems.create({
  "task_id": "tsk_source_music",
  "audio_id": "audio_reference",
  "type": "separate_vocal"
});
```

### python

#### 安装

```bash
pip install runapi-suno
```

```python
import os
from runapi.suno import SunoClient

client = SunoClient(api_key=os.environ["RUNAPI_API_KEY"])
task = client.separate_audio_stems.create(
  task_id="tsk_source_music",
  audio_id="audio_reference",
  type="separate_vocal"
)
```

### go

#### 安装

```bash
go get github.com/runapi-ai/suno-sdk/go@latest
```

```go
package main

import (
  "context"
  "log"
  "os"

  "github.com/runapi-ai/core-sdk/go/option"
  suno "github.com/runapi-ai/suno-sdk/go/suno"
)

func main() {
  client, err := suno.NewClient(option.WithAPIKey(os.Getenv("RUNAPI_API_KEY")))
  if err != nil {
    log.Fatal(err)
  }

  task, err := client.SeparateAudioStems.Create(context.Background(), suno.SeparateAudioStemsParams{
    TaskID: "tsk_source_music",
    AudioID: "audio_reference",
    Type: "separate_vocal",
  })
  if err != nil {
    log.Fatal(err)
  }
  _ = task
}
```

### ruby

#### 安装

```bash
gem install runapi-suno
```

```ruby
require "runapi/suno"

client = RunApi::Suno::Client.new(api_key: ENV.fetch("RUNAPI_API_KEY"))
task = client.separate_audio_stems.create(
  task_id: "tsk_source_music",
  audio_id: "audio_reference",
  type: "separate_vocal"
)
```

### java

#### 安装

```kotlin
implementation("ai.runapi:runapi-suno")
```

```java
import ai.runapi.suno.SunoClient;
import ai.runapi.suno.types.SeparateAudioStemsParams;
import ai.runapi.core.polling.TaskCreateResponse;

public final class Example {
  public static void main(String[] args) {
    SunoClient client = SunoClient.builder()
        .apiKey(System.getenv("RUNAPI_API_KEY"))
        .build();
    TaskCreateResponse task = client.separateAudioStems().create(
        SeparateAudioStemsParams.builder()
        .taskId("tsk_source_music")
        .audioId("audio_reference")
        .type("separate_vocal")
            .build()
    );
  }
}
```

### php

#### 安装

```bash
composer require runapi-ai/suno
```

```php
<?php

require __DIR__ . '/vendor/autoload.php';

use RunApi\Core\ClientOptions;
use RunApi\Suno\SunoClient;

$client = new SunoClient(new ClientOptions(apiKey: getenv('RUNAPI_API_KEY')));
$task = $client->separateAudioStems->create([
  "task_id" => "tsk_source_music",
  "audio_id" => "audio_reference",
  "type" => "separate_vocal"
]);
```

## 相关指南

- [API 身份验证](/docs/guides/authentication)
- [快速开始](/docs/guides/task-api/quickstart)
