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

# Генерация по аудиореференсам

> Используйте API генерации Suno по аудиореференсам, чтобы генерировать новые песни по 1-4 аудио URL как источникам вдохновения, объединяя референсы с текстом, названием и стилевыми тегами.



## OpenAPI

````yaml openapi/ru/suno.json POST /suno/v1/inspo
openapi: 3.1.0
info:
  title: Документация TTAPI API
  version: 1.0.0
  description: Suno AI Музыка API
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
            - 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: |-
            Вокальный пол.

            - Мужской: Мужской голос

            - Женский: женский голос
          enum:
            - Male
            - Female
    IsStorageParams:
      type: object
      properties:
        isStorage:
          type: boolean
          default: true
          description: |-
            Сохранять ли сгенерированный звук.

            - **true**: аудио будет сохранено и будет возвращено TTAPI CDN URL.
            - **false**: будет возвращен исходный источник URL.
    HookUrlParams:
      type: object
      properties:
        hookUrl:
          type: string
          description: URL обратного уведомления
  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: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
            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: >-
        Вы можете получить API-ключ в <a href='https://dashboard.ttapi.io'
        target='_blank'>панель управления TTAPI</a>.

````