Model APIs
MAGI-2
SeedRouter에서 MAGI-2 텍스트-투-비디오, 첫/마지막 프레임 이미지-투-비디오, 멀티모달 레퍼런스-투-비디오 생성을 위한 비동기 API 레퍼런스입니다.
MAGI-2는 Sand.ai의 480B 네이티브 오디오-비디오 모델입니다. SeedRouter에서는 통합 비동기 동영상 엔드포인트(POST /v1/videos/generations) 아래 세 개의 공개 모델 ID로 제공되며, 태스크 폴링은 GET /v1/tasks/{id}에서 수행합니다.
| 모델 ID | 모드 | 필수 입력 |
|---|---|---|
magi-2-text-to-video | 텍스트-투-비디오 | prompt(공백 불가, 최대 15,000자) |
magi-2-image-to-video | 첫 / 첫·마지막 프레임 이미지-투-비디오 | image_urls(공개 HTTP/HTTPS 이미지 URL 1~2개) |
magi-2-reference-to-video | 멀티모달 레퍼런스-투-비디오 | image_urls, video_urls, audio_urls 중 최소 1개 |
세 경로 모두 4~30초(정수) 길이의 1080p MP4 동영상을 생성하며, 동기화된 대사·효과음·음악을 선택적으로 포함할 수 있습니다(기본값 generate_audio: true).
엔드포인트 및 인증
- 태스크 제출:
POST https://api.seedrouter.ai/v1/videos/generations - 태스크 상태 폴링:
GET https://api.seedrouter.ai/v1/tasks/{id} - 인증:
Authorization: Bearer YOUR_API_KEY - Content-Type:
application/json
요청 파라미터
알 수 없는 필드는 HTTP 400(invalid_request_error)으로 거부됩니다.
| 파라미터 | 타입 | 기본값 | 제약 조건 및 설명 |
|---|---|---|---|
model | string | 필수 | magi-2-text-to-video, magi-2-image-to-video 또는 magi-2-reference-to-video. |
prompt | string | — | magi-2-text-to-video에서는 필수, image-to-video 및 reference-to-video에서는 선택 사항입니다. 입력할 경우 공백이 아니어야 하며 최대 15,000자까지 허용됩니다. |
image_urls | string[] | — | 공개 HTTP/HTTPS 이미지 URL(Base64 및 data: URI 불가, 각 30 MB 미만). magi-2-text-to-video에서는 허용되지 않습니다. magi-2-image-to-video에서는 1장(첫 프레임) 또는 2장(첫/마지막 프레임)이 필수입니다. magi-2-reference-to-video에서는 최대 10장까지 허용됩니다. |
video_urls | string[] | — | magi-2-reference-to-video 전용입니다. 공개 HTTP/HTTPS MP4/MOV 레퍼런스 동영상 최대 5개(각 200 MB 이하, 2~30초, 총 길이 ≤ 30초). |
audio_urls | string[] | — | magi-2-reference-to-video 전용입니다. 공개 HTTP/HTTPS WAV/MP3 레퍼런스 오디오 트랙 최대 5개(각 15 MB 이하, 2~30초, 총 길이 ≤ 30초). |
duration | integer | 5 | 요청할 출력 길이(초). 4에서 30 사이의 정수입니다. |
quality | string | "1080p" | 출력 해상도입니다. 현재 "1080p"를 지원합니다. |
aspect_ratio | string | "16:9" | "16:9", "9:16", "1:1", "4:3", "3:4", "21:9" 중 하나입니다. |
generate_audio | boolean | true | 추가 요금 없이 동기화된 대사, 효과음, 음악을 생성합니다. 무음 동영상이 필요하면 false로 설정하세요. |
seed | integer | — | 재현 가능한 실행을 위한 선택적 난수 시드(0~4294967295)입니다. |
예제
1. 텍스트-투-비디오
curl -X POST https://api.seedrouter.ai/v1/videos/generations \
-H "Authorization: Bearer $SEEDROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "magi-2-text-to-video",
"prompt": "Continuous 5-second tracking shot through a rainy Tokyo alley at dusk, neon reflections on wet asphalt, distant train rumble and footsteps",
"duration": 5,
"quality": "1080p",
"aspect_ratio": "16:9",
"generate_audio": true
}'2. 이미지-투-비디오(첫 / 마지막 프레임)
curl -X POST https://api.seedrouter.ai/v1/videos/generations \
-H "Authorization: Bearer $SEEDROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "magi-2-image-to-video",
"prompt": "The camera slowly pushes in as subtle natural motion brings the frame to life",
"image_urls": [
"https://example.com/first-frame.jpg"
],
"duration": 5,
"quality": "1080p",
"aspect_ratio": "16:9",
"generate_audio": true
}'3. 레퍼런스-투-비디오
curl -X POST https://api.seedrouter.ai/v1/videos/generations \
-H "Authorization: Bearer $SEEDROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "magi-2-reference-to-video",
"prompt": "The same character walks through a sunlit street market, handheld tracking shot",
"image_urls": [
"https://example.com/character.jpg"
],
"duration": 5,
"quality": "1080p",
"aspect_ratio": "16:9",
"generate_audio": true
}'4. 태스크 결과 폴링
curl https://api.seedrouter.ai/v1/tasks/task_xxxxxxxx \
-H "Authorization: Bearer $SEEDROUTER_API_KEY"제출 시 다음과 같이 응답합니다.
{
"id": "task_xxxxxxxx",
"model": "magi-2-text-to-video",
"status": "processing",
"created_at": 1764120000
}폴링 결과가 "status": "completed"에 도달하면 생성된 MP4 URL이 output.video_url에 포함됩니다.
{
"id": "task_xxxxxxxx",
"model": "magi-2-text-to-video",
"status": "completed",
"created_at": 1764120000,
"finished_at": 1764120095,
"output": {
"video_url": "https://static.seedrouter.ai/..."
}
}과금
세 가지 MAGI-2 경로 모두 1080p 기준 요청한 출력 초수(duration 4~30초)에 따라 과금됩니다. 레퍼런스 이미지, 레퍼런스 동영상, 레퍼런스 오디오 트랙 및 동기화 오디오 생성에는 추가 요금이 없습니다. 실패한 태스크에는 과금되지 않습니다.
현재 실시간 초당 요금은 MAGI-2 모델 페이지에서 확인하실 수 있습니다.
