> ## 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 Inspo API 文档

> 通过 Suno 灵感生成接口使用 1-4 个音频 URL 作为参考灵感，并结合歌词、标题和风格标签生成新的歌曲。



## OpenAPI

````yaml openapi/cn/suno.json POST /suno/v1/inspo
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/inspo:
    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/Auto_lyrics_Params'
                - $ref: '#/components/schemas/Vocal_gender_Params'
                - $ref: '#/components/schemas/IsStorageParams'
                - $ref: '#/components/schemas/HookUrlParams'
                - type: object
                  properties:
                    audio_urls:
                      type: array
                      description: 公开可访问的音频 URL 列表，用作灵感参考。请提供 1 到 4 个音频文件。
                      items:
                        type: string
                        format: uri
                      minItems: 1
                      maxItems: 4
                      example:
                        - https://example.com/reference-1.mp3
                  required:
                    - audio_urls
                    - mv
      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-v5
          enum:
            - chirp-v5-5
            - chirp-v5
            - chirp-v4-5+
            - chirp-v4-5
            - chirp-v4-5-all
            - chirp-v4
            - chirp-v3-5
            - chirp-v3-0
          description: 使用模型
    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
    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
    IsStorageParams:
      type: object
      properties:
        isStorage:
          type: boolean
          default: true
          description: |-
            是否转存

            - **true**：音频将进行转存，返回TTAPI CDN地址
            - **false**：返回官方源地址
    HookUrlParams:
      type: object
      properties:
        hookUrl:
          type: string
          description: 回调通知地址
  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 密钥。

````