Suno Tasks API 연동 및 사용

Suno Tasks API는 작업 ID를 통해 노래 생성, 오디오 내보내기 등 Suno 요청의 실행 상황을 조회할 수 있습니다.

신청 절차

orchats 콘솔에서 작업 조회 권한이 있는 API Key를 발급받습니다. 예제에서는 환경 변수 API_KEY를 사용합니다.

작업을 제출할 때 사용한 애플리케이션의 신원으로 조회해 주세요. 조회에는 Credits가 소모되지 않습니다.

아직 로그인하거나 가입하지 않았다면 자동으로 로그인 페이지로 이동하여 가입 및 로그인을 안내하며, 완료 후 자동으로 현재 페이지로 돌아옵니다.

범용 애플리케이션의 API Key는 계정에 사용이 허용된 서비스에 사용할 수 있으며, 전용 애플리케이션의 Key는 해당 애플리케이션의 서비스 범위에 따라 사용합니다. Key의 권한, 유효 기간 및 한도를 확인하고, 애플리케이션 잔액이 이번 요청 비용을 지불하기에 충분한지 확인해 주세요. 사용 가능한 체험 한도는 계정에 표시된 내용을 기준으로 하며, 잔액이 부족할 때는 「충전」 버튼을 클릭하면 됩니다.

📘 전체 문서: Suno Audios Generation API →

요청 예제

Suno Audios Generation API의 비동기 노래 작업을 예로 듭니다. 제출 후 반환된 task_id를 저장합니다.

다음은 실제로 테스트한 노래 작업으로, 작업 ID는 c409f30d-4b2f-4ad9-8ae7-f394e367713d입니다. 코드에서 자신의 작업 ID로 바꿔 주세요.

작업 예제

위의 작업 ID로 retrieve 조회를 제출합니다. 완료 시간은 finished_at에 표시됩니다. 이번 작업의 response.success는 true이며, response.data에는 Room for One More Chair와 Always Room for More 두 곡의 후보가 있습니다.

요청 헤더 및 요청 본문 설정

요청 헤더에는 다음이 포함됩니다.

  • accept: JSON 형식의 응답 결과를 받도록 지정하며, 여기서는 application/json을 입력합니다.
  • authorization: API 호출에 사용하는 키로, 신청 후 드롭다운에서 바로 선택할 수 있습니다.

요청 본문에는 다음이 포함됩니다.

  • id: 업로드한 작업 ID.
  • action: 작업에 대한 조작 방식.

요청 본문은 다음과 같습니다.

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

코드 예제

디버깅 페이지 오른쪽에서 해당 호출 코드를 생성할 수 있으며, 아래에 cURL과 Python 예제를 각각 제시합니다.

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)

응답 예제

요청이 성공하면 API는 이 노래 작업의 상세 정보를 반환합니다. 예를 들면 다음과 같습니다.

{
  "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
    }
  }
}

반환 결과에는 여러 필드가 있으며, request 필드는 작업을 시작할 때의 request body이고 response 필드는 작업 완료 후 반환되는 response body입니다. 필드에 대한 설명은 다음과 같습니다.

  • id, 이 노래 작업의 ID로, 이번 노래 생성 작업을 고유하게 식별하는 데 사용됩니다.
  • request, 조회하는 노래 작업의 요청 정보.
  • response, 작업 완료 시 반환되는 결과. 새로 생성된 노래의 response.data[].image_url은 원본 커버 URL이며, 고화질 커버가 제공되는 경우 image_large_url에서 읽을 수 있습니다. 이전 작업은 당시 저장된 링크를 반환합니다.
  • created_at, 작업 생성 시간, Unix 타임스탬프(초, 부동 소수점).
  • started_at, 작업 실행 시작 시간, Unix 타임스탬프(초, 부동 소수점).
  • finished_at, 작업 완료 시간, Unix 타임스탬프(초). 작업이 완료되지 않았을 때는 없거나 비어 있습니다.
  • elapsed, 작업 실행 소요 시간으로, 단위는 초입니다. 작업 완료 후 제공됩니다. HTTP 200은 조회가 성공했음을 나타냅니다. 먼저 finished_at에 값이 생길 때까지 기다린 다음 response.success를 읽습니다. 작업이 성공하면 response.data를 가져오고, 실패하면 response.error를 확인합니다.

일괄 조회 작업

여러 작업을 일괄 조회할 때는 action을 retrieve_batch로 설정합니다.

요청 본문에는 다음이 포함됩니다.

  • ids: 업로드한 작업 ID 배열.
  • action: 작업에 대한 처리 방식.

요청 본문은 다음과 같습니다.

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

코드 예제

cURL 또는 Python을 사용하여 동일한 요청 본문을 제출할 수 있습니다.

응답 예제

요청이 성공하면 API는 이번에 일괄 조회한 모든 노래 작업의 구체적인 상세 정보를 반환합니다. 예를 들면 다음과 같습니다.

{
  "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
}

반환 결과에는 여러 필드가 있으며, 그중 items에는 일괄 조회한 노래 작업의 구체적인 상세 정보가 포함됩니다. 각 노래 작업의 구체적인 정보는 위의 필드와 같으며, 필드 정보는 다음과 같습니다.

  • items, 일괄 조회한 노래 작업의 모든 구체적인 상세 정보입니다. 배열이며, 각 배열 요소의 형식은 위에서 단일 작업을 조회한 반환 결과의 형식과 같습니다.
  • count, 여기서 일괄 조회한 노래 작업의 개수입니다.

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)

오류 처리

API를 호출할 때 오류가 발생하면 API는 해당 오류 코드와 정보를 반환합니다. 예를 들면 다음과 같습니다.

  • 400 token_mismatched: 작업 ID와 애플리케이션의 소속 관계를 확인합니다.
  • 400 api_not_implemented: 조회 작업과 매개변수를 확인합니다.
  • 401 invalid_token: API Key가 유효한지 확인합니다.
  • 429 too_many_requests: Retry-After(있는 경우) 또는 백오프 전략에 따라 폴링 속도를 늦춥니다.
  • 500 api_error: trace_id를 보관하고 네트워크가 복구된 후 동일한 작업을 조회합니다.

오류 응답 예시

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

작업 자체 실패

조회 시에도 HTTP 200이 반환될 수 있습니다. 아래는 리메이크 작업이 실패한 후의 조회 결과입니다.

{
  "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"
    }
  }
}

작업 실패 세부 정보는 response.error에 있습니다. 재시도하기 전에 선택적 retryable 필드를 확인합니다. 노래 생성 재시도 규칙 이 문서를 통해 Suno Tasks API를 사용하여 단일 또는 일괄 노래 작업을 조회하는 방법에 대한 모든 구체적인 세부 정보를 알아보았습니다. 이 문서가 해당 API를 더 잘 연동하고 사용하는 데 도움이 되기를 바랍니다. 궁금한 점이 있으면 언제든지 기술 지원팀에 문의해 주세요.