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

# 翻唱前处理 (Music Cover Preprocess)

> 对参考音频进行预处理，提取音频特征和歌词，用于两步翻唱流程。



## OpenAPI

````yaml /api-reference/music/api/openapi.json POST /v1/music_cover_preprocess
openapi: 3.1.0
info:
  title: MiniMax Music Generation API
  description: >-
    MiniMax music generation API with support for creating music from text
    prompts and lyrics
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.minimaxi.com
security:
  - bearerAuth: []
paths:
  /v1/music_cover_preprocess:
    post:
      tags:
        - Music
      summary: 翻唱前处理 (Music Cover Preprocess)
      operationId: coverPreprocess
      parameters:
        - name: Content-Type
          in: header
          required: true
          description: 请求体的媒介类型，请设置为 `application/json`，确保请求数据的格式为 JSON
          schema:
            type: string
            enum:
              - application/json
            default: application/json
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CoverPreprocessReq'
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CoverPreprocessResp'
components:
  schemas:
    CoverPreprocessReq:
      type: object
      required:
        - model
      properties:
        model:
          type: string
          description: 模型名称。必须为 `music-cover`。
          enum:
            - music-cover
        audio_url:
          type: string
          description: |-
            参考音频的 URL 地址。`audio_url` 和 `audio_base64` 必须且只能提供其中一个。

            参考音频要求：
            - 时长：6 秒至 6 分钟
            - 大小：最大 50 MB
            - 格式：支持常见音频格式（mp3、wav、flac 等）
        audio_base64:
          type: string
          description: |-
            Base64 编码的参考音频。`audio_url` 和 `audio_base64` 必须且只能提供其中一个。

            参考音频要求：
            - 时长：6 秒至 6 分钟
            - 大小：最大 50 MB
            - 格式：支持常见音频格式（mp3、wav、flac 等）
      example:
        model: music-cover
        audio_url: https://example.com/song.mp3
    CoverPreprocessResp:
      type: object
      properties:
        cover_feature_id:
          type: string
          description: >-
            预处理后的音频特征唯一标识，有效期 24 小时。将此 ID
            传入[音乐生成接口](/api-reference/music-generation)的 `cover_feature_id`
            参数以进行两步翻唱。


            相同音频内容会返回相同的 `cover_feature_id`（基于 MD5 去重）。
        formatted_lyrics:
          type: string
          description: >-
            通过 ASR 从参考音频中提取并格式化的歌词，包含 `[Verse]`、`[Chorus]`、`[Bridge]`
            等段落标签。你可以修改这些歌词后传入音乐生成接口。
        structure_result:
          type: string
          description: >-
            JSON
            字符串，包含歌曲结构分析结果，含段落类型（`intro`、`verse`、`chorus`、`bridge`、`outro`、`inst`、`silence`）及其起止时间戳（秒）。
        audio_duration:
          type: number
          format: double
          description: 参考音频的时长（秒）。
        trace_id:
          type: string
          description: 请求追踪 ID。
        base_resp:
          $ref: '#/components/schemas/BaseResp'
      example:
        cover_feature_id: a1b2c3d4e5f67890abcdef1234567890
        formatted_lyrics: |-
          [Verse 1]
          歌曲第一行
          歌曲第二行

          [Chorus]
          这是副歌部分
          高声歌唱
        structure_result: >-
          {"num_segments":4,"segments":[{"start":0,"end":15.5,"label":"intro"},{"start":15.5,"end":45.2,"label":"verse"},{"start":45.2,"end":75.0,"label":"chorus"},{"start":75.0,"end":90.0,"label":"outro"}]}
        audio_duration: 90
        trace_id: 061e5f144eb7f10b1fdde81126e24f91
        base_resp:
          status_code: 0
          status_msg: success
    BaseResp:
      type: object
      description: 状态码及详情
      properties:
        status_code:
          type: integer
          description: |-
            状态码及其分别含义如下：

            `0`: 请求成功

            `1002`: 触发限流，请稍后再试

            `1004`: 账号鉴权失败，请检查 API-Key 是否填写正确

            `1008`: 账号余额不足

            `1026`: 图片描述涉及敏感内容

            `2013`: 传入参数异常，请检查入参是否按要求填写

            `2049`: 无效的api key

            更多内容可查看 [错误码查询列表](/api-reference/errorcode) 了解详情
        status_msg:
          type: string
          description: 具体错误详情
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: |-
        `HTTP: Bearer Auth`
         - Security Scheme Type: http
         - HTTP Authorization Scheme: Bearer API_key，用于验证账户信息，可在 [账户管理>接口密钥](https://platform.minimaxi.com/user-center/basic-information/interface-key) 中查看。

````