Sand AImagi-2
Sand AI's MAGI-2: 4 to 30 second 1080p clips with native sound, from a prompt or from fino a 10 reference images, 5 reference videos and 5 audio clips
$0.1/ secondoNessun addebito per le generazioni non riuscite
- Clip da 4–30 secondi
- 1080p
- Native sound
- Fino a 10 immagini, 5 video, 5 audio
- Modalità
- Video
- Endpoint
- /v1/videos/generations
- ID del modello
- magi-2
- Provider
- Sand AI
MAGI-2 API: panoramica
Endpoint documentato
Le richieste video vanno a /v1/videos/generations. La tabella dei parametri qui sotto elenca i campi documentati per questa interfaccia.
Sviluppatore del modello
MAGI-2 è pubblicato da Sand AI e nell'API si invoca con l'ID del modello magi-2.
Output e limiti
4–30 secondi in whole seconds; 1080p only; one output per request; 16:9, 4:3, 1:1, 3:4, 9:16 or 21:9; fino a 10 reference images, 5 reference videos and 5 audio clips, 20 in all, audio alone accepted; reference videos and audio clips run 2–30 secondi ciascuno and 30 seconds in all per kind; prompt obbligatorio, fino a 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: prezzi
| Voce | Tariffa ArgoLink |
|---|---|
| 1080p | $0.1 / secondo |
4–30 secondi in whole seconds; 1080p only; one output per request; 16:9, 4:3, 1:1, 3:4, 9:16 or 21:9; fino a 10 reference images, 5 reference videos and 5 audio clips, 20 in all, audio alone accepted; reference videos and audio clips run 2–30 secondi ciascuno and 30 seconds in all per kind; prompt obbligatorio, fino a 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: riferimento
Avvio rapido
Crea una chiave API nella console, poi usa l’URL di base, l’endpoint e il corpo della richiesta indicati in questa pagina.
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)
Modalità
Da testo a video
Solo un prompt
The shortest call there is: only prompt is required, and the fields you leave out render and bill 5 secondi a 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": "Lenta ripresa aerea su una pineta avvolta nella nebbia al sorgere del sole",
"duration": 5,
"resolution": "1080p",
"aspect_ratio": "16:9"
}'
| Campo | Valore |
|---|---|
prompt | obbligatorio, fino a 15,000 characters; describe the camera move, the subject and the mood |
duration | 4–30 secondi interi, predefinito 5 |
resolution | 1080p |
aspect_ratio | 16:9 · 4:3 · 1:1 · 3:4 · 9:16 · 21:9, predefinito 16:9 |
size | pixel al posto di resolution più aspect_ratio, quindi 1920x1080 is 1080p 16:9 |
Una richiesta genera un solo video; seed e watermark non sono supportati, e il risultato ha una traccia audio generata a meno che generate_audio non sia false.
Riferimento
Segue le immagini, i video o l'audio che fornisci
Il risultato segue il soggetto, il movimento o il ritmo degli asset che invii. 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"}]
}'
| Campo | Valore |
|---|---|
prompt | obbligatorio, fino a 15,000 characters; describe the camera move, the subject and the mood |
reference_images | fino a 10 immagini HTTPS, JPEG o PNG |
reference_videos | fino a 5 clip, ciascuna di 2–30 secondi e 30 secondi in totale |
reference_audios | fino a 5 clip, ciascuna di 2–30 secondi e 30 secondi in totale |
duration | 4–30 secondi interi, predefinito 5 |
resolution | 1080p |
aspect_ratio | 16:9 · 4:3 · 1:1 · 3:4 · 9:16 · 21:9, predefinito 16:9 |
I tre tipi si combinano liberamente, fino a 20 asset in totale. I video di riferimento sono fatturati alla tariffa dell'output; immagini e audio di riferimento sono gratuiti.
Come caricare e usare gli asset di riferimento
Un tuo link, oppure un file locale caricato prima
Il campo url di start_image, end_image e di ogni elemento di reference_images, reference_videos e reference_audios è un indirizzo HTTPS. Un link che ospiti già si usa così com'è, purché si possa scaricare senza effettuare l'accesso e ogni reindirizzamento resti su HTTPS. Un file locale va prima caricato, e il media_url che ricevi va inserito nella richiesta.
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"
Richiedere un ticket è gratuito e non crea alcun job: upload_url è valido per 15 minuti e la richiesta PUT deve avere il Content-Type che hai dichiarato; il media_url che ottieni in cambio resta leggibile per sette giorni.
| Campo | Formato | Dimensione | Durata |
|---|---|---|---|
reference_images · start_image · end_image | JPEG o PNG | ≤ 20 MiB | — |
reference_videos | MP4 o MOV | ≤ 100 MiB | 2–30 secondi ciascuno |
reference_audios | WAV o MP3 | ≤ 15 MB | 2–30 secondi ciascuno |
Un asset fuori da questi limiti fa fallire il job con invalid_input prima che inizi la generazione, e non viene addebitato nulla.
MAGI-2 API: parametri completi della richiesta
| Parametro | Tipo | Requisito | Funzione |
|---|---|---|---|
model | string | obbligatorio | The catalog identifier for this page: magi-2. |
prompt | string | obbligatorio | Describes the video: camera motion, subject action and mood. This model needs one in every mode, assets or not. It holds al massimo 15,000 characters. |
duration | integer | facoltativo | Durata dell'output in secondi interi, da 4 a 30; il valore predefinito è 5. |
resolution | string | facoltativo | Output resolution. This model accepts 1080p only, which is also the default. |
aspect_ratio | string | facoltativo | Output aspect ratio: 16:9, 4:3, 1:1, 3:4, 9:16 or 21:9; predefinito 16:9. It applies to reference requests, with or without assets. |
size | string | facoltativo | 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 | non supportato | Questo modello non accetta fotogrammi: invia un prompt, o un prompt con asset di riferimento. Uno start_image o un end_image viene rifiutato con 400. |
reference_images | array | modalità riferimento | Indirizzi HTTPS delle immagini di riferimento, fino a 10. Immagini, video e audio insieme sono limitati a 20 per richiesta. |
reference_videos | array | modalità riferimento | HTTPS URLs of reference videos, fino a 5 clip, ciascuna di 2–30 secondi e 30 secondi in totale. Their seconds are billed like the output's. |
reference_audios | array | modalità riferimento | Indirizzi HTTPS delle clip audio di riferimento, fino a 5, ciascuna di 2–30 secondi e 30 secondi in totale. L'audio si può inviare anche da solo. |
seconds · ratio | — | nomi compatibili | Alias di duration e aspect_ratio; usa un solo nome per ciascun valore, mai entrambi. |
image_url · image_urls · video_urls · audio_urls · frame_images · input_references | — | nomi compatibili | Funzionano anche i nomi dei campi delle richieste fal e OpenRouter: image_url equivale a start_image; image_urls, video_urls e audio_urls sono le tre liste di riferimenti; gli elementi di frame_images con frame_type first_frame o last_frame sono start_image ed end_image; gli elementi di input_references di tipo image_url, video_url o audio_url sono riferimenti. Usa un solo nome per ogni input. |
n | integer | facoltativo | Deve essere 1 o omesso; ogni richiesta produce esattamente un video. |
generate_audio | boolean | facoltativo | Defaults to true: MAGI-2 scores the video itself. Send false for a silent result. |
seed · watermark | — | non supportato | Non disponibile su questo modello: qualsiasi seed, o watermark: true, viene rifiutato con 400. |
request_id | string | campo della risposta | Restituito dalla chiamata di invio; è l'unico identificativo accettato dagli endpoint di stato e di contenuto. |
progress · estimated_seconds_remaining | integer | campo della risposta | Restituiti dall'endpoint di stato mentre status è pending: progress stima l'avanzamento del job, da 0 a 99, ed estimated_seconds_remaining quanti secondi mancano; quest'ultimo viene omesso finché non c'è una stima. progress vale 100 quando status è done. |
video.url | string | campo della risposta | Link di download dell'MP4 finito quando status è done: un link ArgoLink che chiunque può aprire senza la chiave API, per 30 giorni. |
usage | object | campo della risposta | Restituito quando status è done: output_seconds, reference_video_seconds e billed_seconds, la loro somma, su cui viene fatturato il job. |
MAGI-2 API a confronto con modelli simili
| Modello | ID del modello | Provider | Tariffa | Ideale per |
|---|---|---|---|---|
| MAGI-2 | magi-2 | Sand AI | $0.1 / secondo | Sand AI's MAGI-2: 4 to 30 second 1080p clips with native sound, from a prompt or from fino a 10 reference images, 5 reference videos and 5 audio clips |
| Seedance 2.5 | seedance-2.5 | ByteDance Seed | $0.0874 / secondo | Il modello video Seedance più capace finora: clip da 30 secondi, fino a 50 asset di riferimento e supporto nativo per riferimenti con persone reali, senza approvazione manuale né verifiche aggiuntive |
| Grok Imagine Video 1.5 | grok-imagine-video-1.5 | xAI | $0.032 / secondo | Generazione video a 480p, 720p e 1080p, fatturata per secondo di output |
| Gemini Omni 1.2 Flash | gemini-omni-1.2-flash | $0.0455 / secondo | 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, fino a 10 reference images and 3 reference videos, or as an edit of a video |
Altri modelli della stessa modalità
- Seedance 2.5Il modello video Seedance più capace finora: clip da 30 secondi, fino a 50 asset di riferimento e supporto nativo per riferimenti con persone reali, senza approvazione manuale né verifiche aggiuntive$0.0874 / secondo
- Grok Imagine Video 1.5Generazione video a 480p, 720p e 1080p, fatturata per secondo di output$0.032 / secondo
- 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, fino a 10 reference images and 3 reference videos, or as an edit of a video$0.0455 / secondo
- Kling 4.0Kuaishou Kling 4.0: 3 to 30 second clips at 720p or 1080p from a prompt, or from fino a 10 reference images and 5 reference videos, with a soundtrack of its own$0.1413 / secondo
MAGI-2 API: domande frequenti
Come effettuo una chiamata a MAGI-2?
Create an API key in the console and POST https://argolink.io/v1/videos/generations con il campo model impostato su 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, l'indirizzo che la risposta di stato restituisce in video.url.
Quanto costa MAGI-2?
Si paga per secondo di output, a partire da $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.
Quali modalità di input supporta MAGI-2?
Tutto sullo stesso endpoint: reference (a prompt alone, or with images, videos and audio as references: fino a 10 reference_images, 5 reference_videos e 5 reference_audios, 20 in totale, in qualsiasi combinazione). Every asset is an HTTPS URL.
Cosa non supporta MAGI-2?
Più di un video per richiesta (n deve essere 1 o omesso), qualsiasi seed oppure watermark: true; in questi casi viene restituito 400. L'output è un video H.264 in formato MP4 con una traccia audio generata, a meno che generate_audio non sia false.
I video di MAGI-2 hanno l’audio?
Per impostazione predefinita sì: MAGI-2 scores the video itself. Send generate_audio: false for a silent result.