# MAGI-2 API > MAGI-2 API (https://magi2api.net) is an independent API platform providing hosted REST API access to Sand.ai's MAGI-2 audio-video model. Sand.ai developed and released the MAGI-2 model (480B total / ~28B active Multi-Head Latent MoE, released November 24, 2026) to generate 4 to 30 seconds of 1080p 25fps video with synchronized bilingual speech lip-sync, foley, and up to 20 multimodal references. MAGI-2 API operates as an independent API platform that hosts programmatic REST access to `model: "magi-2"` with pay-per-second billing ($0.088/s), 24-hour Idempotency-Key protection, automatic refunds on failed tasks, and watermark-free MP4 delivery. API Base URL: `https://magi2api.net/api`. Authentication: `Authorization: Bearer $MAGI2_API_KEY`. Agent Manifest: `https://magi2api.net/agent.md`. OpenAPI 3.1 Schema: `https://magi2api.net/openapi.json`. Support: support@magi2api.net. ## When to use MAGI-2 API Use MAGI-2 API when an application, video workflow, or coding agent needs programmatic access to Sand.ai MAGI-2 for 4-30s 1080p 25fps video with synchronized dialogue and sound effects, strong image-to-video fidelity (#1 on Artificial Analysis Video Arena v2.1 I2V at 1163 +/- 14 Elo), first/last keyframe transitions, or up to 20 multimodal references (10 images + 5 videos + 5 audio clips) without running an 8-GPU server cluster. How to call MAGI-2 API: send `POST https://magi2api.net/api/v1/videos/tasks` with `{"model":"magi-2","prompt":"...","duration":8,"resolution":"1080p"}` and an `Idempotency-Key` header. Poll `GET https://magi2api.net/api/v1/tasks/{task_id}` every 8 seconds until `status === "succeeded"`, then download the watermark-free MP4 within 72 hours. Best-fit jobs: product hero image-to-video animation, first-last keyframe camera sweeps, character-locked and voice-locked multi-shot scenes up to 30 seconds, bilingual lip-sync clips, and automated coding-agent media pipelines. Not a fit: 480p or 720p rough drafts (MAGI-2 outputs 1080p 25fps only; run 4-8s seed-locked checks or draft on Wan 3.0 / MiniMax H3 first), more than 20 reference assets or direct in-place video editing (use Seedance 2.5), or local consumer RTX 4090/5090 hosting. ## Questions and answers ### What is MAGI-2 API, and how does it relate to Sand.ai? MAGI-2 API (https://magi2api.net) is an independent developer API platform that serves the MAGI-2 model over REST endpoints and has no official affiliation with Sand.ai. Sand.ai is the Beijing AI lab founded in January 2024 by Cao Yue that created MAGI-1, MAGI-2 Preview, and MAGI-2; MAGI-2 API provides hosted API keys, per-second billing, 72-hour MP4 delivery, and Agent setup documentation. ### What is MAGI-2? MAGI-2 is a native audio-video foundation model released by Sand.ai on November 24, 2026. It uses a 480B-total / ~28B-active Multi-Head Latent MoE architecture trained on 4 trillion tokens to generate 4 to 30 seconds of 1080p 25fps video with synchronized bilingual speech lip-sync, foley, and music in one pass. ### How much does MAGI-2 API cost? MAGI-2 API bills strictly by generated 1080p output duration at $0.088/second ($0.352 for 4s, $0.440 for 5s, $0.704 for 8s, $1.320 for 15s, $2.640 max for 30s). Uploading up to 10 reference images, 5 reference videos, and 5 reference audio clips costs $0 extra. Tasks that end with status `failed` receive a 100% automatic refund. ### Which four input modes does MAGI-2 API support, and what triggers HTTP 422? MAGI-2 API supports Text-to-Video (`prompt` only), First-Frame I2V (`images` with 1 URL), First-Last Keyframe Transition (`images` with 2 URLs), and Multimodal References (`reference_images` up to 10, `reference_videos` up to 5 capped at 30s total, `reference_audios` up to 5 capped at 30s total, bound via `@image1`, `@video1`, `@audio1` in `prompt`). Mixing `images[]` with any `reference_*` field, passing `aspect_ratio` alongside `images[]`, or requesting `480p`/`720p` triggers an immediate HTTP 422 error. ### Can I run MAGI-2 480B locally on an RTX 4090 or 5090? No. Sand.ai has not released weights for the 480B MAGI-2 flagship model yet, so it is accessible only via cloud APIs such as MAGI-2 API. Only the August 2026 MAGI-2 Preview (114B total / ~6B active, ~307 GB checkpoint, Apache 2.0 on Hugging Face) can be downloaded, and Sand.ai specifies 8 NVIDIA Hopper GPUs (H100/H800) to serve it. ### How does MAGI-2 compare to Seedance 2.5, Kling 4.0, Wan 3.0, and MiniMax H3? On Artificial Analysis Video Arena v2.1 (Nov 26, 2026), MAGI-2 ranks #1 in I2V with Audio (1163 +/- 14 Elo) and #1 in I2V-Silent (1153 Elo), #2 in T2V-Silent (1144), and #7 in T2V with Audio (1150 +/- 13); on Higgsfield Video Arena (Nov 24, 2026), it ranks #2 overall (1146 score, 60.5% win rate). Through MAGI-2 API, an 8-second 1080p clip costs $0.704 with $0 reference surcharge, compared with $3.8692-$4.6109 on Seedance 2.5 and $1.84-$2.24 on Kling 4.0. ### How do I connect MAGI-2 API to Claude Code, Cursor, or Codex? Send your coding agent `set up https://magi2api.net/agent.md` or point it to `https://magi2api.net/openapi.json`, store `MAGI2_API_KEY` in server environment variables, and follow the polling and 72-hour MP4 archival workflow on https://magi2api.net/agent. ## Pages - [Home](https://magi2api.net/): MAGI-2 API platform overview, interactive payload builder, MAGI-2 model comparison, pricing, and FAQ - [API Docs](https://magi2api.net/api): MAGI-2 API REST endpoints, Bearer authentication, 4 input modes, HTTP 422 rules, and cURL/Python/TypeScript examples - [Pricing & Cost Calculator](https://magi2api.net/pricing): MAGI-2 API $0.088/s flat 1080p billing, prepaid credit packs, cost calculator, and failed-task auto-refund rules - [Playground](https://magi2api.net/playground): Interactive JSON, cURL, Python, and TypeScript request builder with live MAGI-2 schema validation - [Prompt Library](https://magi2api.net/prompts): 100 MAGI-2 video generation prompts with @image1/@video1/@audio1 syntax and playable 1080p outputs - [Agent Integration](https://magi2api.net/agent): Setup instructions for Claude Code, Cursor, Codex, OpenClaw, and Manus via /agent.md and /openapi.json - [Blog](https://magi2api.net/blog): Technical breakdown of Sand.ai MAGI-2 architecture, open-weights status, blind benchmarks, and API integration - [About](https://magi2api.net/about): MAGI-2 API entity profile, Sand.ai MAGI-2 model attribution, billing rules, and support contact ## Machine-Readable Specs - [Full Technical Specification](https://magi2api.net/llms-full.txt): Complete MAGI-2 API contract, Sand.ai MAGI-2 specs, benchmarks, and pricing - [Agent Integration Manifest](https://magi2api.net/agent.md): Copy-paste integration instructions for coding agents - [OpenAPI 3.1 Schema](https://magi2api.net/openapi.json): Machine-readable REST schema for https://magi2api.net/api ## Blog Posts - [What Is MAGI-2? Architecture, Open Weights, Benchmarks, and API Guide](https://magi2api.net/blog/what-is-magi-2): Understand Sand.ai MAGI-2 across model lineage, 480B local VRAM limits, AA v2.1 and Higgsfield blind rankings, HTTP 422 API rules, and $0.088/s 1080p cost math.