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

# Suno Upload Extend API 文档

> 通过一条请求上传外部音频并续写延伸。

当你已有可公开访问的音频地址，又不想分别调用 [上传](/api/cn/suno/suno_upload) 和 [续写扩展](/api/cn/suno/suno_extend) 时，使用该接口即可一次完成上传并延伸。

<Callout type="info">
  * 提交可公开访问的 `audio_url`，建议音频时长不超过 8 分钟。
  * `continue_at` 必须 `>= 1`，且必须小于上传音频的实际时长。
  * 该接口始终按自定义模式处理。如果 `prompt` 为空，则按纯音乐延伸。\\
  * 保存返回的 `jobId`，再通过 [Suno Fetch V2](/api/cn/suno/suno_fetch_v2) 或 `hookUrl` 回调获取结果。
</Callout>


## OpenAPI

````yaml openapi/cn/suno.json POST /suno/v1/upload-extend
openapi: 3.1.0
info:
  title: TTAPI API DOCS
  version: 1.0.0
  description: Suno 音乐生成相关接口
servers:
  - url: https://api.ttapi.io
security: []
paths:
  /suno/v1/upload-extend:
    post:
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/Mv_Params'
                - $ref: '#/components/schemas/Prompt_Params'
                - $ref: '#/components/schemas/Title_Params'
                - $ref: '#/components/schemas/Tags_Params'
                - $ref: '#/components/schemas/Negative_tags_Params'
                - $ref: '#/components/schemas/Style_weight_Params'
                - $ref: '#/components/schemas/Weirdness_constraint_Params'
                - $ref: '#/components/schemas/Audio_weight_Params'
                - $ref: '#/components/schemas/Duration_Params'
                - $ref: '#/components/schemas/Auto_lyrics_Params'
                - $ref: '#/components/schemas/Vocal_gender_Params'
                - $ref: '#/components/schemas/Persona_id_Params'
                - $ref: '#/components/schemas/Variety_Params'
                - $ref: '#/components/schemas/Max_mode_Params'
                - $ref: '#/components/schemas/Audio_format_Params'
                - $ref: '#/components/schemas/HookUrlParams'
                - type: object
                  properties:
                    audio_url:
                      type: string
                      description: 待上传并延伸的公开音频地址。建议时长不超过 8 分钟。
                    continue_at:
                      type: number
                      example: 10
                      description: 从原音频第几秒开始延伸。必须 >= 1，且必须小于上传音频的实际时长。
                  required:
                    - audio_url
                    - continue_at
                - $ref: '#/components/schemas/IsStorageParams'
      responses:
        '200':
          $ref: '#/components/responses/SuccessResponse'
        '400':
          $ref: '#/components/responses/400Response'
        '401':
          $ref: '#/components/responses/401Response'
      security:
        - CustomApiKey: []
components:
  schemas:
    Mv_Params:
      type: object
      properties:
        mv:
          type: string
          default: chirp-v6
          enum:
            - chirp-v6
            - chirp-v6-wild
            - chirp-v6-mini
          description: >-
            使用模型。可选 `chirp-v6`、`chirp-v6-wild`、`chirp-v6-mini`。Suno
            旧模型已全部下架，传入旧名称会自动映射为 `chirp-v6`，详见 [模型映射](/api/cn/suno#模型映射)。


            创建自定义模型后，也可传入 `chirp-custom:{model_id}`，详见
            [创建自定义模型](/api/cn/suno/suno_create_model)。`persona_id` 与
            `chirp-custom` 不能同时使用。
    Prompt_Params:
      type: object
      properties:
        prompt:
          type: string
          description: >-
            歌词


            自定义模式下(custom=true)：当 instrumental 为 false
            时必填。将作为歌词使用并在生成的音轨中演唱，最多5000字符。
    Title_Params:
      type: object
      properties:
        title:
          type: string
          description: |-
            音乐标题

            自定义模式下(custom=true)使用，最多80字符。
    Tags_Params:
      type: object
      properties:
        tags:
          type: string
          description: |-
            音乐风格

            自定义模式下(custom=true)使用，最多1000字符
          example: rock, blues, hip-hop, r&b
    Negative_tags_Params:
      type: object
      properties:
        negative_tags:
          type: string
          description: |-
            不想要生成的音乐风格

            自定义模式下(custom=true)使用。
    Style_weight_Params:
      type: object
      properties:
        style_weight:
          type: number
          description: |-
            音乐风格权重，范围0.00-1.00

            自定义模式下使用，赋值范围: 0 <= x <= 1。
          example: 0.5
    Weirdness_constraint_Params:
      type: object
      properties:
        weirdness_constraint:
          type: number
          description: |-
            音频奇妙度权重，范围0.00-1.00

            自定义模式下使用，赋值范围: 0 <= x <= 1。
          example: 0.5
    Audio_weight_Params:
      type: object
      properties:
        audio_weight:
          type: number
          description: |-
            音频权重，范围0.00-1.00

            自定义模式下使用，赋值范围: 0 <= x <= 1。
          example: 0.5
    Duration_Params:
      type: object
      properties:
        duration:
          type: int
          description: |-
            音频时长，单位：秒 

            自定义模式下使用，赋值范围: 10 <= x <= 360。
          example: 120
    Auto_lyrics_Params:
      type: object
      properties:
        auto_lyrics:
          type: boolean
          default: false
          description: |-
            是否自动生成歌词，自定义模式专用 

            - **true**：根据输入的歌词进行二次创作，与灵感模式提示词效果一致
            - **false**：使用输入的歌词生成音乐
    Vocal_gender_Params:
      type: object
      properties:
        vocal_gender:
          type: string
          description: |-
            音色性别

            - Male:男性 

            - Female:女性
          enum:
            - Male
            - Female
    Persona_id_Params:
      type: object
      properties:
        persona_id:
          type: string
          description: |-
            音乐风格id，自定义模式专用

            使用此参数为音乐生成特定的音乐风格。不能与 `mv=chirp-custom:{model_id}` 同时使用。
    Variety_Params:
      type: object
      properties:
        variety:
          type: string
          enum:
            - 'off'
            - normal
            - high
            - extra
            - max
          description: |-
            风格多样性。控制生成结果相对指定风格的变化程度。

            - **off**：Exact style（精确风格）
            - **normal**：Balanced variety（均衡变化）
            - **high**：Distinct styles（风格差异明显）
            - **extra**：Bold exploration（大胆探索）
            - **max**：Unreasonably varied（极度发散）
    Max_mode_Params:
      type: object
      properties:
        max_mode:
          type: boolean
          default: false
          description: |-
            是否使用更多计算资源，以在整首歌中最大化一致性。仅自定义模式可用。

            - **false**：否（默认）
            - **true**：是。开启后额度消耗翻倍
    Audio_format_Params:
      type: object
      properties:
        audio_format:
          type: string
          enum:
            - mp3
            - m4a
            - wav
          example: mp3
          description: 任务最终成功后 `audioUrl` 的音频格式。
    HookUrlParams:
      type: object
      properties:
        hookUrl:
          type: string
          description: 回调通知地址
    IsStorageParams:
      type: object
      properties:
        isStorage:
          type: boolean
          default: true
          deprecated: true
          description: |-
            是否转存

            - **true**：音频将进行转存，返回TTAPI CDN地址
            - **false**：返回官方源地址
  responses:
    SuccessResponse:
      description: 请求成功
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                type: string
                example: SUCCESS
              message:
                type: string
                example: success
              data:
                type: object
                example:
                  jobId: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
            required:
              - status
              - message
              - data
    400Response:
      description: 参数错误
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                type: string
                example: FAILED
              message:
                type: string
              data:
                type: object
            required:
              - status
              - message
    401Response:
      description: 授权失败
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                type: string
                example: FAILED
              message:
                type: string
                example: Wrong TT-API-KEY or email is not activated.
            required:
              - status
              - message
  securitySchemes:
    CustomApiKey:
      type: apiKey
      in: header
      name: TT-API-KEY
      description: >-
        请前往 <a href='https://dashboard.ttapi.io' target='_blank'>TTAPI 控制台</a>
        获取 API 密钥。

````