PopNowDocs API
Contenuto principale

Riferimento API di Wan 2.1 LoRA

Video e modifiche Wan 2.1 con le tue LoRA, movimenti di camera inclusi

Con una sola chiave API di PopNow chiami Wan 2.1 LoRA dal tuo codice. Qui trovi gli ID del modello da inviare, ogni campo di input accettato, quanto costa ogni richiesta in USD e una richiesta da incollare nel terminale così com’è.

Le descrizioni dei parametri provengono dallo schema di input del modello e sono disponibili solo in inglese.

In sintesi

Sviluppato da
Alibaba
Risultato
Video
Da
$0.24 USD per richiesta

I prezzi sono indicati in USD e gli importi vengono addebitati sul tuo saldo PopNow. Alla ricezione viene riservato il massimo importo; al termine viene addebitato il consumo effettivo e il resto viene sbloccato. Le attività fallite non vengono addebitate. Per un preventivo esatto prima di eseguire, usa POST /api/v1/jobs/quote.

Crea video

alibaba/wan-2.1-lora/text-to-video

Prezzo

OpzioneUSD
duration_seconds = 5, resolution = 480p$0.24 per richiesta
duration_seconds = 10, resolution = 480p$0.36 per richiesta
duration_seconds = 5, resolution = 720p$0.36 per richiesta
duration_seconds = 10, resolution = 720p$0.54 per richiesta

Parametri

CampoTipoPredefinitoValori ammessiA cosa serve
promptObbligatoriostring——Describe the scene, the action and the camera. If a LoRA has trigger words, put them first.
negative_promptFacoltativostring——What must stay out of the clip.
aspect_ratioFacoltativostring16:916:9, 9:16Output aspect ratio.
resolutionFacoltativostring480p480p, 720pOutput resolution.
duration_secondsFacoltativointeger55, 10Clip length: 5 or 10 seconds.
lorasFacoltativoarray<object>[]fino a 3 elementiUp to three LoRA weight files trained for Wan 2.1 14B, each with its own strength.
guidance_scaleFacoltativonumber5da 0 a 20How closely the clip follows the prompt, from 0 to 20.
flow_shiftFacoltativonumber—da 1 a 10Flow-matching timestep shift, from 1 to 10. Leave it out for the default (3 at 480p, 5 at 720p).
stepsFacoltativointeger30da 1 a 40Denoising steps, from 1 to 40. Fewer steps return faster and softer.
seedFacoltativointeger—da 0 a 2147483647Random seed for controlled comparisons, not a frame-identical guarantee.

Richiesta di esempio

Questa richiesta funziona così com’è; i campi omessi usano il valore predefinito. Prima salva la tua chiave in 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"
  }
}'

La risposta contiene subito un taskId. Recupera il risultato con GET /api/v1/jobs/recordInfo, oppure aggiungi callBackUrl per ricevere una notifica.

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"

Da immagine a video

alibaba/wan-2.1-lora/image-to-video

Prezzo

OpzioneUSD
duration_seconds = 5, resolution = 480p$0.24 per richiesta
duration_seconds = 10, resolution = 480p$0.36 per richiesta
duration_seconds = 5, resolution = 720p$0.36 per richiesta
duration_seconds = 10, resolution = 720p$0.54 per richiesta

Parametri

CampoTipoPredefinitoValori ammessiA cosa serve
promptObbligatoriostring——Describe what happens after the opening frame and how the camera moves.
image_urlObbligatoriostring (uri)——Opening frame. The clip keeps its aspect ratio.
negative_promptFacoltativostring——What must stay out of the clip.
resolutionFacoltativostring480p480p, 720pOutput resolution.
duration_secondsFacoltativointeger55, 10Clip length: 5 or 10 seconds.
lorasFacoltativoarray<object>[]fino a 3 elementiUp to three LoRA weight files trained for Wan 2.1 14B, each with its own strength.
guidance_scaleFacoltativonumber5da 0 a 20How closely the clip follows the prompt, from 0 to 20.
flow_shiftFacoltativonumber—da 1 a 10Flow-matching timestep shift, from 1 to 10. Leave it out for the default (3 at 480p, 5 at 720p).
stepsFacoltativointeger30da 1 a 40Denoising steps, from 1 to 40. Fewer steps return faster and softer.
seedFacoltativointeger—da 0 a 2147483647Random seed for controlled comparisons, not a frame-identical guarantee.

Richiesta di esempio

Questa richiesta funziona così com’è; i campi omessi usano il valore predefinito. Prima salva la tua chiave in POPNOW_API_KEY.

L’esempio usa file di prova di PopNow in image_url. Sostituiscili con i tuoi link HTTPS pubblici, file caricati o asset salvati.

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"
  }
}'

La risposta contiene subito un taskId. Recupera il risultato con GET /api/v1/jobs/recordInfo, oppure aggiungi callBackUrl per ricevere una notifica.

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"

Modifica video

alibaba/wan-2.1-lora/video-edit

Prezzo

OpzioneUSD
duration_seconds = 5, resolution = 480p$0.24 per richiesta
duration_seconds = 10, resolution = 480p$0.36 per richiesta
duration_seconds = 5, resolution = 720p$0.36 per richiesta
duration_seconds = 10, resolution = 720p$0.54 per richiesta

Parametri

CampoTipoPredefinitoValori ammessiA cosa serve
promptObbligatoriostring——Describe how the whole clip should look after the restyle: subject, wardrobe, setting, style.
video_urlObbligatoriostring (uri)——Source clip. Its motion and timing carry over to the result.
negative_promptFacoltativostring——What must stay out of the clip.
resolutionFacoltativostring480p480p, 720pOutput resolution.
strengthFacoltativonumber0.9da 0.1 a 1How far to move away from the source, from 0.1 to 1.
duration_secondsFacoltativointeger55, 10Clip length: 5 or 10 seconds.
lorasFacoltativoarray<object>[]fino a 3 elementiUp to three LoRA weight files trained for Wan 2.1 14B, each with its own strength.
guidance_scaleFacoltativonumber5da 0 a 20How closely the clip follows the prompt, from 0 to 20.
flow_shiftFacoltativonumber—da 1 a 10Flow-matching timestep shift, from 1 to 10. Leave it out for the default (3 at 480p, 5 at 720p).
stepsFacoltativointeger30da 1 a 40Denoising steps, from 1 to 40. Fewer steps return faster and softer.
seedFacoltativointeger—da 0 a 2147483647Random seed for controlled comparisons, not a frame-identical guarantee.

Richiesta di esempio

Questa richiesta funziona così com’è; i campi omessi usano il valore predefinito. Prima salva la tua chiave in POPNOW_API_KEY.

L’esempio usa file di prova di PopNow in video_url. Sostituiscili con i tuoi link HTTPS pubblici, file caricati o asset salvati.

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"
  }
}'

La risposta contiene subito un taskId. Recupera il risultato con GET /api/v1/jobs/recordInfo, oppure aggiungi callBackUrl per ricevere una notifica.

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"

Passi successivi

In questa pagina