> ## Documentation Index
> Fetch the complete documentation index at: https://docs.rixapi.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# 音色提取

> 从一首曲目提取音色，供后续创作复用。

> [!TIP]
>
> 也可以用统一任务接口 `POST /v1/task/submit` 提交：`model` 填 `suno/persona`，参数放进 `input`。两种写法效果与计费完全一样。

> [accordion] 任务结果
>
> 任务成功后，查询结果里产物的格式
>
> 任务成功后，`data.persona_id` 是创建出的音色 ID。生成、翻唱、续写时填进 `persona_id`，就会用这个音色演唱。
>
> ```json theme={null}
> {
>   "code": "success",
>   "data": {
>     "task_id": "5adac6ee-...",
>     "action": "persona",
>     "model": "suno/persona",
>     "status": "SUCCESS",
>     "progress": "100%",
>     "persona_id": "c2f0e6a1-..."
>   }
> }
> ```


## OpenAPI

````yaml cn/openapi/suno.json POST /suno/v2/persona
openapi: 3.1.0
info:
  title: Suno API
  version: 1.0.0
  description: Suno 接口
servers:
  - url: https://api.ephone.ai
security:
  - bearerAuth: []
paths:
  /suno/v2/persona:
    post:
      summary: 音色提取
      description: 从一首曲目提取音色，供后续创作复用。
      operationId: suno_persona
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                music_id:
                  type: string
                  description: '**源曲目**：要处理的曲目，填之前生成结果里的 music_id。'
                name:
                  type: string
                  description: '**名称**：给创建出来的音色或模型起个名字。'
                describe:
                  type: string
                  description: '**说明**：对这个音色的补充说明。'
                vocal_start_s:
                  type: number
                  minimum: 0
                  description: '**人声起点**：从第几秒开始取这段人声。与人声终点一起填，区间须短于 30 秒。'
                vocal_end_s:
                  type: number
                  description: '**人声终点**：取到第几秒结束。须大于人声起点，且区间短于 30 秒。'
                styles:
                  type: string
                  description: '**适合风格**：这个音色适合演绎的曲风。'
                notify_hook:
                  type: string
                  format: uri
                  description: >-
                    **推送地址**：任务结束后，把和查询结果相同的内容 POST 到这个地址（公网可以访问的 http / https
                    地址）。不传就自己查询。
              required:
                - music_id
                - name
            example:
              music_id: 曲目 ID
              name: 我的音色
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubmitResponse'
              example:
                code: success
                message: success
                data:
                  task_id: 5adac6ee-...
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                code: error
                message: music_id is required
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewayError'
              example:
                error:
                  message: Invalid Token
                  type: rix_api_error
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewayError'
              example:
                error:
                  message: Too many requests, please try again later
                  type: rix_api_error
components:
  schemas:
    SubmitResponse:
      type: object
      properties:
        code:
          type: string
          enum:
            - success
        message:
          type: string
        data:
          type: object
          properties:
            task_id:
              type: string
              description: 任务 ID。
          required:
            - task_id
      required:
        - code
        - data
    Error:
      type: object
      properties:
        code:
          type: string
        message:
          type: string
    GatewayError:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
            type:
              type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: '在请求头 `Authorization: Bearer YOUR_API_KEY` 里带上 API Key。'

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.