Logo do AlibabaAlibabaVídeo

API do Wan 2.1 (image-to-video)

Gere vídeos com o Wan 2.1 (image-to-video) pelo MartLLM.

wan/wan-2-1-image-to-videoConectar ao ClaudeCriar chave de API
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âmetroTipoO que faz
modelwan/wan-2-1-image-to-videoObrigatório
promptstringObrigatório. What to make.
image_urlstringUm destes. The first frame: an https:// link or a data: URI.
input_imagesarray<string>, Até 1Um destes. Several pictures (https:// links or data: URIs).
resolution480p, 720pOpcional · 480p. The seller needs one: left out, 480p is sent.
duration_seconds5, 10Opcional. Length in seconds. Left out: the model's shortest.
aspect_ratio16:9, 9:16Opcional. Shape of the video.
lorasarray<object>, Até 3Opcional. 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

ModeloID do modeloA partir de (por segundo)AtéMais longo
Wan 2.1 (image-to-video)wan/wan-2-1-image-to-video720p10 s
Wan 2.7 Text-to-Videowan/wan-2-7-text-to-video$0.1115 s
Wan 2.2 A14B Text-to-Videowan/wan-2-2-a14b-text-to-video$0.02865 s
Wan 2.5 Preview Text-to-Videowan/wan-2-5-preview-text-to-video$0.033610 s
Wan 2.6 Text-to-Videowan/wan-2-6-text-to-video$0.1115 s
Wan 2.6 Flash Image-to-Videowan/wan-2-6-flash-image-to-video$0.0341080p15 s
Wan 2.7 (image-to-video)wan/wan-2-7-image-to-video$0.08621080p15 s
Wan 2.5 Preview (image-to-video)wan/wan-2-5-preview-image-to-video$0.06711080p10 s
Wan 2.6 (image-to-video)wan/wan-2-6-image-to-video$0.06711080p15 s
Wan 2.7 (reference-to-video)wan/wan-2-7-reference-to-video$0.03361080p10 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.

Guias

Comparar com modelos semelhantes