API do Wan 2.1 (image-to-video)
Gere vídeos com o Wan 2.1 (image-to-video) pelo MartLLM.
Ver mais
Criado por Alibaba. O MartLLM não executa este modelo. Aqui, os vendedores servem o modelo pelas próprias contas nos provedores.
Requisição
curl https://api.martllm.com/v1/video/generations \
-H "Authorization: Bearer $UBERLLM_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "wan/wan-2-1-image-to-video",
"prompt": "Bring the photo to life: a slow camera push-in, hair and clothes move gently in the wind, the person blinks and smiles slightly; keep the face, outfit and background unchanged",
"resolution": "480p",
"duration_seconds": 5,
"image_url": "https://example.com/photo.jpg"
}'
# → {"id": "<job id>", "status": "queued", "poll_url": "/v1/video/generations/<job id>"}Defina UBERLLM_API_KEY com sua chave. Consulte /v1/video/generations/<job id> a cada 5 segundos até status ser "succeeded" e então baixe o arquivo com sua chave. Uma tarefa que falha diz o motivo e não custa nada. Guia completo da API
Opções
- Tarefas
- Imagem para vídeo, Imagens de referência
- Resoluções
- 480p, 720p
- Durações
- 5 s, 10 s
- Formatos
- 16:9, 9:16
- Imagens de entrada
- Até 1
- Unidade de cobrança
- por segundo de vídeo
- Suas LoRAs
- Até 3
- ID do modelo
wan/wan-2-1-image-to-video
Experimente Wan 2.1 (image-to-video)
Configurações
Imagem inicial
Um link para um arquivo .safetensors, ou o link de uma LoRA que você treinou aqui. Até 3 na aba JSON.
A mesma requisição das configurações à esquerda, pronta para copiar.
curl https://api.martllm.com/v1/video/generations \
-H "Authorization: Bearer $UBERLLM_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "wan/wan-2-1-image-to-video",
"prompt": "",
"resolution": "480p",
"duration_seconds": 5
}'
# → {"id": "<job id>", "status": "queued", "poll_url": "/v1/video/generations/<job id>"}No que a API do Wan 2.1 (image-to-video) se destaca
- Clipes de até 10 segundos em uma única requisição.
- Um primeiro quadro exato a partir da sua imagem.
- Até 1 imagens de referência para personagens, produtos ou lugares.
- Saída em 480p, 720p.
- Formatos: 16:9, 9:16.
Exemplos para começar
01
Dar vida a uma foto
Bring the photo to life: a slow camera push-in, hair and clothes move gently in the wind, the person blinks and smiles slightly; keep the face, outfit and background unchanged
Com a sua imagem · 5 s
02
Girar uma foto de produto
The product in the photo turns slowly on a turntable, soft studio light, the label stays sharp and readable, clean white background
Com a sua imagem · 5 s
03
Dar movimento a uma cena parada
The scene in the photo starts moving: leaves sway, light shifts across the ground, a gentle handheld drift; nothing new appears in the frame
Com a sua imagem
Parâmetros da API de Wan 2.1 (image-to-video)
| Parâmetro | Tipo | O que faz |
|---|---|---|
| model | wan/wan-2-1-image-to-video | Obrigatório |
| prompt | string | Obrigatório. What to make. |
| image_url | string | Um destes. The first frame: an https:// link or a data: URI. |
| input_images | array<string>, Até 1 | Um destes. Several pictures (https:// links or data: URIs). |
| resolution | 480p, 720p | Opcional · 480p. The seller needs one: left out, 480p is sent. |
| duration_seconds | 5, 10 | Opcional. Length in seconds. Left out: the model's shortest. |
| aspect_ratio | 16:9, 9:16 | Opcional. Shape of the video. |
| loras | array<object>, Até 3 | Opcional. Optional: up to 3 LoRAs to apply (a style or a person you trained). Each path is an https:// link to the weights, a file id from POST /v1/files (.safetensors), or the file link of your own finished training job. |
Lido de GET https://api.martllm.com/v1/models/wan/wan-2-1-image-to-video: as mesmas regras que a API confere em toda requisição.
Modelos Wan comparados
| Modelo | ID do modelo | A partir de (por segundo) | Até | Mais longo |
|---|---|---|---|---|
| Wan 2.1 (image-to-video) | wan/wan-2-1-image-to-video | 720p | 10 s | |
| Wan 2.7 Text-to-Video | wan/wan-2-7-text-to-video | $0.11 | 15 s | |
| Wan 2.2 A14B Text-to-Video | wan/wan-2-2-a14b-text-to-video | $0.0286 | 5 s | |
| Wan 2.5 Preview Text-to-Video | wan/wan-2-5-preview-text-to-video | $0.0336 | 10 s | |
| Wan 2.6 Text-to-Video | wan/wan-2-6-text-to-video | $0.11 | 15 s | |
| Wan 2.6 Flash Image-to-Video | wan/wan-2-6-flash-image-to-video | $0.034 | 1080p | 15 s |
| Wan 2.7 (image-to-video) | wan/wan-2-7-image-to-video | $0.0862 | 1080p | 15 s |
| Wan 2.5 Preview (image-to-video) | wan/wan-2-5-preview-image-to-video | $0.0671 | 1080p | 10 s |
| Wan 2.6 (image-to-video) | wan/wan-2-6-image-to-video | $0.0671 | 1080p | 15 s |
| Wan 2.7 (reference-to-video) | wan/wan-2-7-reference-to-video | $0.0336 | 1080p | 10 s |
Perguntas frequentes sobre a API do Wan 2.1 (image-to-video)
Quanto custa o Wan 2.1 (image-to-video)?
O Wan 2.1 (image-to-video) é cobrado pelo preço mostrado, sem nenhuma taxa do MartLLM por cima. Uma requisição que falha não custa nada.
Como gerar um vídeo com o Wan 2.1 (image-to-video)?
Envie um POST para https://api.martllm.com/v1/video/generations com sua chave de API do MartLLM, o modelo "wan/wan-2-1-image-to-video" e um prompt. Você receberá um job id de volta; consulte https://api.martllm.com/v1/video/generations/<job id> até que diga "succeeded", então faça o download em https://api.martllm.com/v1/media/artifacts/<job id>/0.