Skip to main content
Meta보통표준

MusicGen

Replicate를 통해 제공되는 Meta의 MusicGen입니다. 텍스트 프롬프트나 참조 멜로디(stereo / melody / large 변형)로 음악을 만들고, 입력 클립을 이어서 생성할 수 있으며 MP3 또는 WAV로 출력합니다. 요청 길이의 초 단위로 과금됩니다.

94 크레딧
8초 기준 — 30.5 + 7.9 × 초 (실측 요율), 30초는 약 270
텍스트→음악과 멜로디 조건 생성
입력 오디오 클립 이어 만들기
4개 모델 변형(stereo-melody-large, stereo-large, melody-large, large)
생성당 최대 30초
샘플링 제어(top_k, top_p, temperature, CFG)

지금 바로 실행해보세요

콘솔의 Playground에서 별도 코드 없이 이 모델을 즉시 테스트할 수 있어요

로그인 후 사용해보기

AI 어시스턴트에서 사용하기

이 모델의 사용법을 Claude, ChatGPT 등에 복사

빠른 시작

curl -X POST "https://api.core.today/v1/predictions" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: cdt_your_api_key" \
  -d '{
  "model": "meta/musicgen",
  "input": {
    "prompt": "Upbeat K-pop electro-pop company jingle instrumental, 128 BPM, synth brass stabs, punchy drums, bright synth lead, catchy hook, fun and playful",
    "model_version": "stereo-melody-large",
    "duration": 30,
    "output_format": "mp3"
  }
}'

파라미터

파라미터타입필수기본값설명
promptstringYes-생성할 음악 설명
model_versionstringNostereo-melody-large모델 변형. stereo-*는 스테레오, melody-*는 input_audio를 멜로디 참조로 사용
stereo-melody-largestereo-largemelody-largelarge
durationintegerNo8생성 길이(초, 1-30). 초당 과금
input_audiostringNo-출력에 영향을 주는 오디오. continuation이면 이어 만들고, 아니면 멜로디를 모방(melody 모델)
continuationbooleanNofalsetrue면 input_audio에 이어서 생성
continuation_startintegerNo0continuation에 쓸 input_audio 시작 시각(초)
continuation_endintegerNo-continuation에 쓸 input_audio 종료 시각(초). 생략하면 끝까지
multi_band_diffusionbooleanNofalseEnCodec 토큰을 MultiBand Diffusion으로 디코딩(비스테레오 모델만)
normalization_strategystringNoloudness오디오 정규화 방식
loudnessclippeakrms
top_kintegerNo250상위 k개 토큰으로 샘플링 제한
top_pnumberNo0누적 확률 샘플링. 0이면 top_k 사용
temperaturenumberNo1샘플링 온도. 높을수록 다양
classifier_free_guidanceintegerNo3입력의 영향력. 높을수록 프롬프트를 더 따름
output_formatstringNowav출력 형식
wavmp3
seedintegerNo-랜덤 시드. 생략 또는 -1이면 무작위

파일 입력 방법

이 모델의 input_audio 파라미터에 파일을 전달하는 방법은 3가지입니다.

추천

이미지 URL 전달

공개 접근 가능한 URL을 직접 전달합니다. Storage API(POST /v1/files/upload-url)로 업로드하면 파일이 S3로 직접 올라가고(파일당 50MB), 반환된 file_url을 그대로 쓰면 됩니다.

{
  "model": "meta/musicgen",
  "input": {
    "prompt": "your prompt here",
    "input_audio": "https://example.com/image.jpg"
  }
}

간편 업로드 (Multipart)

POST /v1/predictions/upload에 파일을 직접 첨부합니다. 별도 업로드 과정이 없는 대신, 파일이 API 서버를 거치므로 요청 전체 10MB 제한이 적용됩니다.

curl -X POST "https://api.core.today/v1/predictions/upload" \
  -H "X-API-Key: cdt_your_api_key" \
  -F "model=meta/musicgen" \
  -F 'input={"prompt":"your prompt here"}' \
  -F "file:input_audio=@your_file.png"
File Upload 문서에서 Presigned URL 방식 등 더 자세한 업로드 방법을 확인하세요.

공통 파라미터

POST /v1/predictions 요청 시 사용되는 공통 파라미터입니다.

파라미터타입필수기본값설명
modelstringYes-모델 식별자
inputobjectYes-위 테이블의 모델별 파라미터를 포함하는 객체
output_folderstringNo-결과물 저장 폴더 경로 (최대 256자, '..' 사용 불가)
webhook_urlstringNo-완료 시 호출할 Webhook URL
is_publicbooleanNofalsetrue 시 결과물을 영구 공개 URL로도 제공

예제

코어닷투데이 테마 (연주곡)

모든 연주곡 모델에 같은 테마 프롬프트를 주고 만든 공통 샘플 — 결과를 나란히 비교해 보세요

curl -X POST "https://api.core.today/v1/predictions" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: cdt_your_api_key" \
  -d '{
  "model": "meta/musicgen",
  "input": {
    "prompt": "Upbeat K-pop electro-pop company jingle instrumental, 128 BPM, synth brass stabs, punchy drums, bright synth lead, catchy hook, fun and playful",
    "model_version": "stereo-melody-large",
    "duration": 30,
    "output_format": "mp3"
  }
}'

8초 시네마틱 큐

stereo-large 변형과 MP3 출력, 기본 길이

curl -X POST "https://api.core.today/v1/predictions" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: cdt_your_api_key" \
  -d '{
  "model": "meta/musicgen",
  "input": {
    "prompt": "Triumphant cinematic orchestral melody in G major leading to a crescendo",
    "model_version": "stereo-large",
    "duration": 8,
    "output_format": "mp3"
  }
}'

30초 포크 멜로디 (large)

모노 large 변형으로 최대 길이 — 약 270 크레딧

curl -X POST "https://api.core.today/v1/predictions" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: cdt_your_api_key" \
  -d '{
  "model": "meta/musicgen",
  "input": {
    "prompt": "Acoustic guitar folk melody, gentle and warm",
    "model_version": "large",
    "duration": 30,
    "output_format": "mp3"
  }
}'

팁 & 모범 사례

1과금은 30.5 + 초당 7.9 크레딧(실측): 8초 약 94, 15초 약 150, 30초 약 270
2멜로디를 유지하고 스타일만 바꾸려면 melody-* 변형에 input_audio를 주세요
3기존 클립을 연장하려면 continuation을 true로
4multi_band_diffusion은 비스테레오 변형(melody-large, large)에서만 동작

사용 사례

짧은 연주 루프·베드
기존 멜로디의 변주
continuation으로 클립 연장