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
- معرّف النموذج
- magi-2
- المزوّد
- Sand AI
MAGI-2 نظرة عامة على API
نقطة نهاية موثّقة
تُرسَل طلبات الفيديو إلى /v1/videos/generations. يسرد جدول المعاملات أدناه الحقول التي توثّقها هذه الواجهة.
مزوّد النموذج
MAGI-2 من إصدار Sand AI ويُستدعى عبر 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 وwatermark، ويحمل الناتج مسارًا صوتيًا مُولَّدًا ما لم تكن قيمة 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 | غير مدعوم | لا يقبل هذا النموذج إطارات: أرسل موجّهًا، أو موجّهًا مع ملفات مرجعية. ويُرفض start_image أو end_image بالخطأ 400. |
reference_images | array | وضع المرجع | عناوين HTTPS للصور المرجعية، حتى 10. لا يتجاوز مجموع الصور والفيديوهات والصوت 20 لكل طلب. |
reference_videos | array | وضع المرجع | HTTPS URLs of reference videos, حتى 5 مقاطع، مدة كل منها 2–30 ثانية و30 ثانية إجمالًا. Their seconds are billed like the output's. |
reference_audios | array | وضع المرجع | عناوين 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 عدد الثواني المتبقية؛ ولا يُضمَّن الأخير إلا عند توفر تقدير. وتصبح قيمة progress هي 100 عندما تصبح قيمة status هي done. |
video.url | string | حقل في الاستجابة | رابط تنزيل ملف MP4 المكتمل عندما تصبح قيمة status هي done: رابط من ArgoLink يمكن لأي شخص فتحه دون مفتاح API، لمدة 30 يومًا. |
usage | object | حقل في الاستجابة | يُعاد عندما تصبح قيمة status هي done: output_seconds وreference_video_seconds وbilled_seconds، وهو مجموعهما الذي تُحتسب عليه المهمة. |
MAGI-2 مقارنة API بنماذج مماثلة
| النموذج | معرّف النموذج | المزوّد | السعر | الاستخدام الأنسب |
|---|---|---|---|---|
| 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.