Integrating and Using the Suno Tasks API

The Suno Tasks API can query the execution status of Suno requests, such as song generation and audio export, using a task ID.

Application Process

Go to the orchats Console to obtain an API Key with task query permissions. The examples use the API_KEY environment variable.

Please use the same application identity that submitted the task to query it. Queries do not consume Credits.

If you have not yet logged in or registered, you will be automatically redirected to the login page to register and log in, and then automatically returned to the current page.

API Keys for general-purpose applications can be used for services enabled for the account; Keys for dedicated applications are used within the application's service scope. Please check the Key's permissions, validity period, and limits, and confirm that the application balance is sufficient to pay for this request. Available trial credits are subject to what is shown in your account; if the balance is insufficient, click the "Recharge" button.

📘 Full documentation: Suno Audios Generation API →

Request Example

Take an asynchronous song task from the Suno Audios Generation API as an example. Save the returned task_id after submission.

The following is a song task from an actual test, with the task ID c409f30d-4b2f-4ad9-8ae7-f394e367713d. Please replace it with your own task ID in the code.

Task Example

Submit a retrieve query using the task ID above. The completion time appears in finished_at. For this task, response.success is true, and response.data contains two candidates: Room for One More Chair and Always Room for More.

Set Request Headers and Request Body

Request Headers include:

  • accept: Specifies that the response should be in JSON format; set it to application/json here.
  • authorization: The key used to call the API, which can be selected directly from the dropdown after applying.

Request Body includes:

  • id: The submitted task ID.
  • action: The operation to perform on the task.

The request body is as follows.

{
  "action": "retrieve",
  "id": "c409f30d-4b2f-4ad9-8ae7-f394e367713d"
}

Code Examples

The corresponding call code can be generated on the right side of the debugging page. cURL and Python examples are provided below.

CURL

curl -sS -X POST 'https://api.orchats.repoingest.com/suno/tasks' \
  -H "Authorization: Bearer $API_KEY" \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -d '{
  "action": "retrieve",
  "id": "c409f30d-4b2f-4ad9-8ae7-f394e367713d"
}'

Python

import os

import requests

url = "https://api.orchats.repoingest.com/suno/tasks"
headers = {
    "accept": "application/json",
    "authorization": f"Bearer {os.environ['API_KEY']}",
    "content-type": "application/json",
}
payload = {
    "action": "retrieve",
    "id": "c409f30d-4b2f-4ad9-8ae7-f394e367713d",
}

response = requests.post(url, json=payload, headers=headers, timeout=180)
print(response.text)

Response Example

After a successful request, the API will return the details of the song task shown here. For example:

{
  "id": "c409f30d-4b2f-4ad9-8ae7-f394e367713d",
  "type": "audios",
  "created_at": 1796115741.863,
  "started_at": 1796115741.863,
  "finished_at": 1796115800.404,
  "elapsed": 58.541,
  "request": {
    "action": "generate",
    "model": "chirp-v6",
    "prompt": "A song for Christmas"
  },
  "trace_id": "f9ff7920-2b74-4c69-867b-183cd41166fa",
  "response": {
    "success": true,
    "task_id": "c409f30d-4b2f-4ad9-8ae7-f394e367713d",
    "trace_id": "f9ff7920-2b74-4c69-867b-183cd41166fa",
    "data": [
      {
        "id": "15b56d7a-1ad1-4dc6-bc74-79b102caceeb",
        "title": "Room for One More Chair",
        "lyric": "[Verse 1]\nThe kettle sings, the window steams\nA paper chain hangs slightly crooked\nYou set the old tin on the shelf\nAnd laugh at how the years have kept it",
        "audio_url": "https://cdn.acedata2.cloud/suno/15b56d7a-1ad1-4dc6-bc74-79b102caceeb.mp3",
        "created_at": "2026-12-01T09:02:22.466Z",
        "model": "chirp-v6",
        "state": "succeeded",
        "prompt": "A song for Christmas",
        "style": "Cinematic Christmas pop with film-score scale, a steady four-on-the-floor pulse, driving syncopated percussion, and a repeating cello ostinato. Begin with intimate piano and close, warm lead vocals; build through layered strings, brass swells, and wordless choir accents into a wide, uplifting final chorus. Polished, spacious mix with clear vocal focus and dynamic section lifts.",
        "duration": 231.96
      },
      {
        "id": "555bf85a-907c-4573-b6f3-e816c04aabb9",
        "title": "Always Room for More",
        "lyric": "[Intro]\n[Wordless vocals]\nOh—ah, oh—ah\n[Verse 1]\nSnow gathers softly on the windowpane",
        "audio_url": "https://cdn.acedata2.cloud/suno/555bf85a-907c-4573-b6f3-e816c04aabb9.mp3",
        "created_at": "2026-12-01T09:02:22.466Z",
        "model": "chirp-v6",
        "state": "succeeded",
        "prompt": "A song for Christmas",
        "style": "Cinematic Christmas pop with marathon-film scale, syncopated rhythmic drive, cello ostinato, four-on-the-floor pulse, and wordless vocal drops. Begin with a restrained cello figure and distant wordless voices; build into a broad, uplifting chorus with layered strings, punchy percussion, and a clear lead vocal. Use a brief countdown-style dropout before the final chorus, then finish with a full, resolved orchestral-pop ending. Polished, spacious mix with strong low-end and crisp rhythmic detail.",
        "duration": 231.2
      }
    ],
    "cost": {
      "amount": 0.504,
      "currency": "credit",
      "list_amount": 0.56
    }
  }
}

The returned result contains multiple fields. The request field is the request body used to initiate the task, while the response field is the response body returned after the task is completed. The fields are described below.

  • id, the ID of this song generation task, used to uniquely identify it.
  • request, the request information in the song task being queried.
  • response, the result returned when the task is completed. For newly generated songs, response.data[].image_url is the original cover URL; when a high-resolution cover is available, it can be read from image_large_url. Historical tasks return the links saved at the time.
  • created_at, the task creation time, as a Unix timestamp (seconds, floating-point).
  • started_at, the time the task started, as a Unix timestamp (seconds, floating-point).
  • finished_at, the task completion time, as a Unix timestamp (seconds). Missing or empty when the task is incomplete.
  • elapsed, the task execution time in seconds. Provided after the task is completed. HTTP 200 indicates that the query was successful. First wait for finished_at to have a value, then read response.success. After the task succeeds, retrieve response.data; if it fails, check response.error.

Batch Query Operation

When querying multiple tasks in a batch, set action to retrieve_batch.

The Request Body includes:

  • ids: An array of uploaded task IDs.
  • action: The operation to perform on the tasks.

The request body is as follows.

{
  "action": "retrieve_batch",
  "ids": [
    "c409f30d-4b2f-4ad9-8ae7-f394e367713d",
    "1a01d321-6780-4d8e-8612-02a0fad33102"
  ]
}

Code Example

You can submit the same request body using cURL or Python.

Response Example

After a successful request, the API will return the specific details of all song tasks in this batch. For example:

{
  "items": [
    {
      "id": "c409f30d-4b2f-4ad9-8ae7-f394e367713d",
      "type": "audios",
      "created_at": 1796115741.863,
      "started_at": 1796115741.863,
      "finished_at": 1796115800.404,
      "elapsed": 58.541,
      "request": {
        "action": "generate",
        "model": "chirp-v6",
        "prompt": "A song for Christmas"
      },
      "trace_id": "f9ff7920-2b74-4c69-867b-183cd41166fa",
      "response": {
        "success": true,
        "task_id": "c409f30d-4b2f-4ad9-8ae7-f394e367713d",
        "trace_id": "f9ff7920-2b74-4c69-867b-183cd41166fa",
        "data": [
          {
            "id": "15b56d7a-1ad1-4dc6-bc74-79b102caceeb",
            "title": "Room for One More Chair",
            "lyric": "[Verse 1]\nThe kettle sings, the window steams\nA paper chain hangs slightly crooked\nYou set the old tin on the shelf\nAnd laugh at how the years have kept it",
            "audio_url": "https://cdn.acedata2.cloud/suno/15b56d7a-1ad1-4dc6-bc74-79b102caceeb.mp3",
            "created_at": "2026-12-01T09:02:22.466Z",
            "model": "chirp-v6",
            "state": "succeeded",
            "prompt": "A song for Christmas",
            "style": "Cinematic Christmas pop with film-score scale, a steady four-on-the-floor pulse, driving syncopated percussion, and a repeating cello ostinato. Begin with intimate piano and close, warm lead vocals; build through layered strings, brass swells, and wordless choir accents into a wide, uplifting final chorus. Polished, spacious mix with clear vocal focus and dynamic section lifts.",
            "duration": 231.96
          },
          {
            "id": "555bf85a-907c-4573-b6f3-e816c04aabb9",
            "title": "Always Room for More",
            "lyric": "[Intro]\n[Wordless vocals]\nOh—ah, oh—ah\n[Verse 1]\nSnow gathers softly on the windowpane",
            "audio_url": "https://cdn.acedata2.cloud/suno/555bf85a-907c-4573-b6f3-e816c04aabb9.mp3",
            "created_at": "2026-12-01T09:02:22.466Z",
            "model": "chirp-v6",
            "state": "succeeded",
            "prompt": "A song for Christmas",
            "style": "Cinematic Christmas pop with marathon-film scale, syncopated rhythmic drive, cello ostinato, four-on-the-floor pulse, and wordless vocal drops. Begin with a restrained cello figure and distant wordless voices; build into a broad, uplifting chorus with layered strings, punchy percussion, and a clear lead vocal. Use a brief countdown-style dropout before the final chorus, then finish with a full, resolved orchestral-pop ending. Polished, spacious mix with strong low-end and crisp rhythmic detail.",
            "duration": 231.2
          }
        ],
        "cost": {
          "amount": 0.504,
          "currency": "credit",
          "list_amount": 0.56
        }
      }
    },
    {
      "id": "1a01d321-6780-4d8e-8612-02a0fad33102",
      "type": "audios",
      "created_at": 1796115741.902,
      "started_at": 1796115741.902,
      "finished_at": 1796115778.27,
      "elapsed": 36.368,
      "request": {
        "action": "generate",
        "model": "chirp-v6",
        "title": "Window Lights",
        "style": "Soft acoustic folk, fingerpicked guitar and brushed drums",
        "lyric": "[Verse]\nWindow lights across the bay\nGuide the boats that drift away\n[Chorus]\nBring the morning home to me\nFold the stars into the sea",
        "custom": true,
        "duration": 90,
        "async": true
      },
      "trace_id": "ffddaa23-a3dd-44de-aa4e-58a6e3f1ca2c",
      "response": {
        "success": true,
        "task_id": "1a01d321-6780-4d8e-8612-02a0fad33102",
        "trace_id": "ffddaa23-a3dd-44de-aa4e-58a6e3f1ca2c",
        "data": [
          {
            "id": "8603c0f3-a396-455c-b945-fb48e65bf014",
            "title": "Window Lights",
            "lyric": "[Verse]\nWindow lights across the bay\nGuide the boats that drift away\n[Chorus]\nBring the morning home to me\nFold the stars into the sea",
            "audio_url": "https://cdn.acedata2.cloud/suno/8603c0f3-a396-455c-b945-fb48e65bf014.mp3",
            "created_at": "2026-12-01T09:02:22.389Z",
            "model": "chirp-v6",
            "state": "succeeded",
            "style": "Soft acoustic folk, fingerpicked guitar and brushed drums",
            "duration": 89.48
          },
          {
            "id": "50487a72-bc9c-4511-93d7-e2949dfb00c0",
            "title": "Window Lights",
            "lyric": "[Verse]\nWindow lights across the bay\nGuide the boats that drift away\n[Chorus]\nBring the morning home to me\nFold the stars into the sea",
            "audio_url": "https://cdn.acedata2.cloud/suno/50487a72-bc9c-4511-93d7-e2949dfb00c0.mp3",
            "created_at": "2026-12-01T09:02:22.389Z",
            "model": "chirp-v6",
            "state": "succeeded",
            "style": "Soft acoustic folk, fingerpicked guitar and brushed drums",
            "duration": 89.56
          }
        ],
        "cost": {
          "amount": 0.504,
          "currency": "credit",
          "list_amount": 0.56
        }
      }
    }
  ],
  "count": 2
}

The result contains multiple fields, of which items contains the specific details of the batch song tasks. The details of each song task use the same fields as above, and the field information is as follows.

  • items: All specific details of the batch song tasks. It is an array, and each element has the same format as the result returned when querying a single task above.
  • count: The number of song tasks queried in this batch.

CURL

curl -sS -X POST 'https://api.orchats.repoingest.com/suno/tasks' \
  -H "Authorization: Bearer $API_KEY" \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -d '{
  "action": "retrieve_batch",
  "ids": [
    "c409f30d-4b2f-4ad9-8ae7-f394e367713d",
    "1a01d321-6780-4d8e-8612-02a0fad33102"
  ]
}'

Python

import os

import requests

url = "https://api.orchats.repoingest.com/suno/tasks"
headers = {
    "accept": "application/json",
    "authorization": f"Bearer {os.environ['API_KEY']}",
    "content-type": "application/json",
}
payload = {
    "action": "retrieve_batch",
    "ids": ["c409f30d-4b2f-4ad9-8ae7-f394e367713d", "1a01d321-6780-4d8e-8612-02a0fad33102"],
}

response = requests.post(url, json=payload, headers=headers, timeout=180)
print(response.text)

Error Handling

When calling the API, if an error occurs, the API will return the corresponding error code and message. For example:

  • 400 token_mismatched: Check the task ID and the associated application.
  • 400 api_not_implemented: Check the query operation and parameters.
  • 401 invalid_token: Check whether the API Key is valid.
  • 429 too_many_requests: Slow down polling according to Retry-After (if present) or a backoff strategy.
  • 500 api_error: Retain the trace_id and query the same task after the network connection is restored.

Error Response Example

{
  "success": false,
  "error": {
    "code": "api_error",
    "message": "fetch failed"
  },
  "trace_id": "2cf86e86-22a4-46e1-ac2f-032c0f2a4e89"
}

Task Failure

A query can still return HTTP 200. Below is the query result after a remaster task failed.

{
  "id": "add2ba31-609e-48ca-9933-5711a88067fe",
  "finished_at": 1796063763.654,
  "response": {
    "success": false,
    "task_id": "add2ba31-609e-48ca-9933-5711a88067fe",
    "trace_id": "47579d6e-185f-462e-83d2-6c827675e58d",
    "error": {
      "code": "timeout",
      "message": "timeout while waiting for audio generation"
    }
  }
}

Task failure details are located in response.error. Check the optional retryable field before retrying. Retry rules for song generation Through this document, you have learned all the specific details of how to use the Suno Tasks API to query individual or batch song tasks. We hope this document helps you better integrate and use the API. If you have any questions, please feel free to contact our technical support team.