> ## 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.

# 音乐延伸

> 对生成的音频进行延伸扩展，**注意：需要上一条任务成功完成后方可使用此接口进行延伸扩展**



## OpenAPI

````yaml openapi/cn/flowmuisc.json POST /flowmusic/v1/extend
openapi: 3.1.0
info:
  title: Flowmusic API DOCS
  version: 1.0.0
  description: TTAPI Flowmusic API 接口服务，目前集成了市场上最为领先的音乐大模型。
servers:
  - url: https://api.ttapi.io
security: []
paths:
  /flowmusic/v1/extend:
    post:
      description: 对生成的音频进行延伸扩展，**注意：需要上一条任务成功完成后方可使用此接口进行延伸扩展**
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExtendRequest'
      responses:
        '200':
          $ref: '#/components/responses/SuccessResponse'
        '400':
          $ref: '#/components/responses/400Response'
        '401':
          $ref: '#/components/responses/401Response'
      security:
        - CustomApiKey: []
components:
  schemas:
    ExtendRequest:
      type: object
      properties:
        clip_id:
          type: string
          description: 源音乐 clip_id
        model:
          type: string
          description: 音乐模型名称,为空时默认使用 Lyria 3 Pro
          default: Lyria 3 Pro
        extend_from_s:
          type: number
          description: 从源 clip 的哪个时间点开始续写，单位秒；不能超过源 clip 时长。
        extend_s:
          type: number
          description: 续写时长，单位秒；最大 164 秒。
          maximum: 164
        instruction:
          type: string
          description: 续写音乐的编辑指令。
        title:
          type: string
          description: 续写后音乐标题。
        seed:
          type: string
          description: 随机种子；用于复现或控制生成结果。
        hook_url:
          type: string
          description: 任务完成后的业务回调地址；为空时不推送回调
      required:
        - clip_id
        - extend_from_s
        - extend_s
        - instruction
  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: jobId
            required:
              - status
              - message
              - data
    400Response:
      description: 参数错误
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                type: string
                example: FAILED
              message:
                type: string
                example: '"prompt" cannot be empty.'
              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 密钥。

````