Wan 2.1 LoRA: справочник по API
Видео и правки Wan 2.1 с твоими LoRA, включая движения камеры
С одним ключом PopNow API вы вызываете Wan 2.1 LoRA прямо из своего кода. Здесь собраны ID модели, которые нужно передать, все поля, которые она принимает, стоимость запроса в кредитах и готовый запрос — его можно вставить в терминал и запустить.
Описания параметров взяты из входной схемы модели и пока доступны только на английском.
Кратко
- Разработчик
- Alibaba
- Результат
- Видео
- От
- 36 кр. за запрос ($0.36)
1 кредит = 0,01 $. При приёме задачи резервируется максимально возможная сумма, а после завершения списывается фактический расход с округлением вверх до целого кредита; остаток возвращается. За задачи, завершившиеся ошибкой, плата не взимается. Точную сумму до запуска покажет POST /api/v1/jobs/quote.
Создать видео
alibaba/wan-2.1-lora/text-to-video
Цена
| Вариант | Кредиты (за запрос) | Доллары США |
|---|---|---|
duration_seconds = 5, resolution = 480p | 36 | $0.36 |
duration_seconds = 10, resolution = 480p | 54 | $0.54 |
duration_seconds = 5, resolution = 720p | 54 | $0.54 |
duration_seconds = 10, resolution = 720p | 81 | $0.81 |
Параметры
| Поле | Тип | По умолчанию | Допустимые значения | Назначение |
|---|---|---|---|---|
promptОбязательно | string | — | — | Describe the scene, the action and the camera. If a LoRA has trigger words, put them first. |
negative_promptНеобязательно | string | — | — | What must stay out of the clip. |
aspect_ratioНеобязательно | string | 16:9 | 16:9, 9:16 | Output aspect ratio. |
resolutionНеобязательно | string | 480p | 480p, 720p | Output resolution. |
duration_secondsНеобязательно | integer | 5 | 5, 10 | Clip length: 5 or 10 seconds. |
lorasНеобязательно | array<object> | [] | до 3 элементов | Up to three LoRA weight files trained for Wan 2.1 14B, each with its own strength. |
guidance_scaleНеобязательно | number | 5 | от 0 до 20 | How closely the clip follows the prompt, from 0 to 20. |
flow_shiftНеобязательно | number | — | от 1 до 10 | Flow-matching timestep shift, from 1 to 10. Leave it out for the default (3 at 480p, 5 at 720p). |
stepsНеобязательно | integer | 30 | от 1 до 40 | Denoising steps, from 1 to 40. Fewer steps return faster and softer. |
seedНеобязательно | integer | — | от 0 до 2147483647 | Random seed for controlled comparisons, not a frame-identical guarantee. |
Пример запроса
Запрос работает как есть; поля, которые вы не указали, берут значения по умолчанию. Сначала положите ключ в переменную POPNOW_API_KEY.
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: $(uuidgen)" \
-d '{
"model": "alibaba/wan-2.1-lora/text-to-video",
"input": {
"prompt": "A paper boat drifts down a rain-soaked street at dusk, neon signs reflecting in the water, slow tracking shot at ground level",
"duration_seconds": 5,
"resolution": "480p"
}
}'В ответе сразу приходит taskId. Результат забирайте через GET /api/v1/jobs/recordInfo или передайте callBackUrl, чтобы получить уведомление.
curl "https://api.popnow.ai/api/v1/jobs/recordInfo?taskId=TASK_ID_FROM_CREATE_TASK" \
-H "Authorization: Bearer $POPNOW_API_KEY"Видео из картинки
alibaba/wan-2.1-lora/image-to-video
Цена
| Вариант | Кредиты (за запрос) | Доллары США |
|---|---|---|
duration_seconds = 5, resolution = 480p | 36 | $0.36 |
duration_seconds = 10, resolution = 480p | 54 | $0.54 |
duration_seconds = 5, resolution = 720p | 54 | $0.54 |
duration_seconds = 10, resolution = 720p | 81 | $0.81 |
Параметры
| Поле | Тип | По умолчанию | Допустимые значения | Назначение |
|---|---|---|---|---|
promptОбязательно | string | — | — | Describe what happens after the opening frame and how the camera moves. |
image_urlОбязательно | string (uri) | — | — | Opening frame. The clip keeps its aspect ratio. |
negative_promptНеобязательно | string | — | — | What must stay out of the clip. |
resolutionНеобязательно | string | 480p | 480p, 720p | Output resolution. |
duration_secondsНеобязательно | integer | 5 | 5, 10 | Clip length: 5 or 10 seconds. |
lorasНеобязательно | array<object> | [] | до 3 элементов | Up to three LoRA weight files trained for Wan 2.1 14B, each with its own strength. |
guidance_scaleНеобязательно | number | 5 | от 0 до 20 | How closely the clip follows the prompt, from 0 to 20. |
flow_shiftНеобязательно | number | — | от 1 до 10 | Flow-matching timestep shift, from 1 to 10. Leave it out for the default (3 at 480p, 5 at 720p). |
stepsНеобязательно | integer | 30 | от 1 до 40 | Denoising steps, from 1 to 40. Fewer steps return faster and softer. |
seedНеобязательно | integer | — | от 0 до 2147483647 | Random seed for controlled comparisons, not a frame-identical guarantee. |
Пример запроса
Запрос работает как есть; поля, которые вы не указали, берут значения по умолчанию. Сначала положите ключ в переменную POPNOW_API_KEY.
В примере в image_url стоят демонстрационные файлы PopNow. Замените их своими публичными HTTPS-ссылками, загруженными файлами или сохранёнными ассетами.
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: $(uuidgen)" \
-d '{
"model": "alibaba/wan-2.1-lora/image-to-video",
"input": {
"prompt": "He lands softly on the rooftop, laughs and turns toward the camera while the balloons sway in the evening breeze; slow push-in",
"image_url": "https://media.popnow.ai/influencer/examples/marco.webp",
"duration_seconds": 5,
"resolution": "480p"
}
}'В ответе сразу приходит taskId. Результат забирайте через GET /api/v1/jobs/recordInfo или передайте callBackUrl, чтобы получить уведомление.
curl "https://api.popnow.ai/api/v1/jobs/recordInfo?taskId=TASK_ID_FROM_CREATE_TASK" \
-H "Authorization: Bearer $POPNOW_API_KEY"Редактировать видео
alibaba/wan-2.1-lora/video-edit
Цена
| Вариант | Кредиты (за запрос) | Доллары США |
|---|---|---|
duration_seconds = 5, resolution = 480p | 36 | $0.36 |
duration_seconds = 10, resolution = 480p | 54 | $0.54 |
duration_seconds = 5, resolution = 720p | 54 | $0.54 |
duration_seconds = 10, resolution = 720p | 81 | $0.81 |
Параметры
| Поле | Тип | По умолчанию | Допустимые значения | Назначение |
|---|---|---|---|---|
promptОбязательно | string | — | — | Describe how the whole clip should look after the restyle: subject, wardrobe, setting, style. |
video_urlОбязательно | string (uri) | — | — | Source clip. Its motion and timing carry over to the result. |
negative_promptНеобязательно | string | — | — | What must stay out of the clip. |
resolutionНеобязательно | string | 480p | 480p, 720p | Output resolution. |
strengthНеобязательно | number | 0.9 | от 0.1 до 1 | How far to move away from the source, from 0.1 to 1. |
duration_secondsНеобязательно | integer | 5 | 5, 10 | Clip length: 5 or 10 seconds. |
lorasНеобязательно | array<object> | [] | до 3 элементов | Up to three LoRA weight files trained for Wan 2.1 14B, each with its own strength. |
guidance_scaleНеобязательно | number | 5 | от 0 до 20 | How closely the clip follows the prompt, from 0 to 20. |
flow_shiftНеобязательно | number | — | от 1 до 10 | Flow-matching timestep shift, from 1 to 10. Leave it out for the default (3 at 480p, 5 at 720p). |
stepsНеобязательно | integer | 30 | от 1 до 40 | Denoising steps, from 1 to 40. Fewer steps return faster and softer. |
seedНеобязательно | integer | — | от 0 до 2147483647 | Random seed for controlled comparisons, not a frame-identical guarantee. |
Пример запроса
Запрос работает как есть; поля, которые вы не указали, берут значения по умолчанию. Сначала положите ключ в переменную POPNOW_API_KEY.
В примере в video_url стоят демонстрационные файлы PopNow. Замените их своими публичными HTTPS-ссылками, загруженными файлами или сохранёнными ассетами.
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: $(uuidgen)" \
-d '{
"model": "alibaba/wan-2.1-lora/video-edit",
"input": {
"prompt": "Recolor the flowers in soft pastel blue; keep the face and the motion unchanged",
"video_url": "https://media.popnow.ai/effects/flower-bloom-1abd6efb.mp4",
"duration_seconds": 5,
"resolution": "480p"
}
}'В ответе сразу приходит taskId. Результат забирайте через GET /api/v1/jobs/recordInfo или передайте callBackUrl, чтобы получить уведомление.
curl "https://api.popnow.ai/api/v1/jobs/recordInfo?taskId=TASK_ID_FROM_CREATE_TASK" \
-H "Authorization: Bearer $POPNOW_API_KEY"
