curl --request POST \
--url https://api.evolink.ai/v1/videos/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "magi-2-reference-to-video",
"prompt": "참조 비디오의 카메라 워크와 리듬을 따라 이미지 속 캐릭터가 도시의 옥상에서 춤추게 하고, 참조 오디오의 비트에 맞춘다",
"image_urls": [
"https://example.com/character.jpg"
],
"video_urls": [
"https://example.com/reference.mp4"
],
"audio_urls": [
"https://example.com/bgm.mp3"
],
"duration": 10,
"quality": "1080p",
"aspect_ratio": "16:9",
"generate_audio": true
}
'{
"created": 1761313744,
"id": "task-unified-1774857405-abc123",
"model": "magi-2-reference-to-video",
"object": "video.generation.task",
"progress": 0,
"status": "pending",
"task_info": {
"can_cancel": false,
"estimated_time": 165,
"video_duration": 8
},
"type": "video",
"usage": {
"billing_rule": "per_second",
"credits_reserved": 50
}
}{
"error": {
"code": "invalid_request",
"message": "Invalid request parameters",
"type": "invalid_request_error"
}
}{
"error": {
"code": "unauthorized",
"message": "Invalid or expired token",
"type": "authentication_error"
}
}{
"error": {
"code": "insufficient_quota",
"message": "Insufficient quota. Please top up your account.",
"type": "insufficient_quota"
}
}{
"error": {
"code": "model_access_denied",
"message": "Token does not have access to model: magi-2-reference-to-video",
"type": "invalid_request_error"
}
}{
"error": {
"code": "rate_limit_exceeded",
"message": "Too many requests, please try again later",
"type": "rate_limit_error"
}
}{
"error": {
"code": "internal_error",
"message": "Internal server error",
"type": "api_error"
}
}MAGI-2
MAGI-2 Reference-to-Video 멀티모달 참조 비디오
- 참조 이미지(0
10장) + 참조 비디오(05개) + 참조 오디오(0~5개) + 텍스트 프롬프트로 비디오를 생성합니다 - 세 가지 참조 소재 중 최소 하나가 필요하며, 자유롭게 조합할 수 있습니다
- 비동기 처리 모드로, 반환된 작업 ID를 사용하여 조회하세요
- 생성된 비디오 링크는 7일 동안 유효하며, 가능한 빨리 저장하세요
POST
/
v1
/
videos
/
generations
curl --request POST \
--url https://api.evolink.ai/v1/videos/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "magi-2-reference-to-video",
"prompt": "참조 비디오의 카메라 워크와 리듬을 따라 이미지 속 캐릭터가 도시의 옥상에서 춤추게 하고, 참조 오디오의 비트에 맞춘다",
"image_urls": [
"https://example.com/character.jpg"
],
"video_urls": [
"https://example.com/reference.mp4"
],
"audio_urls": [
"https://example.com/bgm.mp3"
],
"duration": 10,
"quality": "1080p",
"aspect_ratio": "16:9",
"generate_audio": true
}
'{
"created": 1761313744,
"id": "task-unified-1774857405-abc123",
"model": "magi-2-reference-to-video",
"object": "video.generation.task",
"progress": 0,
"status": "pending",
"task_info": {
"can_cancel": false,
"estimated_time": 165,
"video_duration": 8
},
"type": "video",
"usage": {
"billing_rule": "per_second",
"credits_reserved": 50
}
}{
"error": {
"code": "invalid_request",
"message": "Invalid request parameters",
"type": "invalid_request_error"
}
}{
"error": {
"code": "unauthorized",
"message": "Invalid or expired token",
"type": "authentication_error"
}
}{
"error": {
"code": "insufficient_quota",
"message": "Insufficient quota. Please top up your account.",
"type": "insufficient_quota"
}
}{
"error": {
"code": "model_access_denied",
"message": "Token does not have access to model: magi-2-reference-to-video",
"type": "invalid_request_error"
}
}{
"error": {
"code": "rate_limit_exceeded",
"message": "Too many requests, please try again later",
"type": "rate_limit_error"
}
}{
"error": {
"code": "internal_error",
"message": "Internal server error",
"type": "api_error"
}
}인증
##모든 API는 Bearer Token 인증이 필요합니다##
API Key 얻기:
API Key 관리 페이지에서 API Key를 받으세요
요청 헤더에 다음을 추가하세요:
Authorization: Bearer YOUR_API_KEY
본문
application/json
참조 비디오 URL 배열, 0~5개
역할 설명:
| 미디어 유형 | 역할 | 일반적인 용도 |
|---|---|---|
| 비디오 | reference_video | 카메라 워크 참조, 동작 참조, 영상 스타일 참조 |
비디오 요구사항:
- 지원 형식:
.mp4,.mov - 단일 비디오 길이:
2~30초, 최대 5개, 모든 비디오 총 길이 <=30초 - 단일 파일 크기:
200MB이하 - HTTPS URL만 지원하며, 비디오 URL은 서버에서 직접 접근 가능해야 합니다
주의: image_urls, video_urls, audio_urls 중 최소 하나를 전달해야 합니다
Maximum array length:
5예시:
["https://example.com/reference.mp4"]
참조 오디오 URL 배열, 0~5개
역할 설명:
| 미디어 유형 | 역할 | 일반적인 용도 |
|---|---|---|
| 오디오 | reference_audio | 배경 음악, 효과음, 음성/대사 참조 |
오디오 요구사항:
- 지원 형식:
.wav,.mp3 - 단일 오디오 길이:
2~30초, 최대 5개, 모든 오디오 총 길이 <=30초 - 단일 파일 크기:
15MB이하 - HTTPS URL만 지원하며, 오디오 URL은 서버에서 직접 접근 가능해야 합니다
주의: image_urls, video_urls, audio_urls 중 최소 하나를 전달해야 합니다
Maximum array length:
5예시:
["https://example.com/bgm.mp3"]
작업 완료 후 HTTPS 콜백 주소
콜백 시점:
- 작업 완료(completed), 실패(failed) 또는 취소(cancelled) 시 트리거
- 과금 확인 완료 후 전송
보안 제한:
- HTTPS 프로토콜만 지원
- 내부 네트워크 IP 주소로의 콜백 금지(127.0.0.1, 10.x.x.x, 172.16-31.x.x, 192.168.x.x 등)
- URL 길이는
2048자를 초과할 수 없습니다
콜백 메커니즘:
- 타임아웃:
10초 - 실패 시 최대
3회 재시도(실패 후 각각1/2/4초 후 재시도) - 콜백 응답 본문 형식은 작업 조회 API 반환 형식과 동일
- 2xx 상태 코드를 성공으로 간주하며, 다른 상태 코드는 재시도를 트리거합니다
예시:
"https://your-domain.com/webhooks/video-task-completed"
응답
비디오 생성 작업이 성공적으로 생성되었습니다