Elevenlabs Music V2.5
elevenlabs/music-v2.5
가격
elevenlabs/music-v2.5 per minute (rounded up)
| 단가 | $0.860 |
|---|
소개 준비 중
이 모델의 상세 가이드를 준비 중입니다. 아래의 가격, 파라미터, API 문서는 이미 확인하실 수 있습니다.
생성 작업 제출
https://api.hiapi.ai/v1/tasks 헤더
Authorizationstring필수계정 API 키. 모든 요청에 필수입니다. 예: Bearer YOUR_HIAPI_API_KEY. API 키 받기
Content-Typestring선택요청 본문은 항상 JSON으로 파싱됩니다. 전송 시 application/json(charset 포함 가능)만 허용되며, 다른 값은 415를 반환합니다. 예: application/json.
Idempotency-Keystring선택멱등 키. 최대 255바이트. 같은 계정에서 같은 키의 재시도는 태스크를 한 번만 생성하며, 재전송 시 최초의 taskId를 반환합니다.
네트워크 타임아웃이나 클라이언트 자동 재시도 시 같은 키로는 태스크를 한 번만 생성하고 이중 과금되지 않습니다(범위 = API 키의 계정). 업무 고유 식별자(예: "order-42")를 키로 사용할 것을 권장합니다. 같은 키 재전송 시 최초 taskId를 반환하며, 키는 첫 제출 후 24시간 뒤 만료됩니다. 자세한 시나리오 표는 통합 비동기 API 소개 페이지를 참고하세요.
본문
modelstring필수현재 고정 값: elevenlabs/music-v2.5
routestring선택현재 고정 값: default
inputobject필수
elevenlabs/music-v2.5 및 루트 default의 비즈니스 파라미터 객체. 아래 파라미터 표를 참조하세요.
seedinteger선택min 0max 2147483647Composition plan mode only. Same seed and parameters give more consistent, not identical, results.
modelstring선택기본값: "elevenlabs/music-v2.5"Model name
elevenlabs/music-v2.5promptstring선택minLength 1maxLength 4100pattern \SDescribe genre, mood, instruments, vocals, structure and lyrics. Supply a prompt or a composition plan, not both.
output_formatstring선택기본값: "mp3_48000_192"codec_samplerate_bitrate, for example mp3_48000_192.
mp3_22050_32mp3_24000_48mp3_44100_32mp3_44100_64mp3_44100_96mp3_44100_128mp3_44100_192mp3_48000_128전체 보기(17개)
mp3_48000_192mp3_48000_240mp3_48000_320pcm_8000pcm_16000pcm_22050pcm_24000pcm_32000pcm_44100pcm_48000ulaw_8000alaw_8000opus_48000_32opus_48000_64opus_48000_96opus_48000_128opus_48000_192music_length_msinteger선택기본값: 60000min 3000max 600000Length of the generated music in milliseconds, 3,000 to 600,000. Prompt mode only. Defaults to 60,000 (1 minute).
composition_planobject선택
Chunk-by-chunk plan. 1 to 30 chunks, total duration 3,000 to 600,000 ms. Supply a composition plan or a prompt, not both.
chunksarray필수minItems 1maxItems 30
Array [ object ]
배열 항목
textstring필수minLength 1Optional [Section name] followed by lyric lines; inline directions in {curly braces}. Up to 30 lines of 200 characters.
duration_msinteger필수min 3000max 120000audio_referenceobject선택
end_msinteger선택Defaults to 30,000 ms after start_ms or the end of the clip. The window is at most 30,000 ms.
start_msinteger선택기본값: 0min 0strengthstring선택lowmediumhighxhighaudio_urlstring필수Audio clip whose style conditions this chunk. The reference on the first chunk influences the whole song.
negative_stylesarray선택Array [ string ]
positive_stylesarray필수Styles and musical directions for this chunk, English works best. The first chunk sets the overall tone.
Array [ string ]
context_adherencestring선택lowmediumhighforce_instrumentalboolean선택기본값: falseGuarantee an instrumental result without vocals. Prompt mode only.
callbackobject선택
종료 상태 알림 설정. 생략하면 콜백이 전송되지 않으며 호출 측에서 폴링합니다.
생성 시 callback.url을 지정하면 태스크 종료 시 HiAPI가 서비스로 POST하여 폴링이 필요 없습니다. 콜백 본문은 태스크 상세와 동일한 구조입니다. 서명 검증·재시도·멱등에 대한 자세한 내용은 통합 비동기 API 소개 페이지의 콜백 설명을 참고하세요.
urlstring필수callback 사용 시 필수. 태스크 종료 후 이 URL로 POST됩니다. 유효한 http(s) URL이어야 합니다.
whenstring선택기본값: "final"현재는 final만 지원(success / fail 모두 알림).
finalstoragestring선택기본값: "temp"산출물 저장 등급: temp(기본·약 7일) 또는 persistent(장기 보관·용량 과금). 잔액 부족이나 저장 한도 초과 시 자동으로 temp로 강등됩니다. 실제 적용된 등급은 태스크 상세 응답에서 확인할 수 있습니다.
temppersistent요청 예시
# 비동기 태스크 제출. 성공 시 즉시 taskId 반환(생성 완료 대기 없음)
curl -X POST "https://api.hiapi.ai/v1/tasks" \
-H "Authorization: Bearer $HIAPI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "elevenlabs/music-v2.5",
"input": {
"model": "elevenlabs/music-v2.5",
"output_format": "mp3_48000_192",
"music_length_ms": 60000,
"force_instrumental": false
}
}' const res = await fetch("https://api.hiapi.ai/v1/tasks", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.HIAPI_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
model: "elevenlabs/music-v2.5",
input: {
"model": "elevenlabs/music-v2.5",
"output_format": "mp3_48000_192",
"music_length_ms": 60000,
"force_instrumental": false
}
}),
});
const task = await res.json();
// { code: 200, message: "success", data: { taskId } } import os, requests
res = requests.post(
"https://api.hiapi.ai/v1/tasks",
headers={"Authorization": f"Bearer {os.environ['HIAPI_API_KEY']}"},
json={
"model": "elevenlabs/music-v2.5",
"input": {
"model": "elevenlabs/music-v2.5",
"output_format": "mp3_48000_192",
"music_length_ms": 60000,
"force_instrumental": false
}
},
)
print(res.json()) # { code, message, data: { taskId } } 200 OK
{
"code": 200,
"message": "success",
"data": {
"taskId": "tk-hiapi-01HZTQ8BX2N3GM3YFK4Z9D7VQR"
}
} 400 Bad Request
{
"code": 400,
"message": "invalid request",
"data": null,
"error_code": "INVALID_REQUEST"
} 작업 상세 조회
https://api.hiapi.ai/v1/tasks/:id 응답 필드
taskIdstring필수태스크 ID. 접두사는 항상 tk-hiapi-.
modelstring필수확인된 전체 모델명. route 파라미터로 제출한 태스크는 base@route(예: gpt-image-2/text-to-image@ext)를 반환하며, 그 외에는 제출 시의 모델명과 동일합니다.
routestring선택route 파라미터를 명시해 제출한 태스크에만 나타나며, 제출한 값을 그대로 반환합니다.
statusstring필수태스크 상태.
queued 대기 중, 아직 시작되지 않음.
handling 처리 중.
archiving 처리 완료, 산출물 준비 중.
success 종료: 완료. 산출물 사용 가능(output 반환).
fail 종료: 실패(error 반환).
제출 후 status로 판단합니다: success와 fail이 종료 상태이며 나머지는 비종료입니다. 1~3초 간격으로 종료까지 폴링하세요. 성공 시 output[].url에서 산출물을 다운로드하고 expireAt 전에 옮기세요. 장기 보관이 필요하면 생성 시 storage: "persistent"를 사용하세요.
creatednumber필수태스크 생성 시각(Unix 초).
completednumber필수종료 상태가 된 Unix 초. 비종료 상태에서는 0.
outputarray선택
status == success일 때만 나타납니다. 산출물 목록 — 항상 배열이며, 하나의 태스크에서 여러 type을 동시에 반환할 수 있습니다(예: video + first_frame).
Array [ object ]
배열 항목
urlstring필수산출물 URL. 바로 다운로드할 수 있습니다.
typestring필수현재 가능한 값: video, image, audio, first_frame, last_frame, thumbnail. 이후 확장될 수 있습니다.
expireAtnumber필수산출물 접근 가능 기한(Unix 초). 만료 전에 다운로드하거나 이전하세요.
errorobject선택
status == fail일 때만 나타납니다.
codestring필수비즈니스 오류 코드.
messagestring필수오류 설명.
응답 예시
성공
{
"code": 200,
"message": "success",
"data": {
"taskId": "tk-hiapi-01HZTQ8BX2N3GM3YFK4Z9D7VQR",
"model": "happyhorse-1-0",
"status": "success",
"created": 1777282033,
"completed": 1777282099,
"output": [
{
"url": "https://cdn.hiapi.ai/tasks/.../video.mp4",
"type": "video",
"expireAt": 1777886899
}
]
}
} 처리 중(비종료)
{
"code": 200,
"message": "success",
"data": {
"taskId": "tk-hiapi-...",
"model": "happyhorse-1-0",
"status": "archiving",
"created": 1777282033,
"completed": 0
}
} 실패
{
"code": 200,
"message": "success",
"data": {
"taskId": "tk-hiapi-...",
"model": "happyhorse-1-0",
"status": "fail",
"created": 1777282033,
"completed": 1777282099,
"error": {
"code": "TASK_FAILED",
"message": "task failed"
}
}
}