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

# Generate a song with lyrics from a text prompt

> Submit a Sonilo Music 1.5 text-to-music-with-lyrics task.
Write lyrics inside the prompt as a `Lyrics:` block with `[Verse]`, `[Chorus]`
and `[Bridge]` section tags; omit the block and the model writes its own words.
Returns a task id. Poll `GET /proxy/sonilo/v1/tasks/{task_id}` until the task
reaches a terminal status.




## OpenAPI

````yaml https://api.comfy.org/openapi post /proxy/sonilo/v1/text-to-music-l
openapi: 3.0.2
info:
  title: Comfy API
  version: '1.0'
servers:
  - url: https://api.comfy.org
security: []
tags:
  - description: Comfy Router's canonical, model-ID-addressed routes.
    name: Comfy Router
  - description: >-
      Signed-in users running Comfy-owned serverless apps with free runs and
      flat or per-second pricing (FE-2737).
    name: App Proxy
paths:
  /proxy/sonilo/v1/text-to-music-l:
    post:
      tags:
        - Sonilo
        - Proxy
      summary: Generate a song with lyrics from a text prompt
      description: >
        Submit a Sonilo Music 1.5 text-to-music-with-lyrics task.

        Write lyrics inside the prompt as a `Lyrics:` block with `[Verse]`,
        `[Chorus]`

        and `[Bridge]` section tags; omit the block and the model writes its own
        words.

        Returns a task id. Poll `GET /proxy/sonilo/v1/tasks/{task_id}` until the
        task

        reaches a terminal status.
      operationId: SoniloTextToMusicLyricsSubmit
      requestBody:
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/SoniloTextToMusicLyricsRequest'
        required: true
      responses:
        '202':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SoniloTaskSubmitResponse'
          description: Accepted - the task is processing
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SoniloTaskErrorResponse'
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SoniloTaskErrorResponse'
          description: Unauthorized - Invalid or missing API key
        '402':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SoniloTaskErrorResponse'
          description: Payment Required - Insufficient funds
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SoniloTaskErrorResponse'
          description: Forbidden - The account has no access to this endpoint
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SoniloTaskErrorResponse'
          description: >-
            Too Many Requests - Rate limited. Also answered when the caller's
            in-flight committed partner spend has reached its ceiling; that
            refusal says so in its message and carries the
            `X-Committed-Spend-Limit`, `X-Committed-Spend-Current` and
            `X-Committed-Spend-Remaining` headers (USD cents).
        '502':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SoniloTaskErrorResponse'
          description: Bad Gateway - Upstream generation error
      security:
        - BearerAuth: []
        - ApiKeyAuth: []
components:
  schemas:
    SoniloTextToMusicLyricsRequest:
      properties:
        duration:
          description: >-
            Approximate target length of the song in seconds. Omit it and the
            model picks a natural length.
          maximum: 360
          minimum: 10
          type: integer
        prompt:
          description: >-
            Text prompt describing the song, max 2000 characters. Lyrics go
            inside the prompt as a `Lyrics:` block with `[Verse]`, `[Chorus]`
            and `[Bridge]` section tags.
          maxLength: 2000
          minLength: 1
          type: string
      required:
        - prompt
      type: object
    SoniloTaskSubmitResponse:
      properties:
        status:
          description: Task status, `processing` on submit.
          type: string
        task_id:
          type: string
      required:
        - task_id
      type: object
    SoniloTaskErrorResponse:
      properties:
        code:
          description: Error code, e.g. invalid_request.
          type: string
        message:
          description: Human-readable error message.
          type: string
      type: object
  securitySchemes:
    BearerAuth:
      bearerFormat: JWT
      description: >-
        Bearer token authentication. Normally a Firebase or Cloud JWT. A
        'comfyui-' prefixed API key is also accepted in this header: the prefix
        classifies the value as an API key and it is validated exactly as if it
        had been sent in X-API-Key.

        Accepted on the operations served by the comfyFirebase auth middleware
        (BE-9720, parity with ingest).
      scheme: bearer
      type: http
    ApiKeyAuth:
      description: >-
        API key authentication. Send the key in the X-API-Key header; keys are
        prefixed with 'comfyui-' and are generated from user account settings.
        The same 'comfyui-' key is also accepted in Authorization: Bearer (see
        BearerAuth), and when both headers carry a key, X-API-Key wins.

        The comfyFirebase auth middleware checks this header before falling back
        to the Authorization bearer token, and it backs both the /customers and
        the /proxy authset entries.
      in: header
      name: X-API-Key
      type: apiKey

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.