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

# Get a Sonilo task

> Get the status of a Sonilo async task. Poll every 2 to 5 seconds until the
status is `succeeded` or `failed`. A succeeded music task carries
`duration_seconds`, an `audio` object with a temporary download URL and a
`cost` object.




## OpenAPI

````yaml https://api.comfy.org/openapi get /proxy/sonilo/v1/tasks/{task_id}
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/tasks/{task_id}:
    get:
      tags:
        - Sonilo
        - Proxy
      summary: Get a Sonilo task
      description: >
        Get the status of a Sonilo async task. Poll every 2 to 5 seconds until
        the

        status is `succeeded` or `failed`. A succeeded music task carries

        `duration_seconds`, an `audio` object with a temporary download URL and
        a

        `cost` object.
      operationId: SoniloGetTask
      parameters:
        - description: The task_id returned by the submit request.
          in: path
          name: task_id
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SoniloTask'
          description: OK
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SoniloTaskErrorResponse'
          description: Unauthorized - Invalid or missing API key
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SoniloTaskErrorResponse'
          description: Not Found - Unknown task id
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SoniloTaskErrorResponse'
          description: Too Many Requests - Rate limited
      security:
        - BearerAuth: []
        - ApiKeyAuth: []
components:
  schemas:
    SoniloTask:
      properties:
        audio:
          $ref: '#/components/schemas/SoniloTaskAudio'
        cost:
          $ref: '#/components/schemas/SoniloCost'
        duration_seconds:
          description: >-
            Length of the generated audio in seconds. Present when the task
            succeeded.
          format: double
          type: number
        error:
          description: Present when the task failed.
          properties:
            code:
              type: string
            message:
              type: string
          type: object
        refunded:
          description: Present when the task failed. Whether Sonilo reversed the charge.
          type: boolean
        status:
          description: One of processing, succeeded or failed.
          type: string
        task_id:
          type: string
        type:
          description: The task type.
          type: string
      required:
        - task_id
        - status
      type: object
    SoniloTaskErrorResponse:
      properties:
        code:
          description: Error code, e.g. invalid_request.
          type: string
        message:
          description: Human-readable error message.
          type: string
      type: object
    SoniloTaskAudio:
      properties:
        content_type:
          description: Audio MIME type, e.g. audio/wav.
          type: string
        duration_seconds:
          description: Length of the audio file in seconds.
          format: double
          type: number
        file_size:
          description: Audio file size in bytes.
          type: integer
        url:
          description: Temporary download URL for the audio file, valid for 7 days.
          type: string
      type: object
    SoniloCost:
      description: What Sonilo charged for the task. Present when the task succeeded.
      properties:
        billing_after_discount:
          description: Discounted price of the task in USD, as a decimal string.
          type: string
        billing_before_discount:
          description: List price of the task in USD, as a decimal string.
          type: string
        billing_rate_per_sec:
          description: List price per second in USD, as a decimal string.
          type: string
        discount_factor:
          description: Discount factor applied to the list price, as a decimal string.
          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.