PopNowДокументация API
Основное содержимое

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 = 480p36$0.36
duration_seconds = 10, resolution = 480p54$0.54
duration_seconds = 5, resolution = 720p54$0.54
duration_seconds = 10, resolution = 720p81$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Необязательноstring16:916:9, 9:16Output aspect ratio.
resolutionНеобязательноstring480p480p, 720pOutput resolution.
duration_secondsНеобязательноinteger55, 10Clip 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Необязательноnumber5от 0 до 20How closely the clip follows the prompt, from 0 to 20.
flow_shiftНеобязательноnumber—от 1 до 10Flow-matching timestep shift, from 1 to 10. Leave it out for the default (3 at 480p, 5 at 720p).
stepsНеобязательноinteger30от 1 до 40Denoising steps, from 1 to 40. Fewer steps return faster and softer.
seedНеобязательноinteger—от 0 до 2147483647Random seed for controlled comparisons, not a frame-identical guarantee.

Пример запроса

Запрос работает как есть; поля, которые вы не указали, берут значения по умолчанию. Сначала положите ключ в переменную POPNOW_API_KEY.

POST /api/v1/jobs/createTask
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, чтобы получить уведомление.

GET /api/v1/jobs/recordInfo
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 = 480p36$0.36
duration_seconds = 10, resolution = 480p54$0.54
duration_seconds = 5, resolution = 720p54$0.54
duration_seconds = 10, resolution = 720p81$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Необязательноstring480p480p, 720pOutput resolution.
duration_secondsНеобязательноinteger55, 10Clip 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Необязательноnumber5от 0 до 20How closely the clip follows the prompt, from 0 to 20.
flow_shiftНеобязательноnumber—от 1 до 10Flow-matching timestep shift, from 1 to 10. Leave it out for the default (3 at 480p, 5 at 720p).
stepsНеобязательноinteger30от 1 до 40Denoising steps, from 1 to 40. Fewer steps return faster and softer.
seedНеобязательноinteger—от 0 до 2147483647Random seed for controlled comparisons, not a frame-identical guarantee.

Пример запроса

Запрос работает как есть; поля, которые вы не указали, берут значения по умолчанию. Сначала положите ключ в переменную POPNOW_API_KEY.

В примере в image_url стоят демонстрационные файлы PopNow. Замените их своими публичными HTTPS-ссылками, загруженными файлами или сохранёнными ассетами.

POST /api/v1/jobs/createTask
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, чтобы получить уведомление.

GET /api/v1/jobs/recordInfo
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 = 480p36$0.36
duration_seconds = 10, resolution = 480p54$0.54
duration_seconds = 5, resolution = 720p54$0.54
duration_seconds = 10, resolution = 720p81$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Необязательноstring480p480p, 720pOutput resolution.
strengthНеобязательноnumber0.9от 0.1 до 1How far to move away from the source, from 0.1 to 1.
duration_secondsНеобязательноinteger55, 10Clip 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Необязательноnumber5от 0 до 20How closely the clip follows the prompt, from 0 to 20.
flow_shiftНеобязательноnumber—от 1 до 10Flow-matching timestep shift, from 1 to 10. Leave it out for the default (3 at 480p, 5 at 720p).
stepsНеобязательноinteger30от 1 до 40Denoising steps, from 1 to 40. Fewer steps return faster and softer.
seedНеобязательноinteger—от 0 до 2147483647Random seed for controlled comparisons, not a frame-identical guarantee.

Пример запроса

Запрос работает как есть; поля, которые вы не указали, берут значения по умолчанию. Сначала положите ключ в переменную POPNOW_API_KEY.

В примере в video_url стоят демонстрационные файлы PopNow. Замените их своими публичными HTTPS-ссылками, загруженными файлами или сохранёнными ассетами.

POST /api/v1/jobs/createTask
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, чтобы получить уведомление.

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

Что дальше

На этой странице