Wan 2.2 API
Wan 2.2 จาก Alibaba — ชุดเครื่องมือวิดีโอ open-weight ที่ติดตั้งบน WaveSpeedAI พร้อมตัวเลือกจากต้นทางมากกว่า 35 รายการ: Animate (แอนิเมชันตัวละคร 120 วินาที), Video Edit, Speech-to-Video (10 นาทีขับเคลื่อนด้วยเสียง), Fun-Control (ไลเซนส์ Apache 2.0) รวมถึงภาพเป็นวิดีโอและข้อความเป็นวิดีโอในหลายขนาดโมเดล (5B, A14B) และความละเอียด (480p / 720p)
เฉพาะตัวเลือกที่ WaveSpeedAI โฮสต์ Animate สร้างคลิป 720p ยาวสูงสุด 120 วินาที Speech-to-Video สร้างคลิป 480p ยาวสูงสุด 10 นาที Fun-Control ใช้ Control Codes ที่ตั้งไว้ล่วงหน้าภายใต้ Apache 2.0 สำหรับการใช้เชิงพาณิชย์ endpoint เทรน LoRA ปรับแต่งเสร็จภายในไม่กี่นาที
ภาพรวม
เกี่ยวกับ Wan 2.2 API
Wan 2.2 ทำอะไรได้ อยู่ตรงไหนในกลุ่มโมเดลของ Alibaba และทำไมทีมต่างๆ จึงเลือกใช้
Wan 2.2 คือโมเดลการสร้างวิดีโอจาก Alibaba ใช้งานได้ผ่าน REST API ของ WaveSpeedAI Wan 2.2 จาก Alibaba — ชุดเครื่องมือวิดีโอ open-weight ที่ติดตั้งบน WaveSpeedAI พร้อมตัวเลือกจากต้นทางมากกว่า 35 รายการ: Animate (แอนิเมชันตัวละคร 120 วินาที), Video Edit, Speech-to-Video (10 นาทีขับเคลื่อนด้วยเสียง), Fun-Control (ไลเซนส์ Apache 2.0) รวมถึงภาพเป็นวิดีโอและข้อความเป็นวิดีโอในหลายขนาดโมเดล (5B, A14B) และความละเอียด (480p / 720p)
เฉพาะตัวเลือกที่ WaveSpeedAI โฮสต์ Animate สร้างคลิป 720p ยาวสูงสุด 120 วินาที Speech-to-Video สร้างคลิป 480p ยาวสูงสุด 10 นาที Fun-Control ใช้ Control Codes ที่ตั้งไว้ล่วงหน้าภายใต้ Apache 2.0 สำหรับการใช้เชิงพาณิชย์ endpoint เทรน LoRA ปรับแต่งเสร็จภายในไม่กี่นาที
กลุ่ม Wan 2.2 บน WaveSpeedAI มี 32 REST endpoint ครอบคลุมเวิร์กโฟลว์ Image-To-Video, Motion-Control, Video-To-Video, Image-To-Image, Digital-Human, Text-To-Image, Training, Text-To-Video แต่ละแบบมีราคา พารามิเตอร์ที่ปรับได้ และตัวอย่างผลลัพธ์ของตัวเอง เลือกแบบที่ตรงกับประเภทอินพุตและข้อจำกัดของงานจริง หรือเรียกหลายแบบด้วย API key เดียวเพื่อประกอบเป็นไปป์ไลน์หลายขั้นตอน
รัน Wan 2.2 ผ่าน API key บัญชีเรียกเก็บเงิน และขีดจำกัดอัตราเดียวกับที่คุณใช้กับโมเดล AI กว่า 1,000 รายการอื่นบน WaveSpeedAI ไม่ต้องตั้งค่ากับผู้ให้บริการแยก ไม่ต้องใช้ SDK แยกตามผู้ให้บริการ และไม่ต้องจัดการขีดจำกัดอัตราแยกตามผู้ให้บริการ การเชื่อมต่อเดียวครอบคลุมทุกอย่างตั้งแต่ข้อความเป็นภาพและข้อความเป็นวิดีโอ ไปจนถึงการสังเคราะห์เสียง การสร้าง 3D การอัปสเกล และการแก้ไข
Endpoint
API endpoint ของ Wan 2.2 ทั้งหมด
32 endpoint ของ Wan 2.2 พร้อมใช้งานบน WaveSpeedAI แล้ว — เลือกแบบที่ตรงกับเวิร์กโฟลว์ของคุณ
/filters:quality(82)/media/images/20260408111216_2fizlz7x.webp)
Wan 2.2 Image To Video Lora
Wan-2.2/image-to-video-lora enables unlimited image-to-video generation from a single image, producing smooth, cinematic motion with clean detail. Supports custom LoRAs for style and character consistency. Ready-to-use REST inference API, best performance, no cold starts, affordable pricing.
/filters:quality(82)/media/images/20260408111152_zehbgma1.webp)
Wan 2.2 Image To Video
Wan 2.2 Image-to-Video turns a single image into smooth, cinematic motion with clean detail—ideal for storyboards, mood shots, and product demos. Ready-to-use REST inference API, best performance, no cold starts, affordable pricing.
/filters:quality(82)/media/images/20260408111211_p8f6ffxe.webp)
Wan 2.2 Animate
Wan2.2-Animate unified character animation & replacement model replicating movement and expression; generates 720p videos up to 120s. Ready-to-use REST inference API, best performance, no coldstarts, affordable pricing.
/filters:quality(82)/media/images/20260408111241_3bzr5rd1.webp)
Wan 2.2 Video Edit
Wan 2.2 Video Edit lets you modify videos via text prompts (e.g., change clothing or characters). Powered by Wan 2.2, it supports 480p ($0.20/5s) and 720p ($0.40/5s), up to 120s. Ready-to-use REST inference API, best performance, no coldstarts, affordable pricing.
/filters:quality(82)/media/images/20260408111257_4rmbjsgj.webp)
Wan 2.2 Image To Image
WAN 2.2 (14B) is an image-to-image model for high-resolution photorealistic image editing with exceptional precision and fidelity. Ready-to-use REST inference API, best performance, no coldstarts, affordable pricing.
/filters:quality(82)/media/images/20260408111154_gvj4f5sj.webp)
Wan 2.2 Speech To Video
Wan-2.2-S2V turns images and speech into high-fidelity videos with realistic face and body motion; supports up to 10-minute clips in 480p, from $0.15/5s. Ready-to-use REST API, no coldstarts, affordable pricing.
/filters:quality(82)/media/images/20260408111206_p4ked9pu.webp)
Wan 2.2 Text To Image Lora
WAN 2.2 generates super-detailed images from text prompts and supports custom LoRAs for fine-grained style and subject control. Ready-to-use REST inference API, best performance, no coldstarts, affordable pricing.
/filters:quality(82)/media/images/20260408111250_80jkk4zs.webp)
Wan 2.2 Fun Control
Wan2.2-Fun-Control uses Control Codes and multi-modal inputs to generate preset-controlled videos up to 120s at 720p; released under Apache 2.0 for commercial use. Ready-to-use REST API, no coldstarts, affordable.
/filters:quality(82)/media/images/20260408112009_zkynaf2n.webp)
Wan 2.2 Image Lora Trainer
Train custom Wan 2.2 character/style LoRA models 10x faster. Style training, character training, object training. From concept to model in minutes, not hours. Upload a ZIP file containing images to start!
/filters:quality(82)/media/images/20260408111954_4jny6q8q.webp)
Wan 2.2 I2v Lora Trainer
Train custom Wan 2.2 I2V LoRA models 10x faster. Action training, motion training, video efect training. From concept to model in minutes, not hours. Upload a ZIP file containing videos to start!
/filters:quality(82)/media/images/20260408111226_b3370qq2.webp)
Wan 2.2 Text To Image Realism
WAN 2.2 delivers ultra-realistic text-to-image generation, converting prompts into photoreal images with high fidelity and detail. Ready-to-use REST inference API, best performance, no coldstarts, affordable pricing.
/filters:quality(82)/media/images/20260408111246_kbtz9m3g.webp)
Wan 2.2 I2v 5b 720p Lora
Wan 2.2 i2v-5B-720p is a 5B image-to-video model producing 720p videos with LoRA support for style customization. Ready-to-use REST inference API, best performance, no coldstarts, affordable pricing.
/filters:quality(82)/media/images/20260408111210_znuyn6r8.webp)
Wan 2.2 T2v 5b 720p Lora
Wan 2.2 T2V 5B is a 5B text-to-video model with LoRA support that generates 720p videos from text prompts for easy personalization. Ready-to-use REST inference API, best performance, no coldstarts, affordable pricing.
/filters:quality(82)/media/images/20260408111236_0was1j4o.webp)
Wan 2.2 I2v 480p Lora Ultra Fast
Wan 2.2 i2v delivers ultra-fast Image-to-Video at 480p with support for custom LoRAs for tailored styles. Ready-to-use REST inference API, best performance, no coldstarts, affordable pricing.
/filters:quality(82)/media/images/20260408111252_sejz6k48.webp)
Wan 2.2 I2v 480p Ultra Fast
Wan 2.2 A14B Image-to-Video (i2v-480p) produces ultra-fast 480p videos from single images, enabling unlimited AI video generation with high throughput. Ready-to-use REST inference API, best performance, no coldstarts, affordable pricing.
/filters:quality(82)/media/images/20260408111149_z1lz7r9s.webp)
Wan 2.2 I2v 720p Ultra Fast
Generate unlimited ultra-fast 720p AI videos from images with Wan 2.2 A14B image-to-video model. Ready-to-use REST inference API, best performance, no coldstarts, affordable pricing.
/filters:quality(82)/media/images/20260408111259_8bca6477.webp)
Wan 2.2 T2v 480p Lora Ultra Fast
Ultra-fast Wan 2.2 text-to-video model producing 480p videos with custom LoRA support—generate unlimited AI videos with personalized styles. Ready-to-use REST inference API, best performance, no coldstarts, affordable pricing.
/filters:quality(82)/media/images/20260408111238_h7qxvir0.webp)
Wan 2.2 I2v 720p Lora Ultra Fast
Wan 2.2 i2v 720P is an ultra-fast Image-to-Video model that generates unlimited AI videos and supports custom LoRAs for personalized outputs. Ready-to-use REST inference API, best performance, no coldstarts, affordable pricing.
/filters:quality(82)/media/images/20260408111248_iyye47z8.webp)
Wan 2.2 T2v 480p Ultra Fast
Wan 2.2 t2v 480p Ultra-Fast generates unlimited AI videos from text prompts at 480p with ultra-fast inference. Ready-to-use REST inference API, best performance, no coldstarts, affordable pricing.
/filters:quality(82)/media/images/20260408111201_lv1td92d.webp)
Wan 2.2 T2v 5b 720p
Wan 2.2 T2V 5B is a 720P text-to-video model that generates unlimited AI videos from simple text prompts, producing consistent high-quality 720p outputs. Ready-to-use REST inference API, best performance, no coldstarts, affordable pricing.
/filters:quality(82)/media/images/20260408111221_xo8hpiqi.webp)
Wan 2.2 I2v 5b 720p
Wan 2.2 I2V 5B converts images into high-quality 720P videos using a 5B image-to-video model for AI video generation. Ready-to-use REST inference API, best performance, no coldstarts, affordable pricing.
/filters:quality(82)/media/images/20260408111214_rct2hj0c.webp)
Wan 2.2 I2v 480p
Wan 2.2 A14B converts images into 480p videos, enabling unlimited AI video generation from single images. Ready-to-use REST inference API, best performance, no coldstarts, affordable pricing.
/filters:quality(82)/media/images/20260408111234_cplw518o.webp)
Wan 2.2 I2v 480p Lora
WAN 2.2 A14B Image-to-Video model generates unlimited 480p videos from images and supports custom LoRAs for personalized styles and fine-tuning. Ready-to-use REST inference API, best performance, no coldstarts, affordable pricing.
/filters:quality(82)/media/images/20260408111232_8tgp9v7m.webp)
Wan 2.2 I2v 720p Lora
WAN 2.2 Image-to-Video (i2v) 720p converts images into 720p videos and supports custom LoRAs for style personalization. Ready-to-use REST inference API, best performance, no coldstarts, affordable pricing.
/filters:quality(82)/media/images/20260408111239_qlur3dn5.webp)
Wan 2.2 I2v 720p
WAN 2.2 A14B i2v-720p converts images into smooth 720p videos, enabling unlimited AI video generation with the Wan 2.2 image-to-video model. Ready-to-use REST inference API, best performance, no coldstarts, affordable pricing.
/filters:quality(82)/media/images/20260408111156_b3olejjy.webp)
Wan 2.2 T2v 480p
Wan 2.2 t2v-480p generates unlimited AI videos from text prompts at 480p resolution, ideal for rapid prototyping and content creation. Ready-to-use REST inference API, best performance, no coldstarts, affordable pricing.
/filters:quality(82)/media/images/20260408111208_sw0j3xam.webp)
Wan 2.2 T2v 480p Lora
WAN 2.2 T2V 480p with LoRA generates text-to-video at 480p and supports custom LoRAs for personalized styles. Ready-to-use REST inference API, best performance, no coldstarts, affordable pricing.
/filters:quality(82)/media/images/20260408111218_00vzkvbl.webp)
Wan 2.2 T2v 720p
Wan 2.2 t2v-720p converts text prompts into native 720P videos, producing high-quality 720P clips from simple prompts. Ready-to-use REST inference API, best performance, no coldstarts, affordable pricing.
/filters:quality(82)/media/images/20260408111230_mtxgxh1x.webp)
Wan 2.2 T2v 720p Lora
Wan 2.2 T2V 720p with custom LoRA support turns text prompts into 720p AI videos and enables unlimited video generation. Ready-to-use REST inference API, best performance, no coldstarts, affordable pricing.
/filters:quality(82)/media/images/20260408111158_csf9651o.webp)
Wan 2.2 T2v 720p Lora Ultra Fast
Ultra-fast Wan 2.2 Text-to-Video generates unlimited 720p AI videos with custom LoRAs for personalized styles. Ready-to-use REST inference API, best performance, no coldstarts, affordable pricing.
/filters:quality(82)/media/images/20260408111244_aqp0x6b0.webp)
Wan 2.2 T2v 720p Ultra Fast
WAN 2.2 T2V 720p Ultra-Fast generates high-quality 720p videos from text prompts with unlimited output and ultra-fast throughput. Ready-to-use REST inference API, best performance, no coldstarts, affordable pricing.
/filters:quality(82)/media/images/1786269272686834557_4oOX6gqz.webp)
Wan 2.2 Animate 2
Wan 2.2 Animate 2 is the next-generation Wan character animation model: an end-to-end DiT that makes the character in a reference image perform the motion of a driving video, with no pose extraction, prompt-controlled background, and strong identity preservation; generates 480p/720p videos up to 120s. Ready-to-use REST inference API, best performance, no coldstarts, affordable pricing.
ตัวอย่าง
ดู Wan 2.2 ทำงานจริง
ผลลัพธ์จริงที่สร้างโดย Wan 2.2 API วางเมาส์บนวิดีโอเพื่อดูตัวอย่าง คลิกเพื่อเปิดตัวดูขนาดเต็ม
วิธีใช้
วิธีใช้ Wan 2.2 API
สี่ขั้นตอนจากการสมัครไปจนถึงผลลัพธ์ที่เสร็จสมบูรณ์ ตัวอย่าง Python, Node.js และ cURL แบบเต็มอยู่ในส่วน API ด้านล่าง
- 01
รับ API key
สมัครบัญชี WaveSpeedAI แล้วคัดลอก API key จากแดชบอร์ด บัญชีใหม่มาพร้อมเครดิตเริ่มต้นฟรี เพียงพอให้ลองใช้ playground ได้หลายสิบครั้งก่อนเริ่มเรียกเก็บเงิน
- 02
ส่ง prediction
POST อินพุตของคุณเป็น JSON ไปที่ https://api.wavespeed.ai/api/v3/wavespeed-ai/wan-2.2/image-to-video endpoint จะส่ง prediction id กลับมาทันที การสร้างทำงานแบบอะซิงโครนัส คุณจึงไม่ต้องเปิดการเชื่อมต่อค้างไว้ระหว่างประมวลผล
- 03
poll เพื่อรอให้เสร็จ
GET https://api.wavespeed.ai/api/v3/predictions/{request_id}/result เมื่อสถานะเป็น completed ให้นำผลลัพธ์ไปใช้ เมื่อเป็น failed, cancelled, timeout หรือ deleted ให้หยุดพร้อมแจ้งข้อผิดพลาด และ poll ต่อไปสำหรับสถานะอื่นทั้งหมด
- 04
อ่าน URL ของผลลัพธ์
เมื่อสถานะเป็น "completed" ให้อ่าน URL จาก data.outputs[0] URL ชี้ไปยังสื่อที่สร้างขึ้นของคุณบน CDN ของ WaveSpeedAI ซึ่งเป็นภาพ วิดีโอ เสียง หรือไฟล์ 3D ตามแบบของ Wan 2.2 ที่คุณเรียกใช้
กรณีการใช้งาน
สิ่งที่คุณสร้างได้ด้วย Wan 2.2
เวิร์กโฟลว์ทั่วไปที่นักพัฒนาและครีเอเตอร์ใช้ Wan 2.2 API
Wan 2.2 Animate — แอนิเมชันตัวละครยาวสูงสุด 120 วินาที
wavespeed-ai/wan-2.2/animate คือ “โมเดลแอนิเมชันและแทนที่ตัวละครแบบรวมศูนย์ที่ถ่ายแบบการเคลื่อนไหวและสีหน้า สร้างวิดีโอ 720p ยาวสูงสุด 120 วินาที” ตามข้อกำหนดในแค็ตตาล็อก ยาวกว่าเครื่องมือแอนิเมชันที่ขับเคลื่อนด้วยท่าทางส่วนใหญ่มาก
Speech-to-Video ยาวสูงสุด 10 นาที
wavespeed-ai/wan-2.2/speech-to-video “เปลี่ยนภาพและเสียงพูดเป็นวิดีโอความเที่ยงตรงสูงพร้อมการเคลื่อนไหวใบหน้าและร่างกายสมจริง รองรับคลิปยาวสูงสุด 10 นาทีที่ 480p” มีประโยชน์กับคอนเทนต์พูดรูปแบบยาว
Video Edit พร้อมการเปลี่ยนแปลงด้วยพรอมต์
wavespeed-ai/wan-2.2/video-edit ให้คุณแก้ไขวิดีโอผ่านพรอมต์ข้อความ (ตัวอย่างในแค็ตตาล็อก: เปลี่ยนเสื้อผ้าหรือตัวละคร) รองรับ 480p และ 720p ยาวสูงสุด 120 วินาที
Fun-Control พร้อมไลเซนส์ Apache 2.0
wavespeed-ai/wan-2.2/fun-control ใช้ “Control Codes และอินพุตหลายโมดัลเพื่อสร้างวิดีโอที่ควบคุมด้วยค่าที่ตั้งไว้ล่วงหน้า ยาวสูงสุด 120 วินาทีที่ 720p เผยแพร่ภายใต้ Apache 2.0 สำหรับการใช้เชิงพาณิชย์” ไลเซนส์ Apache 2.0 คือจุดต่างที่แท้จริงสำหรับไปป์ไลน์เชิงพาณิชย์
เทรน LoRA (เร็วกว่า 10 เท่า)
wavespeed-ai/wan-2.2-image-lora-trainer สำหรับ LoRA ภาพ, wavespeed-ai/wan-2.2-i2v-lora-trainer สำหรับ LoRA แบบ I2V ข้อกำหนดในแค็ตตาล็อก: “เทรนเร็วกว่า 10 เท่า” รองรับการเทรนสไตล์ ตัวละคร วัตถุ การเคลื่อนไหว แอ็กชัน และเอฟเฟกต์วิดีโอ อัปโหลดไฟล์ ZIP เพื่อเริ่มต้น
ภาพเป็นวิดีโอหลายขนาด (5B / A14B)
เลือกขนาดโมเดล: 5B (เล็กกว่า) เพื่อความเร็ว/ต้นทุน หรือ A14B เพื่อคุณภาพเต็ม i2v มาตรฐานสำหรับ 480p ตัวเลือกที่รองรับ LoRA ตัวเลือกเร็วพิเศษ
เคล็ดลับ
เคล็ดลับการเขียนพรอมต์สำหรับ Wan 2.2
คำแนะนำเชิงปฏิบัติเพื่อให้ได้ผลลัพธ์ที่ดีขึ้นจาก Wan 2.2 — มาจากรูปแบบที่ได้ผลกับโมเดลวิดีโอในไปป์ไลน์การผลิตจริง
- 01
เลือกตัวเลือกให้ตรงกับงานของคุณ
Wan 2.2 มี endpoint เฉพาะทางแทนโมเดลอเนกประสงค์ตัวเดียว Animate สำหรับการเคลื่อนไหวที่ขับเคลื่อนด้วยท่าทาง video-edit สำหรับการเปลี่ยนแปลงเฉพาะจุด speech-to-video สำหรับคอนเทนต์พูด image-to-video สำหรับการสร้างทั่วไป จับคู่ endpoint กับงาน — ได้ผลลัพธ์ดีกว่าการให้โมเดลทั่วไปทำทุกอย่างอย่างมาก
- 02
เทรน LoRA เพื่อความสม่ำเสมอระดับโปรดักชัน
endpoint เทรน LoRA ของ Wan 2.2 เป็นฟีเจอร์ API หลัก ไม่ใช่เครื่องมือเสริม สำหรับโปรดักชันที่ต้องการตัวตนที่กลับมาซ้ำข้ามการสร้างหลายร้อยครั้ง (มาสคอตแบรนด์ ตัวละครประจำ สไตล์เฉพาะตัว) ให้เทรน LoRA ครั้งเดียวแล้วเรียก endpoint อนุมาน LoRA ต่อการสร้าง
- 03
Open weights เปิดทางให้ปรับแต่งโมเดล
คู่แข่งแบบ closed-weight ผูกคุณไว้กับพฤติกรรมโมเดลของผู้ให้บริการ Wan 2.2 เบื้องหลังเป็น open-weight ดังนั้นเมื่อเจอข้อจำกัดที่โมเดลพื้นฐานแก้ไม่ได้ การปรับแต่งเพิ่มเติมก็เป็นทางเลือก — API วิดีโอเชิงพาณิชย์อื่นส่วนใหญ่ไม่มีเส้นทางนี้
- 04
ผสาน Animate กับ Kling Motion Control
ทั้งสองมีแอนิเมชันที่ขับเคลื่อนด้วยท่าทางด้วยข้อแลกเปลี่ยนต่างกัน Wan 2.2 Animate รองรับ LoRA และ open weights ส่วน Kling Motion Control รักษาตัวตนได้แข็งแกร่งกว่า เลือกตามว่าการปรับแต่งเพิ่มเติมสำคัญกว่าหรือคุณภาพตัวตนสำคัญกว่า
ราคา
ราคา Wan 2.2 API
คิดราคาตามผลลัพธ์ ค่าใช้จ่ายสุดท้ายขึ้นอยู่กับพารามิเตอร์ที่คุณตั้งใน playground ของแต่ละแบบ (ความละเอียด ความยาว จำนวนผลลัพธ์ ภาพอ้างอิง)
API
เรียกใช้ Wan 2.2 API
สมัครรับ API key ที่ wavespeed.ai/accesskey แล้วส่ง prediction ผ่าน REST playground สร้างตัวอย่างพร้อมวางได้สำหรับอินพุตทุกแบบ
POSThttps://api.wavespeed.ai/api/v3/wavespeed-ai/wan-2.2/image-to-video
# 1. Submit the prediction.
SUBMIT_RESPONSE=$(curl --silent --show-error --fail-with-body \
-X POST "https://api.wavespeed.ai/api/v3/wavespeed-ai/wan-2.2/image-to-video" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $WAVESPEED_API_KEY" \
-d '{
"prompt": "A cinematic shot of a city at sunset, soft golden light",
"image": "https://interactive-examples.mdn.mozilla.net/media/cc0-images/painted-hand-298-332.jpg",
"resolution": "480p",
"duration": 5
}')
TASK=$(printf '%s' "$SUBMIT_RESPONSE" | jq 'if has("data") then .data else . end')
PREDICTION_ID=$(printf '%s' "$TASK" | jq -r '.id')
if [ -z "$PREDICTION_ID" ] || [ "$PREDICTION_ID" = "null" ]; then
printf 'Submission response did not contain a prediction id
' >&2
exit 1
fi
RESULT_URL="https://api.wavespeed.ai/api/v3/predictions/$PREDICTION_ID/result"
# 2. Poll until the prediction finishes.
while true; do
RESPONSE=$(curl --silent --show-error --fail-with-body "$RESULT_URL" \
-H "Authorization: Bearer $WAVESPEED_API_KEY")
RESULT=$(printf '%s' "$RESPONSE" | jq 'if has("data") then .data else . end')
STATUS=$(printf '%s' "$RESULT" | jq -r '.status')
case "$STATUS" in
completed) printf '%s\n' "$RESULT" | jq '.outputs'; break ;;
failed|cancelled|timeout|deleted) printf '%s\n' "$RESULT" | jq . >&2; exit 1 ;;
*) sleep 2 ;;
esac
doneconst submitUrl = "https://api.wavespeed.ai/api/v3/wavespeed-ai/wan-2.2/image-to-video";
const apiKey = process.env.WAVESPEED_API_KEY;
if (!apiKey) throw new Error('Set WAVESPEED_API_KEY');
async function requestJson(url, options = {}) {
const response = await fetch(url, options);
if (!response.ok) throw new Error(await response.text());
return response.json();
}
// 1. Submit the prediction.
const body = await requestJson(submitUrl, {
method: "POST",
headers: {
"Authorization": `Bearer ${apiKey}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"prompt": "A cinematic shot of a city at sunset, soft golden light",
"image": "https://interactive-examples.mdn.mozilla.net/media/cc0-images/painted-hand-298-332.jpg",
"resolution": "480p",
"duration": 5
}),
});
const task = body.data ?? body;
const resultUrl = `https://api.wavespeed.ai/api/v3/predictions/${task.id}/result`;
// 2. Poll until the prediction finishes.
while (true) {
const resultBody = await requestJson(resultUrl, {
headers: { "Authorization": `Bearer ${apiKey}` },
});
const result = resultBody.data ?? resultBody;
if (result.status === "completed") {
console.log(result.outputs);
break;
}
if (["failed", "cancelled", "timeout", "deleted"].includes(result.status)) throw new Error(JSON.stringify(result));
await new Promise(resolve => setTimeout(resolve, 2000));
}import json
import os
import time
from urllib.request import Request, urlopen
api_key = os.environ["WAVESPEED_API_KEY"]
headers = {"Authorization": f"Bearer {api_key}", "Content-Type": "application/json"}
payload = {
"prompt": "A cinematic shot of a city at sunset, soft golden light",
"image": "https://interactive-examples.mdn.mozilla.net/media/cc0-images/painted-hand-298-332.jpg",
"resolution": "480p",
"duration": 5
}
def request_json(url, data=None):
request = Request(url, data=data, headers=headers, method="POST" if data else "GET")
with urlopen(request) as response:
return json.load(response)
# 1. Submit the prediction.
body = request_json("https://api.wavespeed.ai/api/v3/wavespeed-ai/wan-2.2/image-to-video", json.dumps(payload).encode())
task = body.get("data", body)
result_url = f"https://api.wavespeed.ai/api/v3/predictions/{task['id']}/result"
# 2. Poll until the prediction finishes.
while True:
result_body = request_json(result_url)
result = result_body.get("data", result_body)
status = result.get("status")
if status == "completed":
print(result.get("outputs", []))
break
if status in {"failed", "cancelled", "timeout", "deleted"}:
raise RuntimeError(result)
time.sleep(2)เปรียบเทียบ
Wan 2.2 เทียบกับทางเลือกอื่น
เมื่อไรควรเลือก Wan 2.2 แทนโมเดลที่คล้ายกันบน WaveSpeedAI
Wan 2.2 เทียบกับ Wan 2.7
Wan 2.7 (alibaba/wan-2.7/*) เป็นสถาปัตยกรรม Alibaba ที่ใหม่กว่า มี reference-to-video, video-edit, image-edit และ text-to-image ในตระกูลเดียว — ชุดเครื่องมือข้ามโมดัลที่กว้างกว่า ส่วน Wan 2.2 (ตัวเลือกบน WaveSpeedAI) มี endpoint เฉพาะทาง — Animate (120 วินาที), Speech-to-Video (10 นาที), Fun-Control (Apache 2.0), เครื่องมือเทรน LoRA — ซึ่ง 2.7 ไม่มี
Wan 2.2 เทียบกับ Seedance 2.0
Seedance 2.0 ให้เอาต์พุตระดับฮอลลีวูดพร้อมเสียงในตัวทุกตัวเลือก ส่วน Wan 2.2 ชนะด้านจำนวนตัวเลือก (35+ endpoint) และเรื่องการเทรน LoRA — ตัวเลือกที่ถูกต้องเมื่อคุณต้องการความสามารถเฉพาะทาง (Animate, Speech-to-Video, Fun-Control) ไม่ใช่โมเดลวิดีโออเนกประสงค์
Wan 2.2 เทียบกับ Kling 3.0 Motion Control
ทั้งสองมีแอนิเมชันตัวละครที่ขับเคลื่อนด้วยท่าทาง Wan 2.2 Animate สร้างคลิป 720p ยาว 120 วินาทีและมีการปรับแต่ง LoRA ส่วน Kling Motion Control จำกัดตามความยาววิดีโออ้างอิง (3-30 วินาที) แต่เทรนบนคลังวิดีโอของ Kuaishou เพื่อความรู้พื้นฐานด้านการเคลื่อนไหวที่แข็งแกร่งกว่า
คำถามที่พบบ่อย
Wan 2.2 API — คำถามที่พบบ่อย
ราคา สัญญาอนุญาต การเชื่อมต่อ — คำถามที่พบบ่อยเกี่ยวกับการรัน Wan 2.2 บน WaveSpeedAI
Wan 2.2 API คืออะไร
Wan 2.2 คือโมเดลการสร้างวิดีโอของ Alibaba ที่เปิดให้ใช้เป็น REST API บน WaveSpeedAI Wan 2.2 จาก Alibaba — ชุดเครื่องมือวิดีโอ open-weight ที่ติดตั้งบน WaveSpeedAI พร้อมตัวเลือกจากต้นทางมากกว่า 35 รายการ: Animate (แอนิเมชันตัวละคร 120 วินาที), Video Edit, Speech-to-Video (10 นาทีขับเคลื่อนด้วยเสียง), Fun-Control (ไลเซนส์ Apache 2.0) รวมถึงภาพเป็นวิดีโอและข้อความเป็นวิดีโอในหลายขนาดโมเดล (5B, A14B) และความละเอียด (480p / 720p) คุณเรียกใช้ผ่านโค้ดหรือลองใช้จาก playground ที่ลิงก์ไว้ด้านบนได้
เรียกใช้ Wan 2.2 API อย่างไร
สมัครบัญชี WaveSpeedAI คัดลอก API key จาก /accesskey แล้ว POST ไปที่ https://api.wavespeed.ai/api/v3/wavespeed-ai/wan-2.2/image-to-video พร้อมอินพุตของคุณเป็น JSON endpoint จะส่ง prediction id กลับมา poll endpoint ผลลัพธ์โดยเริ่มประมาณทุก 2 วินาที เพิ่มช่วงเวลาสำหรับงานที่ใช้เวลานาน และหยุดเมื่อได้สถานะสิ้นสุดใดๆ ตัวอย่าง Python / Node.js / cURL ที่เหมาะกับงานจริงอยู่ด้านบน
Wan 2.2 API มีค่าใช้จ่ายเท่าไร
Wan 2.2 เริ่มต้นที่ $0.02 ต่อครั้ง ค่าใช้จ่ายจริงขึ้นอยู่กับพารามิเตอร์ที่คุณตั้ง (ความละเอียด ความยาว จำนวนผลลัพธ์ ภาพอ้างอิง) ตัวอย่างค่าใช้จ่ายแบบเรียลไทม์ข้างปุ่ม Generate ใน playground แสดงราคาที่แน่นอนสำหรับอินพุตปัจจุบันของคุณ
Wan 2.2 มีแบบไหนให้ใช้บ้าง
WaveSpeedAI มี endpoint Wan 2.2 ที่ใช้งานได้ 32 รายการ: wavespeed-ai/wan-2.2/image-to-video-lora, wavespeed-ai/wan-2.2/image-to-video, wavespeed-ai/wan-2.2/animate, wavespeed-ai/wan-2.2/video-edit, wavespeed-ai/wan-2.2/image-to-image, wavespeed-ai/wan-2.2/speech-to-video, wavespeed-ai/wan-2.2/text-to-image-lora, wavespeed-ai/wan-2.2/fun-control, และอื่นๆ แต่ละแบบมีหน้า playground และราคาของตัวเอง
ใช้ผลลัพธ์ของ Wan 2.2 เชิงพาณิชย์ได้ไหม
สิทธิ์ในการใช้เชิงพาณิชย์เป็นไปตามสัญญาอนุญาตของโมเดล Alibaba โมเดลของ Alibaba ส่วนใหญ่อนุญาตให้ใช้ผลลัพธ์เชิงพาณิชย์ ดูสรุปสัญญาอนุญาตเฉพาะในหน้า playground ของแต่ละโมเดล และข้อกำหนดการใช้บริการของ WaveSpeedAI สำหรับเงื่อนไขระดับแพลตฟอร์ม
ทำไมต้องใช้ Wan 2.2 บน WaveSpeedAI แทนการเชื่อมต่อตรง
API key เดียวและบัญชีเรียกเก็บเงินเดียวสำหรับ Wan 2.2 และโมเดล AI อื่นกว่า 1,000 รายการจากผู้ให้บริการอื่น ไม่ต้องตั้งค่า SDK แยกตามผู้ให้บริการ ไม่ต้องจัดการขีดจำกัดอัตราแยกกัน และไม่ต้องเขียนโค้ดเชื่อมต่อใหม่ทุกครั้งที่เปลี่ยนผู้ให้บริการ โดยทั่วไปราคาเท่ากับหรือต่ำกว่า API ตรงของ Alibaba
ผู้พัฒนา
เกี่ยวกับ Alibaba
ทีมเบื้องหลัง Wan 2.2 และกลุ่มโมเดลอื่นๆ ของ Alibaba บน WaveSpeedAI
Tongyi Lab ของ Alibaba ผลิตโมเดลวิดีโอตระกูล Wan และ LLM ตระกูล Qwen โดย Wan โดดเด่นที่เปิดตัวพร้อม open weights มีตัวเลือกครอบคลุมกว้าง (ข้อความเป็นวิดีโอ ภาพเป็นวิดีโอ reference-to-video video-edit video-extend image-edit ข้อความเป็นภาพ) และมีความแข็งแกร่งสม่ำเสมอด้านความเสถียรของการเคลื่อนไหวและการทำตามพรอมต์ในพรอมต์หลายภาษา
เริ่มสร้างด้วย Wan 2.2 บน WaveSpeedAI
รับเครดิตเริ่มต้นฟรีเมื่อสมัคร API key เดียวใช้ได้กับโมเดล AI กว่า 1,000 รายการจาก Alibaba และผู้ให้บริการอื่นทุกราย