> ## Documentation Index
> Fetch the complete documentation index at: https://dripart-feat-openapi-i18n.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# 텍스트 프롬프트에서 음악 생성

> Sonilo 텍스트-음악 AI를 사용하여 텍스트 프롬프트로 음악을 생성합니다.
원하는 음악을 설명하는 프롬프트와 호출자가 지정한 길이가 필요합니다.
제목, 오디오 청크 및 완료 이벤트가 포함된 스트리밍 NDJSON 응답을 반환합니다.




## OpenAPI

````yaml /openapi/registry.ko.yaml post /proxy/sonilo/t2m/generate
openapi: 3.0.2
info:
  title: Comfy API
  version: '1.0'
servers:
  - url: https://api.comfy.org
security: []
paths:
  /proxy/sonilo/t2m/generate:
    post:
      tags:
        - Sonilo
        - Proxy
      summary: 텍스트 프롬프트에서 음악 생성
      description: |
        Sonilo 텍스트-음악 AI를 사용하여 텍스트 프롬프트로 음악을 생성합니다.
        원하는 음악을 설명하는 프롬프트와 호출자가 지정한 길이가 필요합니다.
        제목, 오디오 청크 및 완료 이벤트가 포함된 스트리밍 NDJSON 응답을 반환합니다.
      operationId: SoniloTextToMusicGenerate
      requestBody:
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/SoniloTextToMusicRequest'
        required: true
      responses:
        '200':
          content:
            application/x-ndjson:
              schema:
                $ref: '#/components/schemas/SoniloStreamEvent'
          description: OK - 오디오 생성 이벤트가 포함된 스트리밍 NDJSON 응답
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SoniloErrorResponse'
          description: 잘못된 요청
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SoniloErrorResponse'
          description: 인증되지 않음 - 유효하지 않거나 누락된 API 키
        '402':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SoniloErrorResponse'
          description: 결제 필요 - 잔액 부족
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SoniloErrorResponse'
          description: 처리할 수 없는 엔티티 - 검증 오류
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SoniloErrorResponse'
          description: 너무 많은 요청 - 속도 제한됨
        '502':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SoniloErrorResponse'
          description: 잘못된 게이트웨이 - 업스트림 생성 오류
      security:
        - BearerAuth: []
components:
  schemas:
    SoniloTextToMusicRequest:
      properties:
        duration:
          description: 출력 트랙의 원하는 지속 시간(초)입니다.
          maximum: 360
          minimum: 1
          type: integer
        prompt:
          description: 원하는 음악을 설명하는 텍스트 프롬프트입니다. 최대 길이는 1000자입니다.
          maxLength: 1000
          minLength: 1
          type: string
      required:
        - prompt
        - duration
      type: object
    SoniloStreamEvent:
      description: >-
        Sonilo 스트리밍 응답의 단일 NDJSON 이벤트입니다. 나열된 것 외에 추가 이벤트 유형이 나타날 수 있습니다. 알 수 없는
        유형은 클라이언트에서 무시해야 합니다.
      oneOf:
        - properties:
            copy_index:
              minimum: 0
              type: integer
            display_tags:
              items:
                type: string
              type: array
            prompt_index:
              minimum: 0
              type: integer
            stream_index:
              minimum: 0
              type: integer
            summary:
              description: 생성된 트랙에 대한 짧은 자연어 설명입니다.
              type: string
            title:
              type: string
            type:
              enum:
                - title
              type: string
          required:
            - type
            - stream_index
            - prompt_index
            - copy_index
            - title
            - display_tags
          type: object
        - properties:
            channels:
              type: integer
            data:
              description: Base64로 인코딩된 AAC를 fMP4 조각으로 제공하며, stream_index별로 연결합니다.
              type: string
            num_streams:
              minimum: 1
              type: integer
            sample_rate:
              type: integer
            stream_index:
              minimum: 0
              type: integer
            type:
              enum:
                - audio_chunk
              type: string
          required:
            - type
            - sample_rate
            - channels
            - stream_index
            - num_streams
            - data
          type: object
        - properties:
            type:
              enum:
                - complete
              type: string
          required:
            - type
          type: object
        - properties:
            code:
              type: string
            message:
              type: string
            type:
              enum:
                - error
              type: string
          required:
            - type
            - message
          type: object
    SoniloErrorResponse:
      properties:
        detail:
          properties:
            code:
              description: 오류 코드
              type: string
            message:
              description: 사람이 읽을 수 있는 오류 메시지
              type: string
          type: object
      type: object
  securitySchemes:
    BearerAuth:
      bearerFormat: JWT
      scheme: bearer
      type: http

````