메인 콘텐츠로 건너뛰기
GET
/
v1
/
music
/
tasks
/
{task_id}
curl --request GET \
  --url https://api.apimart.ai/v1/music/tasks/task_01K8AYYM6R03TGZ3Q2P0TZVNPX?language=ko \
  --header 'Authorization: Bearer <token>'
import requests

task_id = "task_01K8AYYM6R03TGZ3Q2P0TZVNPX"
url = f"https://api.apimart.ai/v1/music/tasks/{task_id}"

headers = {
    "Authorization": "Bearer <token>"
}

params = {
    "language": "ko"
}

response = requests.get(url, headers=headers, params=params)

print(response.json())
const taskId = "task_01K8AYYM6R03TGZ3Q2P0TZVNPX";
const url = `https://api.apimart.ai/v1/music/tasks/${taskId}?language=ko`;

const headers = {
  "Authorization": "Bearer <token>"
};

fetch(url, {
  method: "GET",
  headers: headers
})
  .then(response => response.json())
  .then(data => console.log(data))
  .catch(error => console.error("Error:", error));
{
  "code": 200,
  "data": {
    "id": "task_01K8AYYM6R03TGZ3Q2P0TZVNPX",
    "status": "completed",
    "progress": 100,
    "created": 1783413241,
    "completed": 1783413352,
    "actual_time": 111,
    "cost": 0.06,
    "credits_cost": 0.6,
    "result": {
      "music": [
        {
          "clip_id": "a41aade4-993e-4d28-b56f-d97e7ef7167c",
          "title": "My Song",
          "duration_seconds": "181.70666667",
          "audio_url": "https://cdn.apimart.ai/audio/flowmusic_a41aade4.m4a",
          "wav_url": "https://cdn.apimart.ai/audio/flowmusic_a41aade4.wav"
        }
      ]
    }
  }
}
{
  "error": {
    "message": "task not found",
    "type": "invalid_request",
    "param": "task_id",
    "code": "task_not_found"
  }
}
{
  "error": {
    "message": "현재 그룹 용량이 포화 상태입니다. 잠시 후 다시 시도해 주세요",
    "type": "rate_limit_error",
    "param": "",
    "code": "rate_limit_error"
  }
}
curl --request GET \
  --url https://api.apimart.ai/v1/music/tasks/task_01K8AYYM6R03TGZ3Q2P0TZVNPX?language=ko \
  --header 'Authorization: Bearer <token>'
import requests

task_id = "task_01K8AYYM6R03TGZ3Q2P0TZVNPX"
url = f"https://api.apimart.ai/v1/music/tasks/{task_id}"

headers = {
    "Authorization": "Bearer <token>"
}

params = {
    "language": "ko"
}

response = requests.get(url, headers=headers, params=params)

print(response.json())
const taskId = "task_01K8AYYM6R03TGZ3Q2P0TZVNPX";
const url = `https://api.apimart.ai/v1/music/tasks/${taskId}?language=ko`;

const headers = {
  "Authorization": "Bearer <token>"
};

fetch(url, {
  method: "GET",
  headers: headers
})
  .then(response => response.json())
  .then(data => console.log(data))
  .catch(error => console.error("Error:", error));
{
  "code": 200,
  "data": {
    "id": "task_01K8AYYM6R03TGZ3Q2P0TZVNPX",
    "status": "completed",
    "progress": 100,
    "created": 1783413241,
    "completed": 1783413352,
    "actual_time": 111,
    "cost": 0.06,
    "credits_cost": 0.6,
    "result": {
      "music": [
        {
          "clip_id": "a41aade4-993e-4d28-b56f-d97e7ef7167c",
          "title": "My Song",
          "duration_seconds": "181.70666667",
          "audio_url": "https://cdn.apimart.ai/audio/flowmusic_a41aade4.m4a",
          "wav_url": "https://cdn.apimart.ai/audio/flowmusic_a41aade4.wav"
        }
      ]
    }
  }
}
{
  "error": {
    "message": "task not found",
    "type": "invalid_request",
    "param": "task_id",
    "code": "task_not_found"
  }
}
{
  "error": {
    "message": "현재 그룹 용량이 포화 상태입니다. 잠시 후 다시 시도해 주세요",
    "type": "rate_limit_error",
    "param": "",
    "code": "rate_limit_error"
  }
}

인증

Authorization
string
필수
모든 Flow Music 엔드포인트는 Bearer Token 인증이 필요합니다API Key 발급 방법:API Key 관리 페이지에 접속하여 API Key를 발급받으세요요청 헤더에 추가:
Authorization: Bearer YOUR_API_KEY

경로 파라미터

task_id
string
필수
Flow Music 작업 제출 후 반환되는 작업 ID
작업 ID는 제출 응답의 data[0].task_id에서 가져옵니다.

쿼리 파라미터

language
string
기본값:"zh"
오류 메시지 및 일부 안내 문구의 언어허용 값: zh, en, ja, ko

응답 필드

code
integer
응답 상태 코드, 성공 시 200
data
object
작업 상세 정보

결과 구조

음악 작업

음악 생성, 음악 연장, 구간 교체, Cover 편곡, 음원 분리, 오디오 업로드, 오디오 다운로드 및 비디오 렌더링은 일반적으로 result.music 배열을 반환합니다.
{
  "result": {
    "music": [
      {
        "clip_id": "a41aade4-993e-4d28-b56f-d97e7ef7167c",
        "audio_url": "https://cdn.apimart.ai/audio/flowmusic_a41aade4.m4a",
        "wav_url": "https://cdn.apimart.ai/audio/flowmusic_a41aade4.wav",
        "video_url": "https://cdn.apimart.ai/video/flowmusic_a41aade4.mp4",
        "file_url": "https://cdn.apimart.ai/audio/flowmusic_a41aade4_stems.zip"
      }
    ]
  }
}

가사 작업

가사 생성은 result.lyrics 배열을 반환합니다.
{
  "result": {
    "lyrics": [
      {
        "title": "Bleached",
        "lyrics": "[Intro]\n(Check)\n(One two)\n..."
      }
    ]
  }
}

사용 안내

Flow Music 제출 엔드포인트는 모두 비동기 작업입니다. 제출 성공 후 먼저 task_id를 획득한 다음, 본 엔드포인트를 호출하여 작업 상태를 폴링하세요. statuscompleted가 되면 result에서 생성 결과를 읽습니다.