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

# 生成混搭

> 使用 Suno 混合恰好两条音轨

`upload_url_list` 必须包含恰好两个可访问的音频 URL。`mv` 支持 `V4` 到 `V6_WILD`。`style` 和 `title` 为必填。`duration` 为 10–360 的整数，`V5_5`、`V6`、`V6_MINI` 和 `V6_WILD` 支持该参数。

```json theme={"dark"}
{"model":"generate-mashup","callback_url":"https://example.com/webhook","input":{"upload_url_list":["https://example.com/a.mp3","https://example.com/b.mp3"],"custom_mode":true,"instrumental":true,"mv":"V5_5","style":"cinematic electronic","title":"Night Drive","duration":120}}
```


## OpenAPI

````yaml zh/api-manual/music-series/generate-mashup.json POST /api/generate/submit
openapi: 3.1.0
info:
  title: PoYo 生成混搭 API
  version: 1.0.0
  description: 将恰好两条音轨融合成一首新作品。
servers:
  - url: https://api.poyo.ai
security:
  - BearerAuth: []
paths:
  /api/generate/submit:
    post:
      summary: 生成 Suno 混搭
      operationId: submitGenerateMashup
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Request'
            example:
              model: generate-mashup
              callback_url: https://example.com/webhook
              input:
                upload_url_list:
                  - https://example.com/a.mp3
                  - https://example.com/b.mp3
                custom_mode: true
                instrumental: true
                mv: V5_5
                style: cinematic
                title: Mashup
                duration: 120
      responses:
        '200':
          description: 已提交
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Response'
components:
  schemas:
    Request:
      type: object
      required:
        - model
        - input
      properties:
        model:
          type: string
          enum:
            - generate-mashup
        callback_url:
          type: string
          format: uri
        input:
          type: object
          additionalProperties: false
          required:
            - upload_url_list
            - mv
            - style
            - title
          properties:
            upload_url_list:
              type: array
              minItems: 2
              maxItems: 2
              items:
                type: string
                format: uri
                pattern: ^https?://
            custom_mode:
              type: boolean
              default: true
            instrumental:
              type: boolean
              default: true
            mv:
              type: string
              enum:
                - V4
                - V4_5
                - V4_5ALL
                - V4_5PLUS
                - V5
                - V5_5
                - V6
                - V6_MINI
                - V6_WILD
            prompt:
              type: string
              minLength: 1
            style:
              type: string
              minLength: 1
            title:
              type: string
              minLength: 1
            vocal_gender:
              type: string
              enum:
                - m
                - f
            style_weight:
              type: number
              minimum: 0
              maximum: 1
              multipleOf: 0.01
            weirdness_constraint:
              type: number
              minimum: 0
              maximum: 1
              multipleOf: 0.01
            audio_weight:
              type: number
              minimum: 0
              maximum: 1
              multipleOf: 0.01
            duration:
              type: integer
              minimum: 10
              maximum: 360
            lyrics:
              type: string
              maxLength: 5000
            variety:
              type: integer
              minimum: 0
              maximum: 4
            persona_id:
              type: string
            persona_model:
              type: string
              enum:
                - style_persona
                - voice_persona
          allOf:
            - if:
                required:
                  - duration
              then:
                properties:
                  mv:
                    enum:
                      - V5_5
                      - V6
                      - V6_MINI
                      - V6_WILD
            - if:
                required:
                  - persona_id
              then:
                properties:
                  mv:
                    enum:
                      - V5
                      - V5_5
                      - V6
                      - V6_MINI
                      - V6_WILD
            - if:
                properties:
                  custom_mode:
                    const: true
                  mv:
                    const: V4
              then:
                properties:
                  prompt:
                    maxLength: 3000
                  style:
                    maxLength: 200
                  title:
                    maxLength: 80
            - if:
                properties:
                  custom_mode:
                    const: true
                  mv:
                    const: V4_5ALL
              then:
                properties:
                  prompt:
                    maxLength: 5000
                  style:
                    maxLength: 1000
                  title:
                    maxLength: 80
            - if:
                properties:
                  custom_mode:
                    const: true
                  mv:
                    enum:
                      - V4_5
                      - V4_5PLUS
                      - V5
                      - V5_5
                      - V6
                      - V6_MINI
                      - V6_WILD
              then:
                properties:
                  prompt:
                    maxLength: 5000
                  style:
                    maxLength: 1000
                  title:
                    maxLength: 100
    Response:
      type: object
      properties:
        code:
          type: integer
          example: 200
          enum:
            - 200
            - 400
            - 401
            - 402
            - 403
            - 404
            - 408
            - 429
            - 500
            - 502
            - 503
          description: >-
            业务状态码。`200` 表示成功，其他值都表示请求失败。请务必检查这个字段：部分参数校验错误会以 HTTP 200 返回，响应体里的
            `code` 为 `400`。


            - `200`：成功

            - `400`：请求参数无效

            - `401`：API Key 缺失或无效

            - `402`：积分不足

            - `403`：没有权限

            - `404`：资源不存在

            - `408`：请求超时

            - `429`：请求频率超限

            - `500`：服务器内部错误

            - `502`：上游服务错误

            - `503`：服务暂不可用


            详见[错误码](/zh/api-manual/error-codes)。
        data:
          type: object
          required:
            - task_id
            - status
            - created_time
          properties:
            task_id:
              type: string
            status:
              type: string
              enum:
                - not_started
                - running
                - finished
                - failed
              description: |-
                任务状态。

                - `not_started`：排队中，等待处理
                - `running`：生成中
                - `finished`：已完成，结果在 `files` 或 `output` 中
                - `failed`：失败，详情见 `error_message`
            created_time:
              type: string
              format: date-time
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: >-
        所有 API 接口都需要 Bearer Token 认证。


        创建 API Key：登录 PoYo，进入 **仪表盘 → API
        密钥**（[poyo.ai/zh/dashboard/api-key](https://poyo.ai/zh/dashboard/api-key)），点击创建
        Key。


        在请求头中添加：


        ```

        Authorization: Bearer YOUR_API_KEY

        ```

````

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