Sand AImagi-2
Sand AI's MAGI-2: 4 to 30 second 1080p clips with native sound, from a prompt or from до 10 reference images, 5 reference videos and 5 audio clips
$0.1/ секундаНеудачные генерации не тарифицируются
- Клипы по 4–30 секунд
- 1080p
- Native sound
- До 10 изображений, 5 видео, 5 аудио
- Тип данных
- Видео
- Эндпоинт
- /v1/videos/generations
- ID модели
- magi-2
- Разработчик
- Sand AI
MAGI-2 — обзор API
Эндпоинт из документации
Запросы на генерацию видео отправляйте на /v1/videos/generations. В таблице параметров ниже перечислены поля, описанные для этого интерфейса.
Разработчик модели
MAGI-2 выпущена компанией Sand AI и вызывается через ID модели в API magi-2.
Результат и лимиты
4–30 секунд in whole seconds; 1080p only; one output per request; 16:9, 4:3, 1:1, 3:4, 9:16 or 21:9; до 10 reference images, 5 reference videos and 5 audio clips, 20 in all, audio alone accepted; reference videos and audio clips run 2–30 секунд каждый and 30 seconds in all per kind; prompt обязателен, до 15,000 characters; a soundtrack is generated unless generate_audio is false; billed by the seconds of video returned, and reference images, videos and audio add nothing
MAGI-2 — цены на API
| Позиция | Тариф ArgoLink |
|---|---|
| 1080p | $0.1 / секунда |
4–30 секунд in whole seconds; 1080p only; one output per request; 16:9, 4:3, 1:1, 3:4, 9:16 or 21:9; до 10 reference images, 5 reference videos and 5 audio clips, 20 in all, audio alone accepted; reference videos and audio clips run 2–30 секунд каждый and 30 seconds in all per kind; prompt обязателен, до 15,000 characters; a soundtrack is generated unless generate_audio is false; billed by the seconds of video returned, and reference images, videos and audio add nothing
MAGI-2 — справочник API
Быстрый старт
Создайте API-ключ в консоли, затем используйте базовый URL, эндпоинт и тело запроса, показанные на этой странице.
curl https://argolink.io/v1/videos/generations \
-H "Authorization: Bearer $ARGOLINK_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "magi-2",
"prompt": "A slow aerial shot over a foggy pine forest at sunrise"
}'
curl https://argolink.io/v1/videos/$REQUEST_ID \
-H "Authorization: Bearer $ARGOLINK_API_KEY"
curl -L https://argolink.io/v1/videos/$REQUEST_ID/content \
-H "Authorization: Bearer $ARGOLINK_API_KEY" \
-o output.mp4
import os
import time
import requests
headers = {"Authorization": f"Bearer {os.environ['ARGOLINK_API_KEY']}"}
job = requests.post(
"https://argolink.io/v1/videos/generations",
headers=headers,
json={"model": "magi-2", "prompt": "A slow aerial shot over a foggy pine forest at sunrise"},
timeout=600,
)
job.raise_for_status()
request_id = job.json()["request_id"]
while True:
status = requests.get(f"https://argolink.io/v1/videos/{request_id}", headers=headers, timeout=60).json()
if status["status"] in ("done", "failed", "expired"):
break
time.sleep(5)
if status["status"] == "done":
video = requests.get(f"https://argolink.io/v1/videos/{request_id}/content", headers=headers, timeout=600)
open("output.mp4", "wb").write(video.content)
Режимы
Текст в видео
Ничего, кроме промпта
The shortest call there is: only prompt is required, and the fields you leave out render and bill 5 с по 1080p 16:9.
curl https://argolink.io/v1/videos/generations \
-H "Authorization: Bearer $ARGOLINK_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "magi-2",
"prompt": "Медленный облёт туманного соснового леса на рассвете",
"duration": 5,
"resolution": "1080p",
"aspect_ratio": "16:9"
}'
| Поле | Значение |
|---|---|
prompt | обязателен, до 15,000 characters; describe the camera move, the subject and the mood |
duration | 4–30 целых секунд, по умолчанию 5 |
resolution | 1080p |
aspect_ratio | 16:9 · 4:3 · 1:1 · 3:4 · 9:16 · 21:9, по умолчанию 16:9 |
size | пикселях вместо resolution и aspect_ratio, поэтому 1920x1080 is 1080p 16:9 |
Один запрос генерирует одно видео; seed и водяной знак не поддерживаются, а к результату добавляется сгенерированная звуковая дорожка, если generate_audio не равен false.
Референс
Следует изображениям, видео или аудио, которые вы передаёте
Результат следует объекту, движению или ритму переданных материалов. Every asset you send is used; the prompt says what to do with them.
curl https://argolink.io/v1/videos/generations \
-H "Authorization: Bearer $ARGOLINK_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "magi-2",
"prompt": "The person in the reference walks into a rainy street at night",
"duration": 5,
"resolution": "1080p",
"reference_images": [{"url": "https://example.com/subject.png"}]
}'
curl https://argolink.io/v1/videos/generations \
-H "Authorization: Bearer $ARGOLINK_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "magi-2",
"prompt": "The girl dances to the beat, moving like the dancer in the reference clip",
"duration": 10,
"resolution": "1080p",
"reference_images": [{"url": "https://example.com/girl.png"}],
"reference_videos": [{"url": "https://example.com/dance.mp4"}],
"reference_audios": [{"url": "https://example.com/beat.mp3"}]
}'
| Поле | Значение |
|---|---|
prompt | обязателен, до 15,000 characters; describe the camera move, the subject and the mood |
reference_images | до 10 HTTPS-изображений, JPEG или PNG |
reference_videos | до 5 клипов, каждый длительностью 2–30 с и 30 секунд в сумме |
reference_audios | до 5 клипов, каждый длительностью 2–30 с и 30 секунд в сумме |
duration | 4–30 целых секунд, по умолчанию 5 |
resolution | 1080p |
aspect_ratio | 16:9 · 4:3 · 1:1 · 3:4 · 9:16 · 21:9, по умолчанию 16:9 |
Три типа материалов можно свободно сочетать, всего до 20 материалов. Референсные видео тарифицируются по тарифу результата; референсные изображения и аудио бесплатны.
Как загрузить референсы и использовать их
Ваша ссылка или заранее загруженный файл
Значение url в start_image, end_image и в каждом элементе reference_images, reference_videos и reference_audios — адрес HTTPS. Ссылка на ваш собственный файл передаётся как есть, если файл скачивается без входа в аккаунт, а все перенаправления идут по HTTPS. Локальный файл сначала загружается, после чего полученный media_url подставляется в запрос.
FILE=dance.mp4
TICKET=$(curl -fsS https://argolink.io/v1/media/uploads \
-H "Authorization: Bearer $ARGOLINK_API_KEY" \
-H "Content-Type: application/json" \
-d "{\"model\":\"magi-2\",\"type\":\"video\",\"content_type\":\"video/mp4\",\"size_bytes\":$(wc -c < "$FILE" | tr -d ' ')}")
curl -fsS -X PUT "$(jq -r .upload_url <<<"$TICKET")" \
-H "Content-Type: video/mp4" --data-binary @"$FILE"
# Put this media_url in reference_videos[].url
jq -r .media_url <<<"$TICKET"
Запрос тикета бесплатен и не создаёт задачу: upload_url действителен 15 минут, а PUT должен содержать указанный вами Content-Type; media_url, который выдаётся взамен, остаётся доступным семь дней.
| Поле | Формат | Размер | Длительность |
|---|---|---|---|
reference_images · start_image · end_image | JPEG или PNG | ≤ 20 MiB | — |
reference_videos | MP4 или MOV | ≤ 100 MiB | 2–30 секунд каждый |
reference_audios | WAV или MP3 | ≤ 15 MB | 2–30 секунд каждый |
Если файл выходит за эти пределы, задача завершается с ошибкой invalid_input до начала генерации, и ничего не списывается.
MAGI-2 — все параметры запроса
| Параметр | Тип | Обязательность | Назначение |
|---|---|---|---|
model | string | обязательно | The catalog identifier for this page: magi-2. |
prompt | string | обязательно | Describes the video: camera motion, subject action and mood. This model needs one in every mode, assets or not. It holds не более 15,000 characters. |
duration | integer | необязательно | Длительность результата в целых секундах, от 4 до 30; по умолчанию 5. |
resolution | string | необязательно | Output resolution. This model accepts 1080p only, which is also the default. |
aspect_ratio | string | необязательно | Output aspect ratio: 16:9, 4:3, 1:1, 3:4, 9:16 or 21:9; по умолчанию 16:9. It applies to reference requests, with or without assets. |
size | string | необязательно | Pixels instead of resolution plus aspect_ratio, written WIDTHxHEIGHT: the short side picks the tier (1080 for 1080p) and the shape picks the ratio, so 1920x1080 is 1080p 16:9. It picks a tier and a ratio, not exact pixels; a resolution or aspect_ratio sent with it must match, or the request is rejected with 400. |
start_image · end_image | object | не поддерживается | Эта модель не принимает кадры: передайте prompt или prompt с референсными материалами. Запрос со start_image или end_image будет отклонён с кодом 400. |
reference_images | array | reference | Ссылки HTTPS на референсные изображения, до 10. Изображения, видео и аудио вместе — не более 20 на запрос. |
reference_videos | array | reference | HTTPS URLs of reference videos, до 5 клипов, каждый длительностью 2–30 с и 30 секунд в сумме. Their seconds are billed like the output's. |
reference_audios | array | reference | Ссылки HTTPS на референсные аудиоклипы, до 5, каждый длиной 2–30 секунд и 30 секунд суммарно. Аудио можно передавать отдельно. |
seconds · ratio | — | совместимые названия | Псевдонимы duration и aspect_ratio; для каждого значения передавайте только одно имя, не оба сразу. |
image_url · image_urls · video_urls · audio_urls · frame_images · input_references | — | совместимые названия | Имена полей из запросов fal и OpenRouter тоже работают: image_url — это start_image; image_urls, video_urls и audio_urls — три списка референсов; элементы frame_images, у которых frame_type равен first_frame или last_frame, — это start_image и end_image; элементы input_references типа image_url, video_url или audio_url — это референсы. Для каждого входа используйте одно имя. |
n | integer | необязательно | Должно быть 1 или не указываться; каждый запрос создаёт ровно одно видео. |
generate_audio | boolean | необязательно | Defaults to true: MAGI-2 scores the video itself. Send false for a silent result. |
seed · watermark | — | не поддерживается | Не поддерживается в этой модели: любой seed или watermark: true отклоняется с ошибкой 400. |
request_id | string | поле ответа | Возвращается при отправке задачи и является единственным идентификатором, который принимают эндпоинты статуса и содержимого. |
progress · estimated_seconds_remaining | integer | поле ответа | Возвращается эндпоинтом статуса, пока status равен pending: progress показывает, насколько продвинулась задача, от 0 до 99, а estimated_seconds_remaining — сколько секунд осталось; пока оценки нет, это поле отсутствует. Когда status становится done, progress равен 100. |
video.url | string | поле ответа | Ссылка для скачивания готового MP4 после status, равного done: ссылка ArgoLink, которую любой может открыть без API-ключа, в течение 30 дней. |
usage | object | поле ответа | Возвращаются, когда status равен done: output_seconds, reference_video_seconds и billed_seconds — их сумма, за которую тарифицируется задача. |
MAGI-2 — сравнение API с похожими моделями
| Модель | ID модели | Разработчик | Тариф | Подходит для |
|---|---|---|---|---|
| MAGI-2 | magi-2 | Sand AI | $0.1 / секунда | Sand AI's MAGI-2: 4 to 30 second 1080p clips with native sound, from a prompt or from до 10 reference images, 5 reference videos and 5 audio clips |
| Seedance 2.5 | seedance-2.5 | ByteDance Seed | $0.0874 / секунда | Самая мощная модель Seedance на сегодня: клипы по 30 секунд, до 50 референсных материалов и встроенная поддержка референсов с реальными людьми без ручного одобрения и дополнительной проверки |
| Grok Imagine Video 1.5 | grok-imagine-video-1.5 | xAI | $0.032 / секунда | Генерация видео в 480p, 720p и 1080p, тарифицируется по секундам результата |
| Gemini Omni 1.2 Flash | gemini-omni-1.2-flash | $0.0455 / секунда | Google Gemini Omni 1.2 Flash: 3 to 15 second clips with native sound at 720p, 1080p or 4K, from a prompt, a first and last frame, до 10 reference images and 3 reference videos, or as an edit of a video |
Другие модели этого типа
- Seedance 2.5Самая мощная модель Seedance на сегодня: клипы по 30 секунд, до 50 референсных материалов и встроенная поддержка референсов с реальными людьми без ручного одобрения и дополнительной проверки$0.0874 / секунда
- Grok Imagine Video 1.5Генерация видео в 480p, 720p и 1080p, тарифицируется по секундам результата$0.032 / секунда
- Gemini Omni 1.2 FlashGoogle Gemini Omni 1.2 Flash: 3 to 15 second clips with native sound at 720p, 1080p or 4K, from a prompt, a first and last frame, до 10 reference images and 3 reference videos, or as an edit of a video$0.0455 / секунда
- Kling 4.0Kuaishou Kling 4.0: 3 to 30 second clips at 720p or 1080p from a prompt, or from до 10 reference images and 5 reference videos, with a soundtrack of its own$0.1413 / секунда
MAGI-2 — вопросы об API
Как вызвать MAGI-2?
Create an API key in the console and POST https://argolink.io/v1/videos/generations с model, равным magi-2. The response carries request_id, the only job identifier: poll GET https://argolink.io/v1/videos/{request_id}, which reports progress and estimated_seconds_remaining while the job is pending, until status is done, then download the MP4 from GET https://argolink.io/v1/videos/{request_id}/content, адрес, который статус возвращает как video.url.
Сколько стоит MAGI-2?
За секунду результата, от $0.1 per second at the lowest tier; each tier in the pricing table has its own per-second rate, multiplied by the video's length. Reference videos are billed at the same per-second rate: billed seconds are the output seconds plus the reference videos' total seconds, with any part of a second left off, so a 5-second video with a 2.4-second reference video bills 7 seconds. Reference images and audio are free. Only a completed video is billed; a failed or rejected job costs nothing.
Какие режимы ввода поддерживает MAGI-2?
Всё на одном эндпоинте: reference (a prompt alone, or with images, videos and audio as references: до 10 reference_images, 5 reference_videos и 5 reference_audios, 20 всего, в любом сочетании). Every asset is an HTTPS URL.
Что не поддерживает MAGI-2?
Более одного видео в запросе (n должно быть 1 или не указываться), любой seed или watermark: true — в этих случаях возвращается 400. Результат — H.264 MP4 с созданной звуковой дорожкой, если generate_audio не равно false.
Есть ли звук в видео MAGI-2?
По умолчанию да: MAGI-2 scores the video itself. Send generate_audio: false for a silent result.