Skip to main content
MAGIAI
핵심 API검증일 2026-12-02

MAGI-2 API 레퍼런스: Sand.ai Magi AI 영상 엔드포인트 및 스키마

Sand.ai의 플래그십 480B MAGI-2는 Atlas Cloud 상에서 세 가지 표준 Magi AI 영상 API 모델 ID(`sand-ai/magi-2/text-to-video`, `sand-ai/magi-2/image-to-video`, `sand-ai/magi-2/reference-to-video`)를 제공합니다. 모두 `POST https://api.atlascloud.ai/api/v1/model/generateVideo`로 제출하고 `GET /api/v1/model/prediction/{request_id}`로 상태를 조회합니다. 모든 엔드포인트는 네이티브 오디오와 최대 20개의 Omni-Reference를 포함해 초당 $0.08의 균일 도매가(4~30초 정수 단위)로 과금됩니다.

기본 오리진
https://api.atlascloud.ai
제공 모델 수
플래그십 엔드포인트 3종
영상 길이 범위
정수 4~30초 (1초 단위)
최대 프롬프트 길이
최대 15,000자

Atlas Cloud OpenAPI 엔드포인트 스키마 (2026-12-02)

MAGI-2 Text-to-Video

model: "sand-ai/magi-2/text-to-video"
$0.08/s
필드타입필수 여부제약 및 동작
modelstring필수
Literal "sand-ai/magi-2/text-to-video"
Canonical Atlas Cloud model identifier for flagship MAGI-2 T2V.
promptstring필수
1–15,000 characters
Structured director brief describing subjects, camera moves, lighting, timestamped shot cuts, dialogue lines, foley, and explicit "no music" if score is unwanted.
durationinteger선택 (5)
Integer 4–30 (1-second steps)
Requested clip duration in seconds. Billed per integer second.
aspect_ratioenum선택 (16:9)
"16:9" | "9:16" | "21:9" | "4:3" | "3:4" | "1:1"
Target 1080p-class framing ratio.
JSON 요청 예시 (sand-ai/magi-2/text-to-video)
json
{
  "model": "sand-ai/magi-2/text-to-video",
  "prompt": "[00:00-00:04] Medium close-up in a rain-streaked diner booth under warm tungsten overhead lamps, slow 50mm dolly-in. A tired detective sets a chipped ceramic mug on Formica and says calmly: \"You left the ledger at Pier Nine.\" Audio: muffled rain on glass, ceramic clink, no music.",
  "duration": 4,
  "aspect_ratio": "16:9"
}

MAGI-2 Image-to-Video (First / Last Frame)

model: "sand-ai/magi-2/image-to-video"
$0.08/s
필드타입필수 여부제약 및 동작
modelstring필수
Literal "sand-ai/magi-2/image-to-video"
Canonical Atlas Cloud model identifier for flagship MAGI-2 I2V.
imagestring필수
Public HTTPS image URL or Base64 data URI (JPEG/PNG/WebP)
Opening keyframe. Output aspect ratio automatically follows this image.
last_imagestring선택
Public HTTPS image URL or Base64 data URI matching start aspect ratio
Optional closing keyframe for guided start-to-end camera and subject transitions.
promptstring필수
1–15,000 characters
Motion, camera choreography, dialogue, foley, and lighting progression between keyframes.
durationinteger선택 (5)
Integer 4–30 (1-second steps)
Requested clip duration in seconds. Billed per integer second.
JSON 요청 예시 (sand-ai/magi-2/image-to-video)
json
{
  "model": "sand-ai/magi-2/image-to-video",
  "image": "https://assets.magiai.ai/examples/espresso-start.webp",
  "last_image": "https://assets.magiai.ai/examples/espresso-pour-end.webp",
  "prompt": "Macro 100mm locked push-in as tiger-striped espresso crema flows smoothly from a naked portafilter into a preheated stoneware demitasse. Steam rises against a dark slate background. Audio: pump hum, steady espresso drip, subtle ceramic resonance, no music.",
  "duration": 6
}

MAGI-2 Reference-to-Video (Omni-Reference)

model: "sand-ai/magi-2/reference-to-video"
$0.08/s
필드타입필수 여부제약 및 동작
modelstring필수
Literal "sand-ai/magi-2/reference-to-video"
Canonical Atlas Cloud model identifier for flagship MAGI-2 Omni-Reference.
promptstring필수
1–15,000 characters referencing @image_n, @video_n, @audio_n roles
Director brief explicitly binding each uploaded reference slot to its subject, motion, or audio role.
durationinteger선택 (5)
Integer 4–30 (1-second steps)
Requested clip duration in seconds. Flat $0.08/s regardless of reference count.
aspect_ratioenum선택 (16:9)
"16:9" | "9:16" | "21:9" | "4:3" | "3:4" | "1:1"
Target 1080p-class framing ratio.
imagesstring[]선택
Max 10 items (public HTTPS URLs or Base64)
Identity portraits, product angles, wardrobe sheets, or set plates.
videosstring[]선택
Max 5 public HTTPS URLs; 2–30s each; combined duration <= 30s
Camera movement, actor blocking, or performance pacing references.
audiosstring[]선택
Max 5 public HTTPS URLs; 2–30s each; combined duration <= 30s
Voice timbre samples, spoken stems, musical grooves, or foley beds.
JSON 요청 예시 (sand-ai/magi-2/reference-to-video)
json
{
  "model": "sand-ai/magi-2/reference-to-video",
  "prompt": "Using the speaker in @image_1 wearing the linen jacket in @image_2 inside the sunlit studio from @image_3, match the natural voice timbre of @audio_1 and slow handheld framing of @video_1. [00:00-00:05] She holds the serum bottle toward camera and says clearly: \"Three drops after cleansing keeps winter redness calm all day.\" Audio: crisp room tone, soft glass click, no music.",
  "duration": 8,
  "aspect_ratio": "9:16",
  "images": [
    "https://assets.magiai.ai/examples/founder-portrait.webp",
    "https://assets.magiai.ai/examples/serum-bottle.webp",
    "https://assets.magiai.ai/examples/bathroom-vanity.webp"
  ],
  "videos": [
    "https://assets.magiai.ai/examples/handheld-framing-4s.mp4"
  ],
  "audios": [
    "https://assets.magiai.ai/examples/founder-voice-5s.wav"
  ]
}

인증, 헤더 및 기본 엔드포인트

Atlas Cloud 직접 요청에는 모두 HTTPS 환경에서 `Authorization: Bearer <API_KEY>` 및 `Content-Type: application/json` 헤더가 필요합니다. 응답은 최상위 `data` 객체 아래에 예측 메타데이터를 감싸서 반환합니다(클라이언트 파서에서는 방어적으로 최상위 폴백 필드도 함께 처리하는 것을 권장합니다). MagiAI Studio의 통합 워크스페이스는 크레딧 예약 및 디스패치(POST), 상태 대사 및 원장 잔액 조회(GET)를 위한 `/api/jobs` 인증 엔드포인트와 범위 제한 `mgk_live_*` 자격 증명 발급용 `/api/keys` 엔드포인트를 제공합니다.

표준 HTTP 엔드포인트 및 과금 처리 규격
작업메서드 및 URL성공 상태 코드비고
MAGI-2 작업 제출 (Atlas 직접 연동)POST https://api.atlascloud.ai/api/v1/model/generateVideo200 / 201 / 202T2V, I2V 또는 Omni-Ref를 비동기 디스패치하고 `data.id`를 반환
예측 상태 폴링 (Atlas 직접 연동)GET https://api.atlascloud.ai/api/v1/model/prediction/{request_id}200 OK`completed`, `succeeded`, `failed` 또는 `canceled`가 될 때까지 20~30초마다 폴링
작업 제출 (MagiAI Studio)POST https://magiai.ai/api/jobs201 Created프롬프트/레퍼런스 검증, R2V 시 `likenessConsent` 강제, 초당 10 cr 원자적 보류
작업 목록 조회 및 대사 (MagiAI Studio)GET https://magiai.ai/api/jobs200 OK진행 중인 렌더링을 폴링하고 실패/필터링된 작업에 대해 100% 자동 크레딧 환불 반영

필드 네이밍 차이: Atlas Cloud 직접 연동 vs. MagiAI Studio `/api/jobs`

MagiAI Studio 작업과 원시 Atlas Cloud 호출을 연계할 때는 두 가지 스키마 차이를 반드시 염두에 두어야 합니다. 첫째, `sand-ai/magi-2/image-to-video`는 `aspect_ratio` 파라미터를 **받지 않으며** 항상 입력으로 제공된 시작 `image`의 화면비를 그대로 상속합니다. 둘째, MagiAI Studio의 `/api/jobs` 엔드포인트는 camelCase 키(`aspectRatio`, `lastImage`, `referenceImages`, `referenceVideos`, `referenceAudios`, `likenessConsent`)를 사용하며, 통합 크레딧 지갑을 추적하면서 이를 업스트림 공급자 페이로드로 자동 변환합니다.

MagiAI Studio POST /api/jobs 페이로드 (동의 잠금이 포함된 Omni-Reference)
json
{
  "mode": "reference-to-video",
  "prompt": "Using Mara (@image_1) in the diner booth (@image_2) with dry voice (@audio_1) and dolly pacing (@video_1): [00:00-00:05] She sets down the ceramic mug and says calmly: \"You left the ledger at Pier Nine.\" Audio: rain on glass, ceramic clink, no music.",
  "duration": 8,
  "aspectRatio": "16:9",
  "referenceImages": [
    "https://assets.magiai.ai/examples/founder-portrait.webp",
    "https://assets.magiai.ai/examples/diner-booth.webp"
  ],
  "referenceVideos": ["https://assets.magiai.ai/examples/handheld-framing-4s.mp4"],
  "referenceAudios": ["https://assets.magiai.ai/examples/founder-voice-5s.wav"],
  "likenessConsent": true
}
엔지니어링 참고: MagiAI Studio는 `likenessConsent`가 명시적으로 true이고 최소 1개 이상의 레퍼런스 슬롯이 제공되지 않으면 reference-to-video 제출을 HTTP 400으로 거부합니다.

HTTP 상태 코드 및 최종 예측 상태

재시도 가능한 전송 오류(HTTP 429 속도/동시성 제한, HTTP 502/503/504 일시적 엣지 타임아웃)와 재시도할 수 없는 페이로드 오류(HTTP 400/422: 잘못된 duration, 20개 초과 레퍼런스, 레퍼런스 영상/오디오 합산 길이 30초 초과, 또는 HEIC 이미지)를 항상 명확히 구분해 처리하세요.

응답 코드별 결정적 클라이언트 복구 동작
코드 / 상태의미크레딧 / 과금 영향클라이언트 권장 조치
processing / queued업스트림 480B 클러스터에서 활성 처리 중차감 보류(hold) 활성20~30초마다 계속 폴링 (일반적으로 7~26분 소요)
completed / succeeded + outputs[0]1080p @ 25fps MP4 생성 완료보류 금액 최종 정산 ($0.08/s / 10 cr/s)즉시 MP4를 다운로드하여 R2/S3에 아카이브
completed + empty outputs[]PG-13 안전 필터에 의해 출력물 차단됨업스트림 $0 청구 · 100% 자동 환불`policy_filtered`로 표시, 지갑 환불 처리, PG-13 수정 가이드 안내
failed / canceled업스트림 오류 또는 검열 차단업스트림 $0 청구 · 100% 자동 환불`error` 메시지 확인 후 프롬프트나 에셋 수정 뒤 재시도
HTTP 402지갑 크레딧 부족 (MagiAI Studio)차감 없음만료 없는 PAYG 팩 충전을 사용자에게 안내
HTTP 429계정 동시성 또는 속도 제한 도달차감 없음`Retry-After` 헤더를 준수하거나 활성 슬롯이 비워질 때까지 로컬 대기열에서 대기

API 호스트 선택 및 멀티 모델 라우팅 아키텍처

MAGI-2에 직접 연동하는 팀은 2026-12-02 기준 모두 초당 $0.08 기본 요율을 책정한 퍼스트파티 Sand.ai Direct(`platform.sand.ai`), Atlas Cloud(`atlascloud.ai`), WaveSpeedAI(`wavespeed.ai`), Runware(`runware.ai`), 또는 Higgsfield API에 연결할 수 있습니다. 백엔드에서 단일 API 키와 통합 인보이스로 MAGI-2와 함께 Kling 4.0, Seedance 2.5, Google Veo 3.1 및 텍스트 LLM을 오케스트레이션해야 한다면 SpicyAPI(`https://spicyapi.ai`) 같은 멀티 모델 개발자 게이트웨이를 통해 공급자별 SDK 어댑터를 따로 유지보수하는 부담을 없앨 수 있습니다. 참고로 2026-12-02 현재 fal.ai(`r/fal` 기준 로드맵 단계)와 Replicate는 모두 플래그십 480B MAGI-2를 호스팅하지 않습니다.

관련 기술 문서

MAGI-2 API 레퍼런스: 엔드포인트 및 요청 스키마