PopNowAPI
Consigue tu clave API

Wan 2.2 Plus LoRA API

de Alibaba

Wan 2.2 de imagen a video con tus propios LoRA

alibaba/wan-2.2-plus-lora/image-to-video
  • Hasta 720p
  • Clips de 5 a 8 s
  • Carga tus propios LoRA
  • Imagen a video
  • Extender video

Llámalo con el nombre de modelo alibaba/wan-2.2-plus-lora/image-to-video en POST /jobs/createTask, desde 0,12 US$.

Nombre del modeloalibaba/wan-2.2-plus-lora/image-to-video
EndpointPOST https://api.popnow.ai/api/v1/jobs/createTask
# 1. Create the task. Keep the Idempotency-Key if you retry after a network error.
export IDEMPOTENCY_KEY="$(uuidgen)"
curl -X POST https://api.popnow.ai/api/v1/jobs/createTask \
  -H "Authorization: Bearer $POPNOW_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $IDEMPOTENCY_KEY" \
  -d '{
  "model": "alibaba/wan-2.2-plus-lora/image-to-video",
  "input": {
    "prompt": "A slow aerial shot drifting over a misty pine forest at sunrise",
    "image_url": "https://media.popnow.ai/influencer/examples/marco.webp",
    "duration_seconds": 5,
    "resolution": "480p"
  }
}'

# 2. Copy data.taskId from the response, then poll until state is succeeded, failed, canceled or expired.
TASK_ID="TASK_ID_FROM_RESPONSE"
curl "https://api.popnow.ai/api/v1/jobs/recordInfo?taskId=$TASK_ID" \
  -H "Authorization: Bearer $POPNOW_API_KEY"

El input se genera a partir del esquema de abajo, así que pasa la validación tal cual. Cambia el prompt y los enlaces por los tuyos.

Precio

OpciónUSD por segundo
resolution 480p0,024 US$
resolution 720p0,048 US$

Facturación en USD · Todas las opciones y su precio: GET /models/alibaba/wan-2.2-plus-lora/image-to-video

Límites

Duración del clip
5–8 s
Resoluciones
480p · 720p

Parámetros

Estos campos salen del mismo esquema con el que validamos cada petición. Los campos que no aparecen se rechazan.

  • image_urlstringObligatorio

    La imagen de partida.

    Rango
    1 – … chars · image/jpeg, image/png, image/webp, image/gif
  • promptstringObligatorio

    Describe the action, the camera, and the mood of the shot.

  • low_noise_lorasarray<object>Opcional

    LoRAs applied only in the low-noise stage, which refines detail and texture. Up to three.

    Rango
    0 – 3 items
    Campos internos
    • low_noise_loras[].pathstringObligatorio

      Direct download URL of the LoRA weights file.

      Rango
      1 – … chars · application/octet-stream
    • low_noise_loras[].scalenumberOpcional

      Strength of this LoRA. Defaults to 1.

      Por defecto
      1
      Rango
      0 – 4
  • high_noise_lorasarray<object>Opcional

    LoRAs applied only in the high-noise stage, which sets composition and motion. Up to three.

    Rango
    0 – 3 items
    Campos internos
    • high_noise_loras[].pathstringObligatorio

      Direct download URL of the LoRA weights file.

      Rango
      1 – … chars · application/octet-stream
    • high_noise_loras[].scalenumberOpcional

      Strength of this LoRA. Defaults to 1.

      Por defecto
      1
      Rango
      0 – 4
  • lorasarray<object>Opcional

    Carga tus archivos LoRA para fijar un estilo o un personaje.

    Rango
    0 – 3 items
    Campos internos
    • loras[].pathstringObligatorio

      Direct download URL of the LoRA weights file.

      Rango
      1 – … chars · application/octet-stream
    • loras[].scalenumberOpcional

      Strength of this LoRA. Defaults to 1.

      Por defecto
      1
      Rango
      0 – 4
  • duration_secondsintegerOpcionalCambia el precio

    Cuánto dura el clip. Se cobra por segundo.

    Por defecto
    5
    Valores permitidos
    58
  • resolutionstringOpcionalCambia el precio

    Tamaño de salida. Más grande es más nítido y cuesta más.

    Por defecto
    "480p"
    Valores permitidos
    "480p""720p"
  • seedintegerOpcional

    Repite el mismo número para obtener un resultado reproducible.

    Rango
    0 – 2147483647
Esquema JSON sin procesar
{
  "additionalProperties": false,
  "properties": {
    "duration_seconds": {
      "default": 5,
      "description": "Requested output length in seconds.",
      "enum": [
        5,
        8
      ],
      "type": "integer"
    },
    "high_noise_loras": {
      "description": "LoRAs applied only in the high-noise stage, which sets composition and motion. Up to three.",
      "items": {
        "additionalProperties": false,
        "properties": {
          "path": {
            "contentMediaType": [
              "application/octet-stream"
            ],
            "description": "Direct download URL of the LoRA weights file.",
            "format": "uri",
            "minLength": 1,
            "type": "string"
          },
          "scale": {
            "default": 1,
            "description": "Strength of this LoRA. Defaults to 1.",
            "maximum": 4,
            "minimum": 0,
            "type": "number"
          }
        },
        "required": [
          "path"
        ],
        "type": "object"
      },
      "maxItems": 3,
      "type": "array"
    },
    "image_url": {
      "contentMediaType": [
        "image/jpeg",
        "image/png",
        "image/webp",
        "image/gif"
      ],
      "description": "Opening frame. The clip starts from this image.",
      "format": "uri",
      "minLength": 1,
      "type": "string"
    },
    "loras": {
      "description": "LoRAs applied to the whole generation, up to three.",
      "items": {
        "additionalProperties": false,
        "properties": {
          "path": {
            "contentMediaType": [
              "application/octet-stream"
            ],
            "description": "Direct download URL of the LoRA weights file.",
            "format": "uri",
            "minLength": 1,
            "type": "string"
          },
          "scale": {
            "default": 1,
            "description": "Strength of this LoRA. Defaults to 1.",
            "maximum": 4,
            "minimum": 0,
            "type": "number"
          }
        },
        "required": [
          "path"
        ],
        "type": "object"
      },
      "maxItems": 3,
      "type": "array"
    },
    "low_noise_loras": {
      "description": "LoRAs applied only in the low-noise stage, which refines detail and texture. Up to three.",
      "items": {
        "additionalProperties": false,
        "properties": {
          "path": {
            "contentMediaType": [
              "application/octet-stream"
            ],
            "description": "Direct download URL of the LoRA weights file.",
            "format": "uri",
            "minLength": 1,
            "type": "string"
          },
          "scale": {
            "default": 1,
            "description": "Strength of this LoRA. Defaults to 1.",
            "maximum": 4,
            "minimum": 0,
            "type": "number"
          }
        },
        "required": [
          "path"
        ],
        "type": "object"
      },
      "maxItems": 3,
      "type": "array"
    },
    "prompt": {
      "description": "Describe the action, the camera, and the mood of the shot.",
      "type": "string"
    },
    "resolution": {
      "default": "480p",
      "description": "Output resolution.",
      "enum": [
        "480p",
        "720p"
      ],
      "type": "string"
    },
    "seed": {
      "description": "Random seed. Keep it fixed only for controlled comparisons, not as a frame-identical guarantee.",
      "maximum": 2147483647,
      "minimum": 0,
      "type": "integer"
    }
  },
  "required": [
    "image_url",
    "prompt"
  ],
  "type": "object"
}

Respuestas, consultas y callbacks

Todos los modelos funcionan igual: crea una tarea y luego consulta su estado o espera el callback.

Consulta el precio primero

cURL
curl -X POST https://api.popnow.ai/api/v1/jobs/quote \
  -H "Authorization: Bearer $POPNOW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "alibaba/wan-2.2-plus-lora/image-to-video",
  "input": {
    "prompt": "A slow aerial shot drifting over a misty pine forest at sunrise",
    "image_url": "https://media.popnow.ai/influencer/examples/marco.webp",
    "duration_seconds": 5,
    "resolution": "480p"
  }
}'

Antes de ejecutar, envía el mismo cuerpo de petición a POST /jobs/quote para consultar el coste estimado y el máximo en USD. El presupuesto no ejecuta tareas ni carga tu saldo.

Aceptada

HTTP
HTTP/1.1 202 Accepted

{
  "code": 200,
  "msg": "success",
  "data": {
    "taskId": "task_01k3m8x9q2z4v7n5p6r8s0t1w3",
    "state": "queued"
  },
  "request_id": "req_example_create"
}

HTTP 202 significa que la tarea está aceptada: el máximo en USD queda reservado hasta la liquidación. Al aceptar una tarea, reservamos el importe máximo del presupuesto en tu saldo de API. Al terminar, cobramos el uso real sin superar la reserva y liberamos el resto. Si la tarea falla, liberamos el importe reservado.

Consultar estado

cURL
curl "https://api.popnow.ai/api/v1/jobs/recordInfo?taskId=$TASK_ID" \
  -H "Authorization: Bearer $POPNOW_API_KEY"

Consulta cada pocos segundos espaciando cada vez más y para cuando state sea succeeded, failed, canceled o expired.

Tarea terminada

JSON
{
  "code": 200,
  "msg": "success",
  "data": {
    "taskId": "task_01k3m8x9q2z4v7n5p6r8s0t1w3",
    "model": "alibaba/wan-2.2-plus-lora/image-to-video",
    "state": "succeeded",
    "output": {
      "assets": [
        {
          "url": "https://cdn.popnow.ai/tasks/task_01k3m8x9q2z4v7n5p6r8s0t1w3/output.mp4?signature=FROM_RESPONSE",
          "expiresAt": "2026-10-17T12:20:00Z",
          "mime": "video/mp4",
          "width": 1280,
          "height": 720,
          "durationSeconds": 5
        }
      ]
    },
    "settled": true
  },
  "request_id": "req_example_record"
}

Descarga desde la url antes de expiresAt. ¿Necesitas un enlace nuevo más tarde? Pídelo con POST /common/download-url.

Verificar un callback

Node.js
import { createHash, createHmac, timingSafeEqual } from "node:crypto";
import express from "express";

const app = express();
// express.raw keeps the exact bytes that were signed; express.json would not match.
app.post("/hooks/popnow", express.raw({ type: "application/json" }), (req, res) => {
  const timestamp = req.header("X-Webhook-Timestamp");
  const signature = req.header("X-Webhook-Signature") ?? "";
  const body = JSON.parse(req.body.toString("utf8"));
  const taskId = body.data?.taskId ?? body.task_id;
  const digest = createHash("sha256").update(req.body).digest("hex");
  const expected = createHmac("sha256", process.env.POPNOW_WEBHOOK_SECRET)
    .update(`${taskId}.${timestamp}.${digest}`)
    .digest("base64");
  const ok = expected.length === signature.length && timingSafeEqual(Buffer.from(expected), Buffer.from(signature));
  // Check the signature first, then reject anything older than five minutes.
  if (!ok || Math.abs(Date.now() / 1000 - Number(timestamp)) > 300) return res.status(401).end();
  res.status(200).end(); // answer fast, then fetch the task and store its files
});

Con callBackUrl te enviamos la tarea terminada. Comprueba la firma sobre el cuerpo sin procesar antes de fiarte de ella.

Enviar un archivo local

cURL
curl -X POST https://api.popnow.ai/api/v1/common/upload-url \
  -H "Authorization: Bearer $POPNOW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"contentType": "image/png", "bytes": 482113}'

# PUT the file bytes to data.uploadUrl with every header in data.headers, then commit it:
curl -X POST https://api.popnow.ai/api/v1/files/$FILE_ID/commit \
  -H "Authorization: Bearer $POPNOW_API_KEY"
# The commit returns a popnow://f/... reference. Put it in any image, video or
# audio field of the task input instead of a public https URL.

Los enlaces https públicos funcionan tal cual. Los archivos locales pasan antes por upload-url y commit.

Acerca de Wan 2.2 Plus LoRA

Wan 2.2 de imagen a video con tus propios LoRA.

Llámalo con el nombre de modelo alibaba/wan-2.2-plus-lora/image-to-video en POST /jobs/createTask, desde 0,12 US$.

Parámetros de la petición

ParámetroObligatorioDescripción
duration_secondsNoCuánto dura el clip. Se cobra por segundo. 5 · 8 · Por defecto: 5
high_noise_lorasNoLoRAs applied only in the high-noise stage, which sets composition and motion. Up to three.
image_urlSíLa imagen de partida.
lorasNoCarga tus archivos LoRA para fijar un estilo o un personaje.
low_noise_lorasNoLoRAs applied only in the low-noise stage, which refines detail and texture. Up to three.
promptSíDescribe the action, the camera, and the mood of the shot.
resolutionNoTamaño de salida. Más grande es más nítido y cuesta más. 480p · 720p · Por defecto: 480p
seedNoRepite el mismo número para obtener un resultado reproducible. ≥ 0 · ≤ 2147483647

Precios

Los precios se indican en USD. La API utiliza un saldo independiente en dólares estadounidenses. Los créditos de la web no sirven para la API ni se pueden convertir en saldo de API; tampoco se puede convertir el saldo de API en créditos de la web. Al aceptar una tarea, reservamos el importe máximo del presupuesto en tu saldo de API. Al terminar, cobramos el uso real sin superar la reserva y liberamos el resto. Si la tarea falla, liberamos el importe reservado.

OpciónUSD por segundo
resolution 480p0,024 US$
resolution 720p0,048 US$

Antes de ejecutar, envía el mismo cuerpo de petición a POST /jobs/quote para consultar el coste estimado y el máximo en USD. El presupuesto no ejecuta tareas ni carga tu saldo.

Inicio rápido de la API

Llama a la API de Wan 2.2 Plus LoRA en tres pasos

  1. Crea una clave de API. Inicia sesión en PopNow y crea una clave en la consola API. Las claves empiezan por sk-popnow-. Las llamadas utilizan tu saldo independiente en dólares estadounidenses.
  2. Envía la solicitud. Haz POST /jobs/createTask con model alibaba/wan-2.2-plus-lora/image-to-video y un objeto input según la tabla de parámetros. La respuesta devuelve un ID de tarea al instante.
  3. Obtén el resultado. Consulta GET /jobs/recordInfo con el ID de tarea, o pasa una callBackUrl y te enviamos el resultado ahí. Descarga los enlaces de salida cuando la tarea termine bien.
# 1. Create the task. Keep the Idempotency-Key if you retry after a network error.
export IDEMPOTENCY_KEY="$(uuidgen)"
curl -X POST https://api.popnow.ai/api/v1/jobs/createTask \
  -H "Authorization: Bearer $POPNOW_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $IDEMPOTENCY_KEY" \
  -d '{
  "model": "alibaba/wan-2.2-plus-lora/image-to-video",
  "input": {
    "prompt": "A slow aerial shot drifting over a misty pine forest at sunrise",
    "image_url": "https://media.popnow.ai/influencer/examples/marco.webp",
    "duration_seconds": 5,
    "resolution": "480p"
  }
}'

# 2. Copy data.taskId from the response, then poll until state is succeeded, failed, canceled or expired.
TASK_ID="TASK_ID_FROM_RESPONSE"
curl "https://api.popnow.ai/api/v1/jobs/recordInfo?taskId=$TASK_ID" \
  -H "Authorization: Bearer $POPNOW_API_KEY"

Sustituye el prompt y los enlaces por los tuyos. La pestaña API tiene la referencia de la respuesta, el sondeo y el callback.

Preguntas sobre la API de Wan 2.2 Plus LoRA

¿Cuánto cuesta la API de Wan 2.2 Plus LoRA?

Wan 2.2 Plus LoRA cuesta desde 0,12 US$ por un clip de 5 segundos con Imagen a video, su tarea más barata. Precios por opción: 480p 0,024 US$ por segundo, 720p 0,048 US$ por segundo. La API utiliza un saldo independiente en dólares estadounidenses. Los créditos de la web no sirven para la API ni se pueden convertir en saldo de API; tampoco se puede convertir el saldo de API en créditos de la web. Al aceptar una tarea, reservamos el importe máximo del presupuesto en tu saldo de API. Al terminar, cobramos el uso real sin superar la reserva y liberamos el resto. Si la tarea falla, liberamos el importe reservado.

¿Cuál es el nombre de modelo de Wan 2.2 Plus LoRA en la API?

Pon alibaba/wan-2.2-plus-lora/image-to-video para Imagen a video; alibaba/wan-2.2-plus-lora/video-extend para Extender video en el campo model de POST /jobs/createTask.

¿Qué límites tiene la API de Wan 2.2 Plus LoRA?

Duración del clip: 5–8 s; Resoluciones: 480p · 720p. Las peticiones fuera de estos límites se rechazan antes de cobrar nada.

Más sobre Wan 2.2 Plus LoRA