P Video 2 Pro Lipsync API, P Video 2 Pro API, P Video 2 & 1 API, P Video Avatar, Upscale, Edit & Animate API: Pricing, Documentation

by Pruna AI

P Video is an advanced AI video generation model offering multiple generation modes including text-to-video, image-to-video, audio-conditioned, and image+audio synthesis. Integrate seamlessly via the Pixazo API.

Get API Key
P Video API

Models Version

WELCOME BONUS

Get 10% Cashback on Your First Payment (up to $500)

Add funds and get 10% cashback on your first payment (up to $500).

Claim Your Cashback →

P-Video 2 Pro Lipsync API Documentation

Give an existing talking video new speech: P-Video 2 Pro Lipsync re-syncs the speaker's mouth to an audio file you send, in any language, and keeps everything else in the shot (framing, background, body) from the original video. Use it to dub a clip into another language, fix a line, or record a new one on the same take. Asynchronous: submit returns a request_id; poll the status endpoint until the request is COMPLETED, then download the video from output.media_url.

POST https://gateway.pixazo.ai/p-video-2-pro-lipsync/v1/generate

Authentication

All requests require an API key passed via header.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour API subscription key

Lipsync - P-Video 2 Pro Lipsync

Request Code

POST https://gateway.pixazo.ai/p-video-2-pro-lipsync/v1/generate
Content-Type: application/json
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

{
  "video": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/lipsync/talking-head-5s.mp4",
  "audio": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/audio/speech-5s.mp3"
}
import requests

url = "https://gateway.pixazo.ai/p-video-2-pro-lipsync/v1/generate"
headers = {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
  "video": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/lipsync/talking-head-5s.mp4",
  "audio": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/audio/speech-5s.mp3"
}

resp = requests.post(url, json=data, headers=headers)
print(resp.json())
const res = await fetch("https://gateway.pixazo.ai/p-video-2-pro-lipsync/v1/generate", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
  },
  body: JSON.stringify({
  "video": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/lipsync/talking-head-5s.mp4",
  "audio": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/audio/speech-5s.mp3"
})
});
console.log(await res.json());
curl -X POST 'https://gateway.pixazo.ai/p-video-2-pro-lipsync/v1/generate' \
  -H 'Content-Type: application/json' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
  --data-raw '{"video": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/lipsync/talking-head-5s.mp4", "audio": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/audio/speech-5s.mp3"}'

Output

{
  "request_id": "p-video-2-pro-lipsync_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/p-video-2-pro-lipsync_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Webhook (Optional)

Instead of polling, you can receive a Webhook callback when the request reaches a terminal state. Provide a Webhook URL via header on the submit request.

HeaderRequiredDescription
X-Webhook-URLTo enableHTTPS URL to receive the Webhook callback.
X-Webhook-ModeNoterminal (default, one callback on COMPLETED/ERROR) or sync (per-poll callbacks).

Example: enable Webhook

curl -X POST 'https://gateway.pixazo.ai/p-video-2-pro-lipsync/v1/generate' \
  -H 'Content-Type: application/json' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
  -H 'X-Webhook-URL: https://your-server.com/webhook' \
  --data-raw '{"video": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/lipsync/talking-head-5s.mp4", "audio": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/audio/speech-5s.mp3"}'

Callback Payload (success)

{
  "request_id": "p-video-2-pro-lipsync_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "p-video-2-pro-lipsync",
  "error": null,
  "output": {
    "media_url": [
      "https://cdn.pixazo.ai/v1/p-video-2-pro-lipsync_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.mp4"
    ],
    "media_type": "video/mp4"
  },
  "created_at": "2026-11-27T08:27:33.687Z",
  "updated_at": "2026-11-27 08:30:26",
  "completed_at": "2026-11-27 08:30:25"
}

Failure callback shape

{
  "request_id": "p-video-2-pro-lipsync_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "p-video-2-pro-lipsync",
  "error": "Description of the failure"
}

Delivery semantics

  • terminal mode: one Webhook callback when the request is COMPLETED or ERROR.
  • sync mode: a Webhook callback on every poll while the request is processing (status PROCESSING), plus the final COMPLETED/ERROR callback.
  • Callbacks are idempotent on request_id — de-duplicate on it.
  • Respond 200 within a few seconds; the Webhook endpoint must be HTTPS.

Request Parameters

ParameterRequiredTypeDefaultAllowed values / range
videoYesrequiredstring—A public https URL of a video file (MP4 recommended), up to 200 MB
The talking clip, with one clearly visible face. It sets the person, the framing, the background and the size of the output: the output keeps the video's size and shape up to 1080p (a bigger video is scaled down to 1,920 pixels on its long side). A close-up or medium shot of one speaker, without cuts or long head turns, works best.
audioYesrequiredstring—A public https URL of an audio file (MP3 or WAV), up to 64 MB
The new speech, in any language: the mouth follows it, and it becomes the output's soundtrack (the video's own sound is not kept, so mix any music or effects into this file first). Use a voice that suits the person on screen.
seedNointegerrandomAny integer
Send the same seed with the same video and audio to get the same result again, for example when you compare languages or line readings.
enable_safety_filterNobooleanfalsetrue, false
Check the inputs against the content policy. With it off, the always-on checks (sexual content involving minors, self-harm) still apply.

How long the output is

The output is as long as the shorter of the video and the audio, at most 60 seconds: an audio longer than the video is cut at the video's end, and a video longer than the audio stops when the audio ends. Trim the longer file first if you need an exact length.

How usage is measured

Billed per second of the delivered video, at one rate for every resolution. It is counted in whole seconds. When you submit, the video's length is reserved from your balance (at most 60 seconds, and 60 seconds when its length cannot be read); the final charge is for the delivered video, which is as long as the shorter of your two files. The rate is in the pricing panel on this page. Nothing is charged for a request that fails.

Parameters not supported

Rejected with 400

Checked when you submit: the request is rejected before it is queued.

ParameterWhy
aspect_ratio, resolution, output_resolutionNot accepted: the output keeps the video's resolution and shape, up to 1080p.
audio_urlNot a field here: send the new speech as 'audio'.
durationNot accepted: the output is as long as the shorter of the video and the audio, up to 60 seconds.
enable_safety_checker, disable_safety_checkerNot accepted here: use 'enable_safety_filter' (true or false).
model, version, no_op, input, parameters, seconds, num_frames, frames_per_second, ratio, mode, first_frame_image, last_frame_image, end_image_url, prompt_upsampler, voice, voice_script, voice_prompt, voice_language, keep_audio, save_audio, ignore_audio, negative_prompt, draft, prompt_upsampling, image, image_url, images, image_urls, reference_images, width, height, size, target, fps, turbo, target_resolution, upscale_factor, scale, target_fps, frame_rate, output_fpsNot a field of this API.
n, num_outputs, num_videos, num_images, number_of_images, batch_size, countNot supported: P-Video 2 Pro Lipsync returns one video per request. Send one request per video.
prompt, instruction_promptNot accepted: P-Video 2 Pro Lipsync takes no prompt; the mouth follows the speech in 'audio'.
sync_mode, lipsync_mode, emotion, model_mode, temperatureNot accepted: P-Video 2 Pro Lipsync has no lipsync options; send 'video' and 'audio' (and optionally 'seed' and 'enable_safety_filter').
video_url, video_uriNot a field here: send the talking video as 'video'.

Accepted, then the request fails

These pass the submit check, so the submit returns 202, but the request then fails with status: "ERROR". Nothing is charged.

ParameterWhen the request fails
videoNo face is found in the video (Generation failed: Prediction failed: Async prediction failed: ValueError: no face found in the video).
video, audioA file shorter than 0.9 seconds, or not a readable video or audio file.
video, audioThe content is blocked by the safety rules.

Accepted but ignored

Any other parameter is dropped and has no effect.

The output video

output.media_url is one MP4 at 24 frames per second, with the audio you sent as its soundtrack. Only the area around the mouth is redrawn; the rest of each frame is the original video.

Measured at launch:

InputsSizeLengthFrame rateSound
5 s video, 1920×1080 + 5 s audio1920×10805.00 s24 fpsYes
8 s video, 1920×1080 + 5 s audio1920×10805.00 s24 fpsYes
5 s video, 1920×1080 + 8 s audio1920×10805.00 s24 fpsYes
5 s video, 1280×720 + 5 s audio1280×7205.00 s24 fpsYes

Timing

At launch, the 4 test requests (5 second videos) each took about 70 seconds to 3 minutes from submit to completion. Polling the status endpoint every 5 to 10 seconds is enough, or use a Webhook.

Example Request

{
  "video": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/lipsync/talking-head-5s.mp4",
  "audio": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/audio/speech-5s.mp3"
}

Example Response

{
  "request_id": "p-video-2-pro-lipsync_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/p-video-2-pro-lipsync_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Example: a longer video with a shorter audio

The output is 5.00 seconds long: the length of the shorter file, the audio.

Request

{
  "video": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/video/input-8s.mp4",
  "audio": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/audio/speech-5s.mp3"
}

Completed response

{
  "request_id": "p-video-2-pro-lipsync_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "p-video-2-pro-lipsync",
  "error": null,
  "output": {
    "media_url": [
      "https://cdn.pixazo.ai/v1/p-video-2-pro-lipsync_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.mp4"
    ],
    "media_type": "video/mp4"
  },
  "created_at": "2026-11-27T08:27:40.768Z",
  "updated_at": "2026-11-27 08:30:26",
  "completed_at": "2026-11-27 08:30:25"
}

Example: a video without a visible face fails

The submit is accepted, then the request ends with status: "ERROR" and the reason in error. Nothing is charged.

Request

{
  "video": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/video/seed-audio-1-5-hummingbird-3s.mp4",
  "audio": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/audio/speech-5s.mp3"
}

Final response

{
  "request_id": "p-video-2-pro-lipsync_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "p-video-2-pro-lipsync",
  "error": "Generation failed: Prediction failed: Async prediction failed: ValueError: no face found in the video",
  "output": null,
  "created_at": "2026-11-27T08:27:58.206Z",
  "updated_at": "2026-11-27 08:29:07",
  "completed_at": "2026-11-27 08:29:07"
}

Request Headers

HeaderRequiredDescription
Content-TypeYesapplication/json
Ocp-Apim-Subscription-KeyYesYour API subscription key.
X-Webhook-URLNoEnable Webhook callbacks (see Webhook section).
X-Webhook-ModeNoterminal (default) or sync (see Webhook section).

Response Handling

Status CodeMeaning
202Accepted — request queued; returns request_id and polling_url.
400Bad request — the body failed the submit check (see Request Parameters) and was not queued.
401Unauthorized — missing or invalid subscription key.
402Insufficient balance for the hold this request needs.
429Too many requests.
500Internal server error.

Error Responses

A 400 names every rejected parameter in violations.

Prompt: sent {"video": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/lipsync/talking-head-5s.mp4", "audio": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/audio/speech-5s.mp3", "prompt": "say hello"}

{
  "error": "Invalid request parameters",
  "message": "'prompt' is not supported by this model; remove it from the request (got \"say hello\"); 'prompt' is not accepted: P-Video 2 Pro Lipsync takes no prompt; the mouth follows the speech in 'audio'.",
  "violations": [
    "'prompt' is not supported by this model; remove it from the request (got \"say hello\")",
    "'prompt' is not accepted: P-Video 2 Pro Lipsync takes no prompt; the mouth follows the speech in 'audio'."
  ]
}

Duration: sent {"video": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/lipsync/talking-head-5s.mp4", "audio": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/audio/speech-5s.mp3", "duration": 5}

{
  "error": "Invalid request parameters",
  "message": "'duration' is not supported by this model; remove it from the request (got 5); 'duration' is not accepted: the output is as long as the shorter of the video and the audio, up to 60 seconds.",
  "violations": [
    "'duration' is not supported by this model; remove it from the request (got 5)",
    "'duration' is not accepted: the output is as long as the shorter of the video and the audio, up to 60 seconds."
  ]
}

Retrieving Results

Poll the status endpoint with the request_id until status is COMPLETED or ERROR, then download the video from output.media_url.

curl 'https://gateway.pixazo.ai/v2/requests/status/p-video-2-pro-lipsync_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY'

Completed response

Captured from a real P-Video 2 Pro Lipsync request at launch; the request id is masked.

{
  "request_id": "p-video-2-pro-lipsync_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "p-video-2-pro-lipsync",
  "error": null,
  "output": {
    "media_url": [
      "https://cdn.pixazo.ai/v1/p-video-2-pro-lipsync_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.mp4"
    ],
    "media_type": "video/mp4"
  },
  "created_at": "2026-11-27T08:27:33.687Z",
  "updated_at": "2026-11-27 08:30:26",
  "completed_at": "2026-11-27 08:30:25"
}

Response Fields

FieldTypeDescription
request_idstringUnique request identifier.
statusstringQUEUED, PROCESSING, COMPLETED or ERROR.
model_idstringThe model that handled the request.
errorstring or nullError message when status is ERROR; otherwise null.
output.media_urlarray of stringsURL of the MP4 (one per request). Download it and keep your own copy.
output.media_typestringvideo/mp4.
created_atstringRequest creation timestamp.
updated_atstringLast status change timestamp.
completed_atstringCompletion timestamp.
polling_urlstringStatus URL for this request (in the submit response).

Status Values & Flow

QUEUED → PROCESSING → COMPLETED (success) or ERROR (failure).

Typical workflow

  1. Send the request to POST https://gateway.pixazo.ai/p-video-2-pro-lipsync/v1/generate.
  2. Save the request_id from the 202 response.
  3. Poll GET /v2/requests/status/{request_id} every 5 to 10 seconds, or use a Webhook instead.
  4. When status is COMPLETED, download the video from output.media_url.

P-Video 2 Pro Lipsync API Pricing — Per-Second Rates

ResolutionPrice (USD)
Per second of output video, any resolution (up to 1080p)$0.02625/sec
2. P-Video Upscale

P-Video Upscale API Documentation

Make a video sharper and bigger: P-Video Upscale turns a clip into a 720p, 1080p, 2K or 4K MP4 that keeps the clip's shape, length and sound, adding real detail rather than just stretching the pixels. It can also raise the frame rate to 60 fps for smoother motion. Asynchronous: submit returns a request_id; poll the status endpoint until the request is COMPLETED, then download the video from output.media_url.

POST https://gateway.pixazo.ai/p-video-upscale/v1/generate

Authentication

All requests require an API key passed via header.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour API subscription key

Upscale - P-Video Upscale

Request Code

POST https://gateway.pixazo.ai/p-video-upscale/v1/generate
Content-Type: application/json
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

{
  "video": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/video/input-3s.mp4",
  "target": "1080p"
}
import requests

url = "https://gateway.pixazo.ai/p-video-upscale/v1/generate"
headers = {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
  "video": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/video/input-3s.mp4",
  "target": "1080p"
}

resp = requests.post(url, json=data, headers=headers)
print(resp.json())
const res = await fetch("https://gateway.pixazo.ai/p-video-upscale/v1/generate", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
  },
  body: JSON.stringify({
  "video": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/video/input-3s.mp4",
  "target": "1080p"
})
});
console.log(await res.json());
curl -X POST 'https://gateway.pixazo.ai/p-video-upscale/v1/generate' \
  -H 'Content-Type: application/json' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
  --data-raw '{"video": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/video/input-3s.mp4", "target": "1080p"}'

Output

{
  "request_id": "p-video-upscale_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/p-video-upscale_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Webhook (Optional)

Instead of polling, you can receive a Webhook callback when the request reaches a terminal state. Provide a Webhook URL via header on the submit request.

HeaderRequiredDescription
X-Webhook-URLTo enableHTTPS URL to receive the Webhook callback.
X-Webhook-ModeNoterminal (default, one callback on COMPLETED/ERROR) or sync (per-poll callbacks).

Example: enable Webhook

curl -X POST 'https://gateway.pixazo.ai/p-video-upscale/v1/generate' \
  -H 'Content-Type: application/json' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
  -H 'X-Webhook-URL: https://your-server.com/webhook' \
  --data-raw '{"video": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/video/input-3s.mp4", "target": "1080p"}'

Callback Payload (success)

{
  "request_id": "p-video-upscale_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "p-video-upscale",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/p-video-upscale_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.mp4"
    ],
    "media_type": "video/mp4"
  },
  "created_at": "2026-11-20T10:37:24.464Z",
  "updated_at": "2026-11-20 10:39:11",
  "completed_at": "2026-11-20 10:39:10"
}

Failure callback shape

{
  "request_id": "p-video-upscale_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "p-video-upscale",
  "error": "Description of the failure"
}

Delivery semantics

  • terminal mode: one Webhook callback when the request is COMPLETED or ERROR.
  • sync mode: a Webhook callback on every poll while the request is processing (status PROCESSING), plus the final COMPLETED/ERROR callback.
  • Callbacks are idempotent on request_id — de-duplicate on it.
  • Respond 200 within a few seconds; the Webhook endpoint must be HTTPS.

Request Parameters

ParameterRequiredTypeDefaultAllowed values / range
videoYesrequiredstring—A public https URL of a video file (MP4 recommended), up to 150 seconds and 512 MB
The clip to upscale. The output is as long as this video and keeps its shape and its sound.
targetNostring"1080p"720p, 1080p, 2k, 4k
Output size, by pixel count: 1080p is 1920×1080 for a 16:9 clip, and a vertical or square clip keeps its own shape at about the same number of pixels. A video that is already bigger than the target is not shrunk.
fpsNointegerthe source's rate16 to 60
Output frame rate. Leave it out to keep the source's rate (up to 60). A rate higher than the source's adds in-between frames, for example 24 fps to 60 fps for smooth motion.
turboNobooleanfalsetrue, false
A much faster model with slightly lower quality, at about a third of the standard price, at any frame rate.
enable_safety_filterNobooleanfalsetrue, false
Check the video against the content policy. With it off, the always-on checks (sexual content involving minors, self-harm) still apply.

How long a video can be

The limit is the number of frames the model works on, so it depends on target. Up to 30 fps every frame counts; above 30 fps only 30 frames per second are worked on and the rest are made in between. A longer video is refused and nothing is charged: use a shorter clip, a lower target or a lower fps.

targetMost framesAt 24 fpsAt 30 fps or more
720p2,400about 100 secondsabout 80 seconds
1080p1,200about 50 secondsabout 40 seconds
2k600about 25 secondsabout 20 seconds
4k300about 12.5 secondsabout 10 seconds

How usage is measured

Billed per second of the delivered video, at the rate for its target and frame-rate band: up to 30 fps, above 30 fps (up to 60), or turbo (one rate at any frame rate). A request without target is billed at 1080p. Without fps the video keeps the source's frame rate, so a source above 30 fps is billed at the above-30 rate. The video is as long as the source; when you submit, the source's length is reserved from your balance at the above-30 rate unless you set fps or turbo (150 seconds when its length cannot be read), and the final charge is the delivered video's seconds at the band it was made at. The rates are in the pricing panel on this page. Nothing is charged for a request that fails.

Parameters not supported

Rejected with 400

Checked when you submit: the request is rejected before it is queued.

ParameterWhy
video longer than 150 secondsMeasured when you submit (error: Input too long). Nothing is queued or charged.
video that cannot be downloadedThe file is fetched when you submit (error: Asset proxy failed). Nothing is queued or charged.
durationNot accepted: the output is as long as the source video (up to 150 seconds; shorter at 1080p and above, see the docs).
enable_safety_checker, disable_safety_checkerNot accepted here: use 'enable_safety_filter' (true or false).
model, version, no_op, input, parameters, seconds, num_frames, frames_per_second, aspect_ratio, ratio, mode, first_frame_image, last_frame_image, end_image_url, prompt_upsampler, voice, voice_script, voice_prompt, voice_language, audio, keep_audio, save_audio, ignore_audio, negative_prompt, draft, prompt_upsampling, image, image_url, images, image_urls, reference_images, seed, width, height, sizeNot a field of this API.
n, num_outputs, num_videos, num_images, number_of_images, batch_size, countNot supported: P-Video Upscale returns one video per request. Send one request per video.
prompt, instruction_promptNot accepted: P-Video Upscale takes no prompt, only the video and the 'target' size.
resolution, output_resolution, target_resolution, upscale_factor, scaleNot accepted here: use 'target' (720p, 1080p, 2k or 4k).
target_fps, frame_rate, output_fpsNot accepted here: use 'fps' (an integer from 16 to 60; leave it out to keep the source's frame rate).
video_urlNot a field here: send the video to upscale as 'video'.

Accepted, then the request fails

These pass the submit check, so the submit returns 202, but the request then fails with status: "ERROR". Nothing is charged.

ParameterWhen the request fails
videoThe file is not a readable video.
videoThe content is blocked by the safety rules.

Accepted but ignored

Any other parameter is dropped and has no effect.

The output video

output.media_url is one MP4 (H.264), as long as the source video, with the source's sound copied unchanged when it has any.

Measured at launch, from a 3 second 1280×720 24 fps source video:

RequestSizeLengthFrame rate
1080p1920×10803.0 s24 fps
2K, fps 602560×14403.0 s60 fps
4K, fps 243840×21603.0 s24 fps
720p, turbo1280×7203.0 s24 fps
4K, turbo3840×21603.0 s24 fps

target is a pixel count, not a fixed frame size: the video keeps the source's shape.

Timing

At launch, the 3 second video took about 2 minutes for 1080p; about 2 minutes for 2K, fps 60; about 2 minutes for 4K, fps 24; about 2 minutes for 720p, turbo; about 2 minutes for 4K, turbo. Polling the status endpoint every 5 to 10 seconds is enough, or use a Webhook.

Example Request

{
  "video": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/video/input-3s.mp4",
  "target": "1080p"
}

Example Response

{
  "request_id": "p-video-upscale_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/p-video-upscale_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Example: 2K at 60 fps

Request

{
  "video": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/video/input-3s.mp4",
  "target": "2k",
  "fps": 60
}

Completed response

{
  "request_id": "p-video-upscale_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "p-video-upscale",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/p-video-upscale_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.mp4"
    ],
    "media_type": "video/mp4"
  },
  "created_at": "2026-11-20T10:37:28.403Z",
  "updated_at": "2026-11-20 10:39:15",
  "completed_at": "2026-11-20 10:39:14"
}

Request Headers

HeaderRequiredDescription
Content-TypeYesapplication/json
Ocp-Apim-Subscription-KeyYesYour API subscription key.
X-Webhook-URLNoEnable Webhook callbacks (see Webhook section).
X-Webhook-ModeNoterminal (default) or sync (see Webhook section).

Response Handling

Status CodeMeaning
202Accepted — request queued; returns request_id and polling_url.
400Bad request — the body failed the submit check (see Request Parameters) and was not queued.
401Unauthorized — missing or invalid subscription key.
402Insufficient balance for the hold this request needs.
429Too many requests.
500Internal server error.

Error Responses

A 400 names every rejected parameter in violations.

Duration: sent {"video": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/video/input-3s.mp4", "duration": 3}

{
  "error": "Invalid request parameters",
  "message": "'duration' must be one of:  (got 3); 'duration' is not accepted: the output is as long as the source video (up to 150 seconds; shorter at 1080p and above, see the docs).",
  "violations": [
    "'duration' must be one of:  (got 3)",
    "'duration' is not accepted: the output is as long as the source video (up to 150 seconds; shorter at 1080p and above, see the docs)."
  ]
}

Prompt: sent {"video": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/video/input-3s.mp4", "prompt": "sharper"}

{
  "error": "Invalid request parameters",
  "message": "'prompt' must be one of:  (got \"sharper\"); 'prompt' is not accepted: P-Video Upscale takes no prompt, only the video and the 'target' size.",
  "violations": [
    "'prompt' must be one of:  (got \"sharper\")",
    "'prompt' is not accepted: P-Video Upscale takes no prompt, only the video and the 'target' size."
  ]
}

Retrieving Results

Poll the status endpoint with the request_id until status is COMPLETED or ERROR, then download the video from output.media_url.

curl 'https://gateway.pixazo.ai/v2/requests/status/p-video-upscale_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY'

Completed response

Captured from a real P-Video Upscale request at launch; the request id is masked.

{
  "request_id": "p-video-upscale_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "p-video-upscale",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/p-video-upscale_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.mp4"
    ],
    "media_type": "video/mp4"
  },
  "created_at": "2026-11-20T10:37:24.464Z",
  "updated_at": "2026-11-20 10:39:11",
  "completed_at": "2026-11-20 10:39:10"
}

Response Fields

FieldTypeDescription
request_idstringUnique request identifier.
statusstringQUEUED, PROCESSING, COMPLETED or ERROR.
model_idstringThe model that handled the request.
errorstring or nullError message when status is ERROR; otherwise null.
output.media_urlarray of stringsURL of the MP4 (one per request). Download it and keep your own copy.
output.media_typestringvideo/mp4.
created_atstringRequest creation timestamp.
updated_atstringLast status change timestamp.
completed_atstringCompletion timestamp.
polling_urlstringStatus URL for this request (in the submit response).

Status Values & Flow

QUEUED → PROCESSING → COMPLETED (success) or ERROR (failure).

Typical workflow

  1. Send the request to POST https://gateway.pixazo.ai/p-video-upscale/v1/generate.
  2. Save the request_id from the 202 response.
  3. Poll GET /v2/requests/status/{request_id} every 5 to 10 seconds, or use a Webhook instead.
  4. When status is COMPLETED, download the video from output.media_url.

P-Video Upscale API Pricing — Per-Second Rates

OutputPrice (USD)
720p, up to 30 fps$0.0105/sec
720p, above 30 fps (up to 60)$0.021/sec
720p, turbo (any fps)$0.00367/sec
1080p, up to 30 fps$0.021/sec
1080p, above 30 fps (up to 60)$0.042/sec
1080p, turbo (any fps)$0.00735/sec
2K, up to 30 fps$0.042/sec
2K, above 30 fps (up to 60)$0.084/sec
2K, turbo (any fps)$0.0147/sec
4K, up to 30 fps$0.084/sec
4K, above 30 fps (up to 60)$0.168/sec
4K, turbo (any fps)$0.0294/sec
3. P-Video Edit

P-Video Edit API Documentation

Edit a video with a text instruction: send the source video (up to 15 seconds) and say what to change in prompt. Add up to four reference images for a product, an accessory, a face or a style. The motion and timing stay, the output is as long as the source, and the sound is kept. Asynchronous: submit returns a request_id; poll the status endpoint until the request is COMPLETED.

POST https://gateway.pixazo.ai/p-video-edit/v1/generate

Authentication

All requests require an API key passed via header.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour API subscription key

Video Editing - P-Video Edit

Request Code

POST https://gateway.pixazo.ai/p-video-edit/v1/generate
Content-Type: application/json
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

{
  "video": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/video/input-3s.mp4",
  "prompt": "Change his black t-shirt to a bright red t-shirt.",
  "seed": 7
}
import requests

url = "https://gateway.pixazo.ai/p-video-edit/v1/generate"
headers = {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
  "video": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/video/input-3s.mp4",
  "prompt": "Change his black t-shirt to a bright red t-shirt.",
  "seed": 7
}

resp = requests.post(url, json=data, headers=headers)
print(resp.json())
const res = await fetch("https://gateway.pixazo.ai/p-video-edit/v1/generate", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
  },
  body: JSON.stringify({
  "video": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/video/input-3s.mp4",
  "prompt": "Change his black t-shirt to a bright red t-shirt.",
  "seed": 7
})
});
console.log(await res.json());
curl -X POST 'https://gateway.pixazo.ai/p-video-edit/v1/generate' \
  -H 'Content-Type: application/json' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
  --data-raw '{"video": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/video/input-3s.mp4", "prompt": "Change his black t-shirt to a bright red t-shirt.", "seed": 7}'

Output

{
  "request_id": "p-video-edit_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/p-video-edit_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Webhook (Optional)

Instead of polling, you can receive a Webhook callback when the request reaches a terminal state. Provide a Webhook URL via header on the submit request.

HeaderRequiredDescription
X-Webhook-URLTo enableHTTPS URL to receive the Webhook callback.
X-Webhook-ModeNoterminal (default, one callback on COMPLETED/ERROR) or sync (per-poll callbacks).

Callback Payload (success)

{
  "request_id": "p-video-edit_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "p-video-edit",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/p-video-edit_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.mp4"
    ],
    "media_type": "video/mp4"
  },
  "created_at": "2026-11-12T10:03:35.392Z",
  "updated_at": "2026-11-12 10:05:49",
  "completed_at": "2026-11-12 10:05:48"
}

Failure callback shape

{
  "request_id": "p-video-edit_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "p-video-edit",
  "error": "Generation failed: Prediction failed: Async prediction failed: RuntimeError: Modal prediction failed: status=500 body={\"detail\":\"cpu_preprocessing: RuntimeError: CalledProcessError: <command> returned non-zero exit status 1.\"}",
  "output": null,
  "created_at": "2026-11-12T10:03:37.494Z",
  "updated_at": "2026-11-12 10:05:14",
  "completed_at": "2026-11-12 10:05:14"
}

Callbacks are idempotent on request_id — de-duplicate on it. Respond 200 within a few seconds; the Webhook endpoint must be HTTPS.

Request Parameters

ParameterRequiredTypeDefaultAllowed values / range
videoYesrequiredstring—A public https URL of an MP4, MOV or WebM video, up to 15 seconds
The video to edit. Its motion, timing and sound are kept.
promptYesrequiredstring—Free text
The edit to make, for example “Change his black t-shirt to a bright red t-shirt”. One main change per request works best.
imagesNoarray of strings—Up to 4 public https URLs of JPG, PNG or WEBP pictures
References for the edit: a product, an accessory, a face or a style to match.
draftNobooleanfalsetrue, false
true: a faster, cheaper preview. Rerun with false once the prompt works.
prompt_upsamplingNoboolean—true, false
Let the model expand your prompt.
save_audioNobooleantruetrue, false
Keep the source soundtrack in the output video.
enable_safety_filterNoboolean—true, false
Check the inputs against the content policy.
seedNointegerrandomAny whole number
Fix it to get the same result again.

How usage is measured

Billed per second of the delivered video, which is as long as the source: one rate for draft and one for the full quality default. When you submit, the source's length is reserved from your balance (15 seconds when its length cannot be read, for example a WebM file); the final charge is the delivered video's seconds. The rates are in the pricing panel on this page. Nothing is charged for a request that fails.

Parameters not supported

Rejected with 400

Checked when you submit: the request is rejected before it is queued.

ParameterWhyUse instead
video longer than 15 secondsMeasured when you submit (error: Input too long). Nothing is queued or charged.Trim the video to 15 seconds or less
durationThe output is as long as the source video.Trim the source video
resolutionThe model sets the output size: at launch, a 1280×720 source came back at 848×480.—
video_urlNot a field here.video
image, image_url, image_urls, reference_imagesNot fields here.images (a list)
instruction_prompt, edit_promptNot fields here.prompt
images with more than 4 picturesAt most four references.Up to 4 pictures
video or an images entry that cannot be downloadedThe file is fetched when you submit (error: Asset proxy failed). Nothing is queued or charged.A public https URL that can be downloaded
turbo, target_fps, aspect_ratio, mode, voice_scriptFields of the other P-Video models.—
n, num_outputs, num_videos, batch_sizeOne video per request.One request per video
model, versionThis endpoint always runs P-Video Edit.—

Accepted, then the request fails

These pass the submit check, so the submit returns 202, but the request then fails with status: "ERROR". Nothing is charged.

ParameterWhen the request fails
videoThe file is not a readable video.
imagesA picture is not a readable image.
video, images, promptThe content is blocked by the safety rules.

Accepted but ignored

Any other parameter is dropped and has no effect.

The output video

output.media_url is one MP4 at 25 fps, as long as the source. Measured at launch, from a 3 second 1280×720 source:

RequestSizeLength
Full quality (default)848×4803.0 s
draft: true848×4803.0 s

The picture keeps the source's aspect ratio. Use draft to try prompts, then run the final edit at full quality.

Timing

At launch, the full-quality 3 second edit took about 110 seconds from submit to result, and the draft about 120 seconds. Longer sources take longer. Polling the status endpoint every 5 to 10 seconds is enough, or use a Webhook.

Example Request

{
  "video": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/video/input-3s.mp4",
  "prompt": "Change his black t-shirt to a bright red t-shirt.",
  "seed": 7
}

Example Response

{
  "request_id": "p-video-edit_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/p-video-edit_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Example: a draft preview

Request

{
  "video": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/video/input-3s.mp4",
  "prompt": "Change his black t-shirt to a bright red t-shirt.",
  "draft": true,
  "seed": 7
}

Completed response

{
  "request_id": "p-video-edit_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "p-video-edit",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/p-video-edit_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.mp4"
    ],
    "media_type": "video/mp4"
  },
  "created_at": "2026-11-12T10:03:37.011Z",
  "updated_at": "2026-11-12 10:05:52",
  "completed_at": "2026-11-12 10:05:51"
}

Source length

A video longer than 15 seconds is refused when you submit, before anything is reserved. This one was sent a 22.9 second video, which is counted as 23 seconds:

{
  "error": "Input too long",
  "message": "The source media is 23s. This API accepts inputs up to 15s — split it into shorter segments.",
  "max_input_seconds": 15,
  "input_seconds": 23
}

Request Headers

HeaderRequiredDescription
Content-TypeYesapplication/json
Ocp-Apim-Subscription-KeyYesYour API subscription key.
X-Webhook-URLNoEnable Webhook callbacks (see Webhook section).

Response Handling

Status CodeMeaning
202Accepted — request queued; returns request_id and polling_url.
400Bad request — the body failed the submit check (see Request Parameters) and was not queued.
401Unauthorized — missing or invalid subscription key.
402Insufficient balance.
403Forbidden.
429Too many requests.
500Internal server error.

Error Responses

A 400 names every rejected parameter in violations. This one was sent {"video_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/video/input-3s.mp4", "image": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg", "instruction_prompt": "Change his black t-shirt to a bright red t-shirt."}:

{
  "error": "Invalid request parameters",
  "message": "'video' is required; 'prompt' is required; 'video_url' is not a field here: send the video to edit as 'video'.; 'image' is not a field here: send 'images', a list of up to 4 reference picture URLs.; 'instruction_prompt' is not accepted here: use 'prompt'.",
  "violations": [
    "'video' is required",
    "'prompt' is required",
    "'video_url' is not a field here: send the video to edit as 'video'.",
    "'image' is not a field here: send 'images', a list of up to 4 reference picture URLs.",
    "'instruction_prompt' is not accepted here: use 'prompt'."
  ]
}

A video or picture that cannot be downloaded is also a 400, with the URL and the reason under failures (captured from a real request; the request id is masked):

{
  "request_id": "p-video-edit_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "error": "Asset proxy failed",
  "message": "Failed to proxy asset https://raw.githubusercontent.com/github/gitignore/main/no-such-video.mp4: 404 Not Found",
  "failures": [
    {
      "url": "https://raw.githubusercontent.com/github/gitignore/main/no-such-video.mp4",
      "error": "404 Not Found"
    }
  ]
}

Retrieving Results

Poll the status endpoint with the request_id until status is COMPLETED or ERROR, then download the video from output.media_url.

curl 'https://gateway.pixazo.ai/v2/requests/status/p-video-edit_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY'

Completed response

Captured from a real P-Video Edit request at launch; the request id is masked.

{
  "request_id": "p-video-edit_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "p-video-edit",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/p-video-edit_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.mp4"
    ],
    "media_type": "video/mp4"
  },
  "created_at": "2026-11-12T10:03:35.392Z",
  "updated_at": "2026-11-12 10:05:49",
  "completed_at": "2026-11-12 10:05:48"
}

Response Fields

FieldTypeDescription
request_idstringUnique request identifier.
statusstringQUEUED, PROCESSING, COMPLETED or ERROR.
model_idstringThe model that handled the request.
errorstring or nullError message when status is ERROR; otherwise null.
output.media_urlarray of stringsURL of the MP4 (one per request). Download it and keep your own copy.
output.media_typestringvideo/mp4.
created_atstringRequest creation timestamp.
updated_atstringLast status change timestamp.
completed_atstringCompletion timestamp.
polling_urlstringStatus URL for this request (in the submit response).

Status Values & Flow

QUEUED → PROCESSING → COMPLETED (success) or ERROR (failure). Treat any status other than QUEUED, PROCESSING or COMPLETED as a failure.

P-Video Edit API Pricing — Per-Second Rates

ResolutionModePrice (USD)
Full qualityStandard$0.04725/sec
DraftDraft$0.02625/sec
4. P-Video Animate

P-Video Animate API Documentation

Bring a picture to life with the motion of a video: the subject of image moves like the person in video, with that video's sound. The output is as long as the source video, up to 2 minutes, at 720p or 1080p. Asynchronous: submit returns a request_id; poll the status endpoint until the request is COMPLETED.

POST https://gateway.pixazo.ai/p-video-animate/v1/generate

Authentication

All requests require an API key passed via header.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour API subscription key

Animate - P-Video Animate

Request Code

POST https://gateway.pixazo.ai/p-video-animate/v1/generate
Content-Type: application/json
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

{
  "video": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/video/input-3s.mp4",
  "image": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"
}
import requests

url = "https://gateway.pixazo.ai/p-video-animate/v1/generate"
headers = {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
  "video": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/video/input-3s.mp4",
  "image": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"
}

resp = requests.post(url, json=data, headers=headers)
print(resp.json())
const res = await fetch("https://gateway.pixazo.ai/p-video-animate/v1/generate", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
  },
  body: JSON.stringify({
  "video": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/video/input-3s.mp4",
  "image": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"
})
});
console.log(await res.json());
curl -X POST 'https://gateway.pixazo.ai/p-video-animate/v1/generate' \
  -H 'Content-Type: application/json' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
  --data-raw '{"video": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/video/input-3s.mp4", "image": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"}'

Output

{
  "request_id": "p-video-animate_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/p-video-animate_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Webhook (Optional)

Instead of polling, you can receive a Webhook callback when the request reaches a terminal state. Provide a Webhook URL via header on the submit request.

HeaderRequiredDescription
X-Webhook-URLTo enableHTTPS URL to receive the Webhook callback.
X-Webhook-ModeNoterminal (default, one callback on COMPLETED/ERROR) or sync (per-poll callbacks).

Callback Payload (success)

{
  "request_id": "p-video-animate_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "p-video-animate",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/p-video-animate_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.mp4"
    ],
    "media_type": "video/mp4"
  },
  "created_at": "2026-11-12T10:03:43.669Z",
  "updated_at": "2026-11-12 10:05:22",
  "completed_at": "2026-11-12 10:05:22"
}

Failure callback shape

{
  "request_id": "p-video-animate_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "p-video-animate",
  "error": "Generation failed: Prediction failed: Async prediction failed: RuntimeError: Prediction failed",
  "output": null,
  "created_at": "2026-11-12T10:03:46.250Z",
  "updated_at": "2026-11-12 10:05:23",
  "completed_at": "2026-11-12 10:05:23"
}

Callbacks are idempotent on request_id — de-duplicate on it. Respond 200 within a few seconds; the Webhook endpoint must be HTTPS.

Request Parameters

ParameterRequiredTypeDefaultAllowed values / range
videoYesrequiredstring—A public https URL of an MP4 video, up to 120 seconds
The motion and the sound to copy. The output is as long as this video.
imageYesrequiredstring—A public https URL of a JPG, PNG or WEBP picture
The subject to animate.
instruction_promptNostring—Free text
Extra notes on how the subject should follow the motion.
resolutionNostring720p720p (about 1 megapixel), 1080p (about 2 megapixels)
Output size. The video takes the picture's framing and shape, not the source video's.
target_fpsNostringoriginaloriginal, 24, 48
Frame rate of the output; the default keeps the source's.
save_audioNobooleantruetrue, false
Keep the source video's sound in the output.
ignore_audioNobooleanfalsetrue, false
Generate without listening to the source audio. With save_audio on, the sound is still added.
turboNobooleanfalsetrue, false
Faster generation at slightly lower quality; same price.
disable_safety_checkerNobooleanfalsetrue, false
Turn off the safety checker on the generated video.
seedNointegerrandomAny whole number
Fix it to get the same result again.

How usage is measured

Billed per second of the delivered video, at the rate for its resolution; a request without resolution is billed at 720p. turbo and target_fps do not change the price. The video is as long as the source; when you submit, the source's length is reserved from your balance (120 seconds when its length cannot be read) and the final charge is the delivered video's seconds. The rates are in the pricing panel on this page. Nothing is charged for a request that fails.

Parameters not supported

Rejected with 400

Checked when you submit: the request is rejected before it is queued.

ParameterWhyUse instead
video longer than 120 secondsMeasured when you submit (error: Input too long). Nothing is queued or charged.Trim the video to 2 minutes or less
durationThe output is as long as the source video.Trim the source video
video_urlNot a field here.video
image_url, imagesNot fields here.image (one picture)
promptNot a field here.instruction_prompt
enable_safety_filterNot a field here.disable_safety_checker
video or image that cannot be downloadedThe file is fetched when you submit (error: Asset proxy failed). Nothing is queued or charged.A public https URL that can be downloaded
draft, prompt_upsampling, aspect_ratio, mode, voice_scriptFields of the other P-Video models.—
n, num_outputs, num_videos, batch_sizeOne video per request.One request per video
model, version, no_opThis endpoint always runs P-Video Animate.—

Accepted, then the request fails

These pass the submit check, so the submit returns 202, but the request then fails with status: "ERROR". Nothing is charged.

ParameterWhen the request fails
videoThe file is not a readable MP4 video.
imageThe picture is not a readable image.
video, image, instruction_promptThe content is blocked by the safety rules.

Accepted but ignored

Any other parameter is dropped and has no effect.

The output video

output.media_url is one MP4, as long as the source video. Measured at launch, from a 3 second 1280×720 source video and an 853×1280 (portrait) picture:

RequestSizeLengthFrame rate
Default (720p)768×12803.0 s24 fps
1080p, turbo1152×17923.0 s24 fps

The video takes the picture's framing and shape, not the source video's: this portrait picture gave a portrait video from a landscape source. 720p is half the price of 1080p and suits most uses.

Timing

At launch, the 3 second video took about 90 seconds at 720p and about 120 seconds at 1080p with turbo. Pruna quotes about 5 seconds of work per second of output. Polling the status endpoint every 5 to 10 seconds is enough, or use a Webhook.

Example Request

{
  "video": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/video/input-3s.mp4",
  "image": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"
}

Example Response

{
  "request_id": "p-video-animate_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/p-video-animate_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Example: 1080p with turbo

Request

{
  "video": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/video/input-3s.mp4",
  "image": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg",
  "resolution": "1080p",
  "turbo": true
}

Completed response

{
  "request_id": "p-video-animate_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "p-video-animate",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/p-video-animate_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.mp4"
    ],
    "media_type": "video/mp4"
  },
  "created_at": "2026-11-12T10:03:45.634Z",
  "updated_at": "2026-11-12 10:05:56",
  "completed_at": "2026-11-12 10:05:55"
}

Request Headers

HeaderRequiredDescription
Content-TypeYesapplication/json
Ocp-Apim-Subscription-KeyYesYour API subscription key.
X-Webhook-URLNoEnable Webhook callbacks (see Webhook section).

Response Handling

Status CodeMeaning
202Accepted — request queued; returns request_id and polling_url.
400Bad request — the body failed the submit check (see Request Parameters) and was not queued.
401Unauthorized — missing or invalid subscription key.
402Insufficient balance.
403Forbidden.
429Too many requests.
500Internal server error.

Error Responses

A 400 names every rejected parameter in violations. This one was sent {"video_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/video/input-3s.mp4", "image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg", "prompt": "Wave."}:

{
  "error": "Invalid request parameters",
  "message": "'video' is required; 'image' is required; 'video_url' is not a field here: send the motion video as 'video'.; 'image_url' is not a field here: send the picture as 'image'.; 'prompt' is not accepted here: use 'instruction_prompt'.",
  "violations": [
    "'video' is required",
    "'image' is required",
    "'video_url' is not a field here: send the motion video as 'video'.",
    "'image_url' is not a field here: send the picture as 'image'.",
    "'prompt' is not accepted here: use 'instruction_prompt'."
  ]
}

A video or picture that cannot be downloaded is also a 400, with the URL and the reason under failures (captured from a real request; the request id is masked):

{
  "request_id": "p-video-animate_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "error": "Asset proxy failed",
  "message": "Failed to proxy asset https://raw.githubusercontent.com/github/gitignore/main/no-such-video.mp4: 404 Not Found",
  "failures": [
    {
      "url": "https://raw.githubusercontent.com/github/gitignore/main/no-such-video.mp4",
      "error": "404 Not Found"
    }
  ]
}

Retrieving Results

Poll the status endpoint with the request_id until status is COMPLETED or ERROR, then download the video from output.media_url.

curl 'https://gateway.pixazo.ai/v2/requests/status/p-video-animate_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY'

Completed response

Captured from a real P-Video Animate request at launch; the request id is masked.

{
  "request_id": "p-video-animate_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "p-video-animate",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/p-video-animate_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.mp4"
    ],
    "media_type": "video/mp4"
  },
  "created_at": "2026-11-12T10:03:43.669Z",
  "updated_at": "2026-11-12 10:05:22",
  "completed_at": "2026-11-12 10:05:22"
}

Response Fields

FieldTypeDescription
request_idstringUnique request identifier.
statusstringQUEUED, PROCESSING, COMPLETED or ERROR.
model_idstringThe model that handled the request.
errorstring or nullError message when status is ERROR; otherwise null.
output.media_urlarray of stringsURL of the MP4 (one per request). Download it and keep your own copy.
output.media_typestringvideo/mp4.
created_atstringRequest creation timestamp.
updated_atstringLast status change timestamp.
completed_atstringCompletion timestamp.
polling_urlstringStatus URL for this request (in the submit response).

Status Values & Flow

QUEUED → PROCESSING → COMPLETED (success) or ERROR (failure). Treat any status other than QUEUED, PROCESSING or COMPLETED as a failure.

P-Video Animate API Pricing — Per-Second Rates

ResolutionPrice (USD)
720p$0.0315/sec
1080p$0.063/sec
5. P-Video 2 Pro Replace

P-Video 2 Pro Replace API Documentation

Put the person from a picture into a video. Send the source video and one picture in images, or two pictures for two people: the camera, the motion and the soundtrack stay, and the lips follow the source's audio. Videos run from 1 second to 2 minutes; a longer video is cut to 120 seconds. Asynchronous: submit returns a request_id; poll the status endpoint until the request is COMPLETED.

POST https://gateway.pixazo.ai/p-video-2-pro-replace/v1/generate

Authentication

All requests require an API key passed via header.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour API subscription key

Character Replacement - P-Video 2 Pro Replace

Request Code

POST https://gateway.pixazo.ai/p-video-2-pro-replace/v1/generate
Content-Type: application/json
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

{
  "video": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/video/input-8s.mp4",
  "images": [
    "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"
  ],
  "resolution": "480p",
  "seed": 42
}
import requests

url = "https://gateway.pixazo.ai/p-video-2-pro-replace/v1/generate"
headers = {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
  "video": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/video/input-8s.mp4",
  "images": [
    "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"
  ],
  "resolution": "480p",
  "seed": 42
}

resp = requests.post(url, json=data, headers=headers)
print(resp.json())
const res = await fetch("https://gateway.pixazo.ai/p-video-2-pro-replace/v1/generate", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
  },
  body: JSON.stringify({
  "video": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/video/input-8s.mp4",
  "images": [
    "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"
  ],
  "resolution": "480p",
  "seed": 42
})
});
console.log(await res.json());
curl -X POST 'https://gateway.pixazo.ai/p-video-2-pro-replace/v1/generate' \
  -H 'Content-Type: application/json' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
  --data-raw '{"video": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/video/input-8s.mp4", "images": ["https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"], "resolution": "480p", "seed": 42}'

Output

{
  "request_id": "p-video-2-pro-replace_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/p-video-2-pro-replace_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Webhook (Optional)

Instead of polling, you can receive a Webhook callback when the request reaches a terminal state. Provide a Webhook URL via header on the submit request.

HeaderRequiredDescription
X-Webhook-URLTo enableHTTPS URL to receive the Webhook callback.
X-Webhook-ModeNoterminal (default, one callback on COMPLETED/ERROR) or sync (per-poll callbacks).

Callback Payload (success)

{
  "request_id": "p-video-2-pro-replace_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "p-video-2-pro-replace",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/p-video-2-pro-replace_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.mp4"
    ],
    "media_type": "video/mp4"
  },
  "created_at": "2026-11-12T06:40:10.180Z",
  "updated_at": "2026-11-12 06:42:17",
  "completed_at": "2026-11-12 06:42:16"
}

Failure callback shape

{
  "request_id": "p-video-2-pro-replace_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "p-video-2-pro-replace",
  "error": "Generation failed: Prediction failed: Async prediction failed: RuntimeError: Modal predict rejected: status=400 body={\"detail\":\"the video could not be read; upload an MP4, MOV or WebM file\"}",
  "output": null,
  "created_at": "2026-11-12T06:40:12.808Z",
  "updated_at": "2026-11-12 06:42:20",
  "completed_at": "2026-11-12 06:42:20"
}

Callbacks are idempotent on request_id — de-duplicate on it. Respond 200 within a few seconds; the Webhook endpoint must be HTTPS.

Request Parameters

ParameterRequiredTypeDefaultAllowed values / range
videoYesrequiredstring—A public https URL of an MP4, MOV or WebM video; 1 second to 2 minutes, up to 8K; aspect ratio 1:4 to 4:1
The source video: its camera, motion, scene and sound are kept. A video longer than 120 seconds is cut to its first 120 seconds.
imagesYesrequiredarray of strings—1 or 2 public https URLs of JPG, PNG or WEBP pictures
The person to put in, one picture per person. With two pictures and no instruction, they are matched to the people left to right.
instruction_promptNostring—Free text
Who replaces whom, or other placement notes, for example “The woman from picture 1 replaces the man on the left”. Leave it out for one person.
resolutionNostring768p480p, 768p, 1080p, 2k, 4k
Output resolution; the source's aspect ratio is kept and the output is 24 fps. 1080p, 2k and 4k are generated at 768p and upscaled, so they take longer.
save_audioNobooleantruetrue, false
Keep the source soundtrack in the output video.
ignore_audioNobooleanfalsetrue, false
Generate without listening to the source audio, so the lips do not follow it. With save_audio on, the soundtrack is still added.
enable_safety_filterNobooleantruetrue, false
Check the inputs against the content policy. When off, the always-on rules still apply.
seedNointegerrandomAny whole number
Fix it to get the same result again.

How usage is measured

Billed per second of the delivered video, at the rate for its resolution; a request without resolution is billed at 768p. The video is as long as the source, up to 120 seconds. When you submit, the source's length is reserved from your balance (120 seconds when its length cannot be read, for example a WebM file); the final charge is the delivered video's seconds. The rates are in the pricing panel on this page. Nothing is charged for a request that fails.

Parameters not supported

Rejected with 400

Checked when you submit: the request is rejected before it is queued.

ParameterWhyUse instead
durationThe output is as long as the source video.Trim the source video
video_urlNot a field here.video
image, image_url, image_urls, reference_imagesNot fields here.images (a list)
promptNot a field here.instruction_prompt
disable_safety_checkerP-Video Replace v1's name.enable_safety_filter
images with 0 or more than 2 picturesOne person, or two people with one picture each.1 or 2 pictures
video or an images entry that cannot be downloadedThe file is fetched when you submit (error: Asset proxy failed). Nothing is queued or charged.A public https URL that can be downloaded
mode, aspect_ratio, draft, fps, voice_script, audioFields of the other P-Video models.—
n, num_outputs, num_videos, batch_sizeOne video per request.One request per video
model, versionThis endpoint always runs P-Video 2 Pro Replace.—

Accepted, then the request fails

These pass the submit check, so the submit returns 202, but the request then fails with status: "ERROR". Nothing is charged.

ParameterWhen the request fails
videoThe file is not a readable video, is shorter than 1 second, or its aspect ratio is outside 1:4 to 4:1.
imagesA picture is not a readable image.
video, images, instruction_promptThe content is blocked by the safety rules.

Accepted but ignored

Any other parameter is dropped and has no effect.

The output video

output.media_url is one MP4 at 24 fps, as long as the source, with the source's sound when it has one. Measured at launch:

RequestResolutionSizeLength
8 s source, 480p480p832×4808.0 s
3 s source, default, with instruction_prompt768p1344×7683.0 s

The picture keeps the source's aspect ratio. Use 480p for drafts, then 768p or higher for the final video.

Timing

At launch, the 8 s clip at 480p took about 120 seconds from submit to result, and the 3 s clip at 768p about 120 seconds. Longer sources and higher resolutions take longer: Pruna quotes about 1.5 to 2 minutes for 10 seconds at 768p and about 4 minutes at 4k. Polling the status endpoint every 5 to 10 seconds is enough, or use a Webhook.

Example Request

{
  "video": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/video/input-8s.mp4",
  "images": [
    "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"
  ],
  "resolution": "480p",
  "seed": 42
}

Example Response

{
  "request_id": "p-video-2-pro-replace_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/p-video-2-pro-replace_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Example: with an instruction, at the default resolution

Request

{
  "video": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/video/input-3s.mp4",
  "images": [
    "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"
  ],
  "instruction_prompt": "Replace the man with the woman from the picture."
}

Completed response

{
  "request_id": "p-video-2-pro-replace_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "p-video-2-pro-replace",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/p-video-2-pro-replace_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.mp4"
    ],
    "media_type": "video/mp4"
  },
  "created_at": "2026-11-12T06:40:12.246Z",
  "updated_at": "2026-11-12 06:42:20",
  "completed_at": "2026-11-12 06:42:19"
}

Request Headers

HeaderRequiredDescription
Content-TypeYesapplication/json
Ocp-Apim-Subscription-KeyYesYour API subscription key.
X-Webhook-URLNoEnable Webhook callbacks (see Webhook section).

Response Handling

Status CodeMeaning
202Accepted — request queued; returns request_id and polling_url.
400Bad request — the body failed the submit check (see Request Parameters) and was not queued.
401Unauthorized — missing or invalid subscription key.
402Insufficient balance.
403Forbidden.
429Too many requests.
500Internal server error.

Error Responses

A 400 names every rejected parameter in violations. This one was sent {"video_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/video/input-8s.mp4", "images": ["https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"], "prompt": "Swap him for her."}:

{
  "error": "Invalid request parameters",
  "message": "'video' is required; 'video_url' is not a field here: send the source video as 'video'.; 'prompt' is not accepted here: use 'instruction_prompt'.",
  "violations": [
    "'video' is required",
    "'video_url' is not a field here: send the source video as 'video'.",
    "'prompt' is not accepted here: use 'instruction_prompt'."
  ]
}

A video or picture that cannot be downloaded is also a 400, with the URL and the reason under failures (captured from a real request; the request id is masked):

{
  "request_id": "p-video-2-pro-replace_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "error": "Asset proxy failed",
  "message": "Failed to proxy asset https://raw.githubusercontent.com/github/gitignore/main/no-such-video.mp4: 404 Not Found",
  "failures": [
    {
      "url": "https://raw.githubusercontent.com/github/gitignore/main/no-such-video.mp4",
      "error": "404 Not Found"
    }
  ]
}

Retrieving Results

Poll the status endpoint with the request_id until status is COMPLETED or ERROR, then download the video from output.media_url.

curl 'https://gateway.pixazo.ai/v2/requests/status/p-video-2-pro-replace_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY'

Completed response

Captured from a real P-Video 2 Pro Replace request at launch; the request id is masked.

{
  "request_id": "p-video-2-pro-replace_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "p-video-2-pro-replace",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/p-video-2-pro-replace_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.mp4"
    ],
    "media_type": "video/mp4"
  },
  "created_at": "2026-11-12T06:40:10.180Z",
  "updated_at": "2026-11-12 06:42:17",
  "completed_at": "2026-11-12 06:42:16"
}

Response Fields

FieldTypeDescription
request_idstringUnique request identifier.
statusstringQUEUED, PROCESSING, COMPLETED or ERROR.
model_idstringThe model that handled the request.
errorstring or nullError message when status is ERROR; otherwise null.
output.media_urlarray of stringsURL of the MP4 (one per request). Download it and keep your own copy.
output.media_typestringvideo/mp4.
created_atstringRequest creation timestamp.
updated_atstringLast status change timestamp.
completed_atstringCompletion timestamp.
polling_urlstringStatus URL for this request (in the submit response).

Status Values & Flow

QUEUED → PROCESSING → COMPLETED (success) or ERROR (failure). Treat any status other than QUEUED, PROCESSING or COMPLETED as a failure.

P-Video 2 Pro Replace API Pricing — Per-Second Rates

ResolutionPrice (USD)
480p$0.02625/sec
768p$0.0525/sec
1080p$0.063/sec
2k$0.0735/sec
4k$0.0945/sec
6. P-Video 2 Pro Avatar

P-Video 2 Pro Avatar API Documentation

Turn a portrait and speech into a talking video with synced lips and expressions. Send an audio file, or write a voice_script and pick one of 30 voices in 10 languages. Videos run from 1 second to 3 minutes: the speech sets the length. Asynchronous: submit returns a request_id; poll the status endpoint until the request is COMPLETED.

POST https://gateway.pixazo.ai/p-video-2-pro-avatar/v1/generate

Authentication

All requests require an API key passed via header.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour API subscription key

Talking Avatar - P-Video 2 Pro Avatar

Request Code

POST https://gateway.pixazo.ai/p-video-2-pro-avatar/v1/generate
Content-Type: application/json
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

{
  "image": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg",
  "voice_script": "Hi! I'm a talking avatar made with P-Video 2 Pro Avatar on Pixazo.",
  "voice": "Kore (Female)",
  "voice_language": "English (US)",
  "voice_prompt": "Warm and upbeat, like greeting a friend.",
  "resolution": "480p",
  "seed": 42
}
import requests

url = "https://gateway.pixazo.ai/p-video-2-pro-avatar/v1/generate"
headers = {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
  "image": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg",
  "voice_script": "Hi! I'm a talking avatar made with P-Video 2 Pro Avatar on Pixazo.",
  "voice": "Kore (Female)",
  "voice_language": "English (US)",
  "voice_prompt": "Warm and upbeat, like greeting a friend.",
  "resolution": "480p",
  "seed": 42
}

resp = requests.post(url, json=data, headers=headers)
print(resp.json())
const res = await fetch("https://gateway.pixazo.ai/p-video-2-pro-avatar/v1/generate", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
  },
  body: JSON.stringify({
  "image": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg",
  "voice_script": "Hi! I'm a talking avatar made with P-Video 2 Pro Avatar on Pixazo.",
  "voice": "Kore (Female)",
  "voice_language": "English (US)",
  "voice_prompt": "Warm and upbeat, like greeting a friend.",
  "resolution": "480p",
  "seed": 42
})
});
console.log(await res.json());
curl -X POST 'https://gateway.pixazo.ai/p-video-2-pro-avatar/v1/generate' \
  -H 'Content-Type: application/json' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
  --data-raw '{"image": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg", "voice_script": "Hi! I'm a talking avatar made with P-Video 2 Pro Avatar on Pixazo.", "voice": "Kore (Female)", "voice_language": "English (US)", "voice_prompt": "Warm and upbeat, like greeting a friend.", "resolution": "480p", "seed": 42}'

Output

{
  "request_id": "p-video-2-pro-avatar_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/p-video-2-pro-avatar_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Webhook (Optional)

Instead of polling, you can receive a Webhook callback when the request reaches a terminal state. Provide a Webhook URL via header on the submit request.

HeaderRequiredDescription
X-Webhook-URLTo enableHTTPS URL to receive the Webhook callback.
X-Webhook-ModeNoterminal (default, one callback on COMPLETED/ERROR) or sync (per-poll callbacks).

Callback Payload (success)

{
  "request_id": "p-video-2-pro-avatar_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "p-video-2-pro-avatar",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/p-video-2-pro-avatar_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.mp4"
    ],
    "media_type": "video/mp4"
  },
  "created_at": "2026-11-12T02:52:54.456Z",
  "updated_at": "2026-11-12 02:54:36",
  "completed_at": "2026-11-12 02:54:35"
}

Failure callback shape

{
  "request_id": "p-video-2-pro-avatar_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "p-video-2-pro-avatar",
  "error": "Generation failed: Prediction failed: Async prediction failed: ValueError: image must be a valid image",
  "output": null,
  "created_at": "2026-11-12T02:52:56.390Z",
  "updated_at": "2026-11-12 02:54:39",
  "completed_at": "2026-11-12 02:54:39"
}

Callbacks are idempotent on request_id — de-duplicate on it. Respond 200 within a few seconds; the Webhook endpoint must be HTTPS.

Request Parameters

ParameterRequiredTypeDefaultAllowed values / range
imageYesrequiredstring—A public https URL of a JPG, JPEG, PNG or WEBP image
The portrait of the person who speaks. It becomes the first frame.
audioOne of these twostring—A public https URL; 1 second to 3 minutes, up to 64 MB
The speech. The video follows its timing. When both are sent, audio is used and voice_script is ignored.
voice_scriptOne of these twostring—The exact words to speak
Spoken by text-to-speech in the voice and voice_language you pick. About 400 words makes roughly 3 minutes; keep scripts under that.
voiceNostringZephyr (Female)One of the 30 voices below
The text-to-speech voice for voice_script.
voice_languageNostringEnglish (US)English (US), English (UK), Spanish, French, German, Italian, Portuguese (Brazil), Japanese, Korean, Hindi
The language of voice_script.
voice_promptNostringSay the following.Free text
How the voice should sound: tone, pacing, accent or emotion. It is not spoken.
promptNostringThe person is talking.Free text
What the video should show: the setting and how the person moves.
resolutionNostring768p480p, 768p, 1080p, 2k, 4k
1080p, 2k and 4k are generated at 768p and upscaled. 4k takes at most 125 seconds of speech.
prompt_upsamplingNobooleantruetrue, false
A vision model looks at the image and adds the scene's own motion to your prompt. Your words stay first.
enable_safety_filterNobooleanfalsetrue, false
Block content in the optional moderation categories. The always-on rules apply either way.
seedNointegerrandomAny whole number
Fix it to get the same result again.

Voices

Send the name with its label, for example Kore (Female) or Puck (Male).

Female voicesMale voices
Zephyr, Kore, Leda, Aoede, Callirrhoe, Autonoe, Despina, Erinome, Laomedeia, Achernar, Gacrux, Pulcherrima, Vindemiatrix, SulafatPuck, Charon, Fenrir, Orus, Enceladus, Iapetus, Umbriel, Algenib, Algieba, Schedar, Achird, Zubenelgenubi, Sadachbia, Sadaltager, Alnilam, Rasalgethi

How usage is measured

Billed per second of the delivered video, at the rate for its resolution; a request without resolution is billed at 768p. The speech sets the length, so the charge follows what was delivered, not a requested duration. The rates are in the pricing panel on this page. Nothing is charged for a request that fails.

Parameters not supported

Rejected with 400

Checked when you submit: the request is rejected before it is queued.

ParameterWhyUse instead
durationThe speech sets the length.Send longer or shorter audio or voice_script
video_promptP Video Avatar v1's name.prompt
disable_safety_filterP Video Avatar v1's name.enable_safety_filter
disable_prompt_upsamplingP Video Avatar v1's name.prompt_upsampling
negative_prompt, strength_negative_promptNot supported by this model.—
image_urlNot a field here.image
audio_urlNot a field here.audio
textNot a field here.voice_script
mode, aspect_ratio, last_frame_image, draft, fpsFields of the other P-Video models.—
n, num_outputs, num_videos, batch_sizeOne video per request.One request per video
model, versionThis endpoint always runs P-Video 2 Pro Avatar.—

Accepted, then the request fails

These pass the submit check, so the submit returns 202, but the request then fails with status: "ERROR". Nothing is charged.

ParameterWhen the request fails
imageThe file is not a readable image.
audioThe file is not readable speech audio, is shorter than 1 second or longer than 3 minutes.
resolution4k with more than 125 seconds of speech.
image, voice_script, promptThe content is blocked by the safety rules.

Accepted but ignored

Any other parameter is dropped and has no effect.

The output video

output.media_url is one MP4 with the speech as its audio track, at 24 fps. Measured at launch:

RequestResolutionSizeLength
voice_script, 480p480p480×7045.9 s
audio (7.6 s), default768p768×11527.7 s

The picture keeps the portrait's shape. Use 480p for drafts and a higher resolution for the final video.

Timing

At launch, the 480p script video took about 100 seconds from submit to result, and the 768p video from an audio file about 105 seconds. Longer speech and higher resolutions take longer. Polling the status endpoint every 5 to 10 seconds is enough, or use a Webhook.

Example Request

{
  "image": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg",
  "voice_script": "Hi! I'm a talking avatar made with P-Video 2 Pro Avatar on Pixazo.",
  "voice": "Kore (Female)",
  "voice_language": "English (US)",
  "voice_prompt": "Warm and upbeat, like greeting a friend.",
  "resolution": "480p",
  "seed": 42
}

Example Response

{
  "request_id": "p-video-2-pro-avatar_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/p-video-2-pro-avatar_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Example: from an audio file

Request

{
  "image": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg",
  "audio": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/audio/transcribe-sample.wav",
  "prompt": "The woman talks to the camera on a sunny rooftop, with small natural hand and head movements."
}

Completed response

{
  "request_id": "p-video-2-pro-avatar_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "p-video-2-pro-avatar",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/p-video-2-pro-avatar_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.mp4"
    ],
    "media_type": "video/mp4"
  },
  "created_at": "2026-11-12T02:52:55.635Z",
  "updated_at": "2026-11-12 02:54:37",
  "completed_at": "2026-11-12 02:54:36"
}

Request Headers

HeaderRequiredDescription
Content-TypeYesapplication/json
Ocp-Apim-Subscription-KeyYesYour API subscription key.
X-Webhook-URLNoEnable Webhook callbacks (see Webhook section).

Response Handling

Status CodeMeaning
202Accepted — request queued; returns request_id and polling_url.
400Bad request — the body failed the submit check (see Request Parameters) and was not queued.
401Unauthorized — missing or invalid subscription key.
402Insufficient balance.
403Forbidden.
429Too many requests.
500Internal server error.

Error Responses

A 400 names every rejected parameter in violations. This one was sent {"image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg", "voice_script": "Hello.", "duration": 5}:

{
  "error": "Invalid request parameters",
  "message": "'image' is required; 'duration' is not accepted: the speech (audio or voice_script) sets the length, 1 second to 3 minutes.; 'image_url' is not a field here: send the portrait as 'image'.",
  "violations": [
    "'image' is required",
    "'duration' is not accepted: the speech (audio or voice_script) sets the length, 1 second to 3 minutes.",
    "'image_url' is not a field here: send the portrait as 'image'."
  ]
}

Retrieving Results

Poll the status endpoint with the request_id until status is COMPLETED or ERROR, then download the video from output.media_url.

curl 'https://gateway.pixazo.ai/v2/requests/status/p-video-2-pro-avatar_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY'

Completed response

Captured from a real P-Video 2 Pro Avatar request at launch; the request id is masked.

{
  "request_id": "p-video-2-pro-avatar_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "p-video-2-pro-avatar",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/p-video-2-pro-avatar_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.mp4"
    ],
    "media_type": "video/mp4"
  },
  "created_at": "2026-11-12T02:52:54.456Z",
  "updated_at": "2026-11-12 02:54:36",
  "completed_at": "2026-11-12 02:54:35"
}

Response Fields

FieldTypeDescription
request_idstringUnique request identifier.
statusstringQUEUED, PROCESSING, COMPLETED or ERROR.
model_idstringThe model that handled the request.
errorstring or nullError message when status is ERROR; otherwise null.
output.media_urlarray of stringsURL of the MP4 (one per request). Download it and keep your own copy.
output.media_typestringvideo/mp4.
created_atstringRequest creation timestamp.
updated_atstringLast status change timestamp.
completed_atstringCompletion timestamp.
polling_urlstringStatus URL for this request (in the submit response).

Status Values & Flow

QUEUED → PROCESSING → COMPLETED (success) or ERROR (failure). Treat any status other than QUEUED, PROCESSING or COMPLETED as a failure.

P-Video 2 Pro Avatar API Pricing — Per-Second Rates

ResolutionPrice (USD)
480p$0.021/sec
768p$0.042/sec
1080p$0.063/sec
2k$0.084/sec
4k$0.126/sec
7. P-Video 2

P-Video 2 API Documentation

Generate a 1 to 20 second, 720p or 1080p video with sound from a text prompt or from a first and/or last frame. A draft mode gives a fast, lower-cost preview. Asynchronous: submit returns a request_id; poll the status endpoint until the request is COMPLETED.

POST https://gateway.pixazo.ai/p-video-2/v1/generate

Authentication

All requests require an API key passed via header.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour API subscription key

Text to Video - P-Video 2

Request Code

POST https://gateway.pixazo.ai/p-video-2/v1/generate
Content-Type: application/json
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

{
  "prompt": "A paper boat drifts across a calm pond at dusk, slow tracking shot",
  "duration": 5,
  "resolution": "720p",
  "aspect_ratio": "16:9"
}
import requests

url = "https://gateway.pixazo.ai/p-video-2/v1/generate"
headers = {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
  "prompt": "A paper boat drifts across a calm pond at dusk, slow tracking shot",
  "duration": 5,
  "resolution": "720p",
  "aspect_ratio": "16:9"
}

resp = requests.post(url, json=data, headers=headers)
print(resp.json())
const res = await fetch("https://gateway.pixazo.ai/p-video-2/v1/generate", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
  },
  body: JSON.stringify({
  "prompt": "A paper boat drifts across a calm pond at dusk, slow tracking shot",
  "duration": 5,
  "resolution": "720p",
  "aspect_ratio": "16:9"
})
});
console.log(await res.json());
curl -X POST 'https://gateway.pixazo.ai/p-video-2/v1/generate' \
  -H 'Content-Type: application/json' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
  --data-raw '{"prompt": "A paper boat drifts across a calm pond at dusk, slow tracking shot", "duration": 5, "resolution": "720p", "aspect_ratio": "16:9"}'

Output

{
  "request_id": "p-video-2_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/p-video-2_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Webhook (Optional)

Instead of polling, you can receive a Webhook callback when the request reaches a terminal state. Provide a Webhook URL via header on the submit request.

HeaderRequiredDescription
X-Webhook-URLTo enableHTTPS URL to receive the Webhook callback.
X-Webhook-ModeNoterminal (default, one callback on COMPLETED/ERROR) or sync (per-poll callbacks).

Example: enable Webhook

curl -X POST 'https://gateway.pixazo.ai/p-video-2/v1/generate' \
  -H 'Content-Type: application/json' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
  -H 'X-Webhook-URL: https://your-server.com/webhook' \
  --data-raw '{"prompt": "A paper boat drifts across a calm pond at dusk, slow tracking shot", "duration": 5, "resolution": "720p", "aspect_ratio": "16:9"}'

Callback Payload (success)

{
  "request_id": "p-video-2_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "p-video-2",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/p-video-2_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.mp4"
    ],
    "media_type": "video/mp4"
  },
  "created_at": "2026-11-04T11:33:20.441Z",
  "updated_at": "2026-11-04 11:35:06",
  "completed_at": "2026-11-04 11:35:05"
}

Failure callback shape

{
  "request_id": "p-video-2_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "p-video-2",
  "error": "Description of the failure",
  "output": null,
  "created_at": "2026-11-04T11:33:20.441Z",
  "updated_at": "2026-11-04 11:35:06",
  "completed_at": "2026-11-04 11:35:05"
}

Delivery semantics

  • terminal mode: one Webhook callback when the request is COMPLETED or ERROR.
  • sync mode: a Webhook callback on each status change.
  • Callbacks are idempotent on request_id — de-duplicate on it.
  • Respond 200 within a few seconds; the Webhook endpoint must be HTTPS.

Request Parameters

ParameterRequiredTypeDefaultAllowed values / range
promptYesrequiredstring—Non-empty text
What the video should show: subject, action, camera and sound.
imageNostring—Public https URL of an image (jpg, jpeg, png, webp)
First frame (image to video). The video takes the shape of this image, so aspect_ratio is ignored.
last_frame_imageNostring—Public https URL of an image (jpg, jpeg, png, webp)
Last frame. Use it with image for a first-to-last transition.
audioNostring—Public https URL of a WAV, FLAC or MP3 file, up to 20 seconds long
Audio to build the video around (for example speech or music). The video is as long as the audio, so do not send duration with it. The length must be readable from the file: an MP3 needs a length header (Xing/Info, which most encoders write).
durationNointeger51 – 20
Length of the video in whole seconds. Leave it out when you send audio.
aspect_ratioNostring16:916:9, 9:16, 4:3, 3:4, 3:2, 2:3, 1:1
Frame shape. Ignored when image is sent.
resolutionNostring720p720p, 1080p
Output resolution. 1080p is billed at a higher rate than 720p.
draftNobooleanfalsetrue, false
Draft mode: a faster, lower-quality preview, billed at a lower rate.
fpsNointeger2424, 48
Frames per second of the video.
prompt_upsamplingNobooleantruetrue, false
Rewrites your prompt into a more detailed one before generation.
save_audioNobooleantruetrue, false
Keep the generated sound track in the video.
disable_safety_filterNobooleantruetrue, false
Set false to check the inputs and the video against the provider's optional content filter.
seedNointeger—Any integer
Random seed, for reproducible results.

How usage is measured

Billed per second of output video: duration seconds (5 when omitted), at the rate of the resolution and draft setting (720p costs less than 1080p, and draft less than standard). With audio, 20 seconds are reserved from your balance when you submit, and you are charged for the seconds of video generated, as counted by the model when it finishes; the rest is released. An audio whose length cannot be read, or that is longer than 20 seconds, is rejected with 400 and nothing is charged. The rate is in the pricing panel on this page.

Parameters not supported

Some parameters are rejected outright, some values fail once the request is processed, and others are accepted and then ignored.

Rejected with 400

Checked when you submit: the request is rejected before it is queued.

ParameterWhyUse instead
model, versionThe model is fixed for this endpoint (P-Video 2) and is not caller-selectable.—
n, num_outputs, num_videos, num_images, number_of_images, batch_size, countThis API returns one video per request.One request per video
seconds, num_frames, frames_per_second, music_length_msThe length is set in whole seconds only.duration (1 – 20)
ratioNot a parameter of this endpoint.aspect_ratio
no_op, input, parametersA nested or wrapper object is not read.Every field at the top level of the body
first_frame_image, image_urlNot a parameter of this endpoint.image
end_image_urlNot a parameter of this endpoint.last_frame_image
video_url, videoThis endpoint takes no input video.—
audio_urlNot a parameter of this endpoint.audio
mode, prompt_upsampler, enable_safety_filterP-Video 2 Pro parameters.P-Video 2 Pro, or draft / prompt_upsampling / disable_safety_filter here

Accepted, then the request fails

These values pass the submit check, so the submit returns 202, but they are validated while the request is processed: the request fails, and the status endpoint (or Webhook) reports status: "ERROR" with an error message that names the problem.

ParameterWhen the request fails
image, last_frame_imageNot a public https URL.

Accepted but ignored

These are silently dropped — the request still returns 202, but the value has no effect on the generated video. Only the parameters listed in the table above are forwarded.

negative_prompt, webhook inside the body, and any parameter not listed above

Example Request

{
  "prompt": "A paper boat drifts across a calm pond at dusk, slow tracking shot",
  "duration": 5,
  "resolution": "720p",
  "aspect_ratio": "16:9"
}

Example Response

{
  "request_id": "p-video-2_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/p-video-2_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Request Headers

HeaderRequiredDescription
Content-TypeYesapplication/json
Ocp-Apim-Subscription-KeyYesYour API subscription key.
X-Webhook-URLNoEnable Webhook callbacks (see Webhook section).

Response Handling

Status CodeMeaning
202Accepted — request queued; returns request_id and polling_url.
400Bad request — the body failed the submit check and was not queued: prompt missing or blank; an audio whose length cannot be read from the file, or longer than 20 seconds; duration sent together with audio; a duration that is not a whole number from 1 to 20; a resolution other than 720p or 1080p; an aspect_ratio outside its allowed values; an fps other than 24 or 48; a draft, prompt_upsampling, save_audio or disable_safety_filter that is not true or false; a seed that is not an integer; an image or last_frame_image or audio that is not a string; or any of model, version, n, num_outputs, num_videos, num_images, number_of_images, batch_size, count, seconds, num_frames, frames_per_second, music_length_ms, ratio, no_op, input, parameters, first_frame_image, image_url, end_image_url, video_url, video, audio_url, mode, prompt_upsampler, enable_safety_filter (see “Parameters not supported” above).
401Unauthorized — missing or invalid subscription key.
402Insufficient balance.
403Forbidden.
429Too many requests.
500Internal server error.

Problems that can only be detected while the request is processed (“Accepted, then the request fails” above) are not a 400: they are reported through the status endpoint or Webhook with status: "ERROR".

Error Responses

A 400 names every rejected parameter in violations:

{
  "error": "Invalid request parameters",
  "message": "'duration' must be <= 20 (got 30)",
  "violations": [
    "'duration' must be <= 20 (got 30)"
  ]
}

A request that fails after it was queued is reported via the status endpoint (or Webhook) with status: "ERROR" and an error message — for example when image is not a public https URL.

Retrieving Results

Poll the status endpoint with the request_id from the submit response until status is COMPLETED or ERROR, then download the video from output.media_url.

curl 'https://gateway.pixazo.ai/v2/requests/status/p-video-2_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY'

Completed response

An example of a completed request; the request id is masked.

{
  "request_id": "p-video-2_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "p-video-2",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/p-video-2_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.mp4"
    ],
    "media_type": "video/mp4"
  },
  "created_at": "2026-11-04T11:33:20.441Z",
  "updated_at": "2026-11-04 11:35:06",
  "completed_at": "2026-11-04 11:35:05"
}

Response Fields

FieldTypeDescription
request_idstringUnique request identifier.
statusstringQUEUED, PROCESSING, COMPLETED or ERROR.
model_idstringThe model that handled the request.
errorstring or nullError message when status is ERROR; otherwise null.
output.media_urlarray of stringsURL of the generated video (one file per request). Download it and keep your own copy.
output.media_typestringVideo MIME type (video/mp4 for mp4).
created_atstringRequest creation timestamp.
updated_atstringLast status change timestamp.
completed_atstringCompletion timestamp.
polling_urlstringStatus URL for this request (in the submit response).

Status Values & Flow

QUEUED → PROCESSING → COMPLETED (success) or ERROR (failure). Treat any status other than QUEUED, PROCESSING or COMPLETED as a failure.

  • Save the request_id from the 202 response.
  • Poll the status endpoint every few seconds, or use a Webhook instead.
  • When status is COMPLETED, download the video from output.media_url.

P-Video 2 API Pricing — Per-Second Rates

ResolutionModePrice (USD)
720pStandard$0.0315/sec
720pDraft$0.01575/sec
1080pStandard$0.063/sec
1080pDraft$0.0315/sec
Image to Video

P-Video 2 API Documentation

Animate an image into a 1 to 20 second, 720p or 1080p video with sound: send the image as the first frame (image) and a prompt that describes the motion. Add last_frame_image for a first-to-last transition. The video takes the shape of the image, so aspect_ratio is ignored. A draft mode gives a fast, lower-cost preview. Asynchronous: submit returns a request_id; poll the status endpoint until the request is COMPLETED.

POST https://gateway.pixazo.ai/p-video-2/v1/generate

Authentication

All requests require an API key passed via header.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour API subscription key

Image to Video - P-Video 2

Request Code

POST https://gateway.pixazo.ai/p-video-2/v1/generate
Content-Type: application/json
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

{
  "prompt": "The woman brushes her hair back as a light breeze moves through it, then smiles at the camera, slow push-in",
  "image": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg",
  "duration": 5,
  "resolution": "720p"
}
import requests

url = "https://gateway.pixazo.ai/p-video-2/v1/generate"
headers = {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
  "prompt": "The woman brushes her hair back as a light breeze moves through it, then smiles at the camera, slow push-in",
  "image": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg",
  "duration": 5,
  "resolution": "720p"
}

resp = requests.post(url, json=data, headers=headers)
print(resp.json())
const res = await fetch("https://gateway.pixazo.ai/p-video-2/v1/generate", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
  },
  body: JSON.stringify({
  "prompt": "The woman brushes her hair back as a light breeze moves through it, then smiles at the camera, slow push-in",
  "image": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg",
  "duration": 5,
  "resolution": "720p"
})
});
console.log(await res.json());
curl -X POST 'https://gateway.pixazo.ai/p-video-2/v1/generate' \
  -H 'Content-Type: application/json' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
  --data-raw '{"prompt": "The woman brushes her hair back as a light breeze moves through it, then smiles at the camera, slow push-in", "image": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg", "duration": 5, "resolution": "720p"}'

Output

{
  "request_id": "p-video-2_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/p-video-2_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Webhook (Optional)

Instead of polling, you can receive a Webhook callback when the request reaches a terminal state. Provide a Webhook URL via header on the submit request.

HeaderRequiredDescription
X-Webhook-URLTo enableHTTPS URL to receive the Webhook callback.
X-Webhook-ModeNoterminal (default, one callback on COMPLETED/ERROR) or sync (per-poll callbacks).

Example: enable Webhook

curl -X POST 'https://gateway.pixazo.ai/p-video-2/v1/generate' \
  -H 'Content-Type: application/json' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
  -H 'X-Webhook-URL: https://your-server.com/webhook' \
  --data-raw '{"prompt": "The woman brushes her hair back as a light breeze moves through it, then smiles at the camera, slow push-in", "image": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg", "duration": 5, "resolution": "720p"}'

Callback Payload (success)

{
  "request_id": "p-video-2_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "p-video-2",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/p-video-2_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.mp4"
    ],
    "media_type": "video/mp4"
  },
  "created_at": "2026-11-04T11:33:20.441Z",
  "updated_at": "2026-11-04 11:35:06",
  "completed_at": "2026-11-04 11:35:05"
}

Failure callback shape

{
  "request_id": "p-video-2_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "p-video-2",
  "error": "Description of the failure",
  "output": null,
  "created_at": "2026-11-04T11:33:20.441Z",
  "updated_at": "2026-11-04 11:35:06",
  "completed_at": "2026-11-04 11:35:05"
}

Delivery semantics

  • terminal mode: one Webhook callback when the request is COMPLETED or ERROR.
  • sync mode: a Webhook callback on each status change.
  • Callbacks are idempotent on request_id — de-duplicate on it.
  • Respond 200 within a few seconds; the Webhook endpoint must be HTTPS.

Request Parameters

ParameterRequiredTypeDefaultAllowed values / range
promptYesrequiredstring—Non-empty text
What the video should show: subject, action, camera and sound.
imageNostring—Public https URL of an image (jpg, jpeg, png, webp)
First frame (image to video). The video takes the shape of this image, so aspect_ratio is ignored.
last_frame_imageNostring—Public https URL of an image (jpg, jpeg, png, webp)
Last frame. Use it with image for a first-to-last transition.
audioNostring—Public https URL of a WAV, FLAC or MP3 file, up to 20 seconds long
Audio to build the video around (for example speech or music). The video is as long as the audio, so do not send duration with it. The length must be readable from the file: an MP3 needs a length header (Xing/Info, which most encoders write).
durationNointeger51 – 20
Length of the video in whole seconds. Leave it out when you send audio.
aspect_ratioNostring16:916:9, 9:16, 4:3, 3:4, 3:2, 2:3, 1:1
Frame shape. Ignored when image is sent.
resolutionNostring720p720p, 1080p
Output resolution. 1080p is billed at a higher rate than 720p.
draftNobooleanfalsetrue, false
Draft mode: a faster, lower-quality preview, billed at a lower rate.
fpsNointeger2424, 48
Frames per second of the video.
prompt_upsamplingNobooleantruetrue, false
Rewrites your prompt into a more detailed one before generation.
save_audioNobooleantruetrue, false
Keep the generated sound track in the video.
disable_safety_filterNobooleantruetrue, false
Set false to check the inputs and the video against the provider's optional content filter.
seedNointeger—Any integer
Random seed, for reproducible results.

How usage is measured

Billed per second of output video: duration seconds (5 when omitted), at the rate of the resolution and draft setting (720p costs less than 1080p, and draft less than standard). With audio, 20 seconds are reserved from your balance when you submit, and you are charged for the seconds of video generated, as counted by the model when it finishes; the rest is released. An audio whose length cannot be read, or that is longer than 20 seconds, is rejected with 400 and nothing is charged. The rate is in the pricing panel on this page.

Parameters not supported

Some parameters are rejected outright, some values fail once the request is processed, and others are accepted and then ignored.

Rejected with 400

Checked when you submit: the request is rejected before it is queued.

ParameterWhyUse instead
model, versionThe model is fixed for this endpoint (P-Video 2) and is not caller-selectable.—
n, num_outputs, num_videos, num_images, number_of_images, batch_size, countThis API returns one video per request.One request per video
seconds, num_frames, frames_per_second, music_length_msThe length is set in whole seconds only.duration (1 – 20)
ratioNot a parameter of this endpoint.aspect_ratio
no_op, input, parametersA nested or wrapper object is not read.Every field at the top level of the body
first_frame_image, image_urlNot a parameter of this endpoint.image
end_image_urlNot a parameter of this endpoint.last_frame_image
video_url, videoThis endpoint takes no input video.—
audio_urlNot a parameter of this endpoint.audio
mode, prompt_upsampler, enable_safety_filterP-Video 2 Pro parameters.P-Video 2 Pro, or draft / prompt_upsampling / disable_safety_filter here

Accepted, then the request fails

These values pass the submit check, so the submit returns 202, but they are validated while the request is processed: the request fails, and the status endpoint (or Webhook) reports status: "ERROR" with an error message that names the problem.

ParameterWhen the request fails
image, last_frame_imageNot a public https URL.

Accepted but ignored

These are silently dropped — the request still returns 202, but the value has no effect on the generated video. Only the parameters listed in the table above are forwarded.

negative_prompt, webhook inside the body, and any parameter not listed above

Example Request

{
  "prompt": "The woman brushes her hair back as a light breeze moves through it, then smiles at the camera, slow push-in",
  "image": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg",
  "duration": 5,
  "resolution": "720p"
}

Example Response

{
  "request_id": "p-video-2_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/p-video-2_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Request Headers

HeaderRequiredDescription
Content-TypeYesapplication/json
Ocp-Apim-Subscription-KeyYesYour API subscription key.
X-Webhook-URLNoEnable Webhook callbacks (see Webhook section).

Response Handling

Status CodeMeaning
202Accepted — request queued; returns request_id and polling_url.
400Bad request — the body failed the submit check and was not queued: prompt missing or blank; an audio whose length cannot be read from the file, or longer than 20 seconds; duration sent together with audio; a duration that is not a whole number from 1 to 20; a resolution other than 720p or 1080p; an aspect_ratio outside its allowed values; an fps other than 24 or 48; a draft, prompt_upsampling, save_audio or disable_safety_filter that is not true or false; a seed that is not an integer; an image or last_frame_image or audio that is not a string; or any of model, version, n, num_outputs, num_videos, num_images, number_of_images, batch_size, count, seconds, num_frames, frames_per_second, music_length_ms, ratio, no_op, input, parameters, first_frame_image, image_url, end_image_url, video_url, video, audio_url, mode, prompt_upsampler, enable_safety_filter (see “Parameters not supported” above).
401Unauthorized — missing or invalid subscription key.
402Insufficient balance.
403Forbidden.
429Too many requests.
500Internal server error.

Problems that can only be detected while the request is processed (“Accepted, then the request fails” above) are not a 400: they are reported through the status endpoint or Webhook with status: "ERROR".

Error Responses

A 400 names every rejected parameter in violations:

{
  "error": "Invalid request parameters",
  "message": "'duration' must be <= 20 (got 30)",
  "violations": [
    "'duration' must be <= 20 (got 30)"
  ]
}

A request that fails after it was queued is reported via the status endpoint (or Webhook) with status: "ERROR" and an error message — for example when image is not a public https URL.

Retrieving Results

Poll the status endpoint with the request_id from the submit response until status is COMPLETED or ERROR, then download the video from output.media_url.

curl 'https://gateway.pixazo.ai/v2/requests/status/p-video-2_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY'

Completed response

An example of a completed request; the request id is masked.

{
  "request_id": "p-video-2_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "p-video-2",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/p-video-2_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.mp4"
    ],
    "media_type": "video/mp4"
  },
  "created_at": "2026-11-04T11:33:20.441Z",
  "updated_at": "2026-11-04 11:35:06",
  "completed_at": "2026-11-04 11:35:05"
}

Response Fields

FieldTypeDescription
request_idstringUnique request identifier.
statusstringQUEUED, PROCESSING, COMPLETED or ERROR.
model_idstringThe model that handled the request.
errorstring or nullError message when status is ERROR; otherwise null.
output.media_urlarray of stringsURL of the generated video (one file per request). Download it and keep your own copy.
output.media_typestringVideo MIME type (video/mp4 for mp4).
created_atstringRequest creation timestamp.
updated_atstringLast status change timestamp.
completed_atstringCompletion timestamp.
polling_urlstringStatus URL for this request (in the submit response).

Status Values & Flow

QUEUED → PROCESSING → COMPLETED (success) or ERROR (failure). Treat any status other than QUEUED, PROCESSING or COMPLETED as a failure.

  • Save the request_id from the 202 response.
  • Poll the status endpoint every few seconds, or use a Webhook instead.
  • When status is COMPLETED, download the video from output.media_url.

P-Video 2 API Pricing — Per-Second Rates

ResolutionModePrice (USD)
720pStandard$0.0315/sec
720pDraft$0.01575/sec
1080pStandard$0.063/sec
1080pDraft$0.0315/sec
8. P-Video 2 Pro

P-Video 2 Pro API Documentation

Generate a 5 to 15 second video with sound from a text prompt or from a first and/or last frame, at 480p up to 4K, in one of three modes: quality, speed or cost. Asynchronous: submit returns a request_id; poll the status endpoint until the request is COMPLETED.

POST https://gateway.pixazo.ai/p-video-2-pro/v1/generate

Authentication

All requests require an API key passed via header.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour API subscription key

Text to Video - P-Video 2 Pro

Request Code

POST https://gateway.pixazo.ai/p-video-2-pro/v1/generate
Content-Type: application/json
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

{
  "prompt": "A paper boat drifts across a calm pond at dusk, slow tracking shot",
  "mode": "speed",
  "resolution": "1080p",
  "duration": 5,
  "aspect_ratio": "16:9"
}
import requests

url = "https://gateway.pixazo.ai/p-video-2-pro/v1/generate"
headers = {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
  "prompt": "A paper boat drifts across a calm pond at dusk, slow tracking shot",
  "mode": "speed",
  "resolution": "1080p",
  "duration": 5,
  "aspect_ratio": "16:9"
}

resp = requests.post(url, json=data, headers=headers)
print(resp.json())
const res = await fetch("https://gateway.pixazo.ai/p-video-2-pro/v1/generate", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
  },
  body: JSON.stringify({
  "prompt": "A paper boat drifts across a calm pond at dusk, slow tracking shot",
  "mode": "speed",
  "resolution": "1080p",
  "duration": 5,
  "aspect_ratio": "16:9"
})
});
console.log(await res.json());
curl -X POST 'https://gateway.pixazo.ai/p-video-2-pro/v1/generate' \
  -H 'Content-Type: application/json' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
  --data-raw '{"prompt": "A paper boat drifts across a calm pond at dusk, slow tracking shot", "mode": "speed", "resolution": "1080p", "duration": 5, "aspect_ratio": "16:9"}'

Output

{
  "request_id": "p-video-2-pro_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/p-video-2-pro_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Webhook (Optional)

Instead of polling, you can receive a Webhook callback when the request reaches a terminal state. Provide a Webhook URL via header on the submit request.

HeaderRequiredDescription
X-Webhook-URLTo enableHTTPS URL to receive the Webhook callback.
X-Webhook-ModeNoterminal (default, one callback on COMPLETED/ERROR) or sync (per-poll callbacks).

Example: enable Webhook

curl -X POST 'https://gateway.pixazo.ai/p-video-2-pro/v1/generate' \
  -H 'Content-Type: application/json' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
  -H 'X-Webhook-URL: https://your-server.com/webhook' \
  --data-raw '{"prompt": "A paper boat drifts across a calm pond at dusk, slow tracking shot", "mode": "speed", "resolution": "1080p", "duration": 5, "aspect_ratio": "16:9"}'

Callback Payload (success)

{
  "request_id": "p-video-2-pro_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "p-video-2-pro",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/p-video-2-pro_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.mp4"
    ],
    "media_type": "video/mp4"
  },
  "created_at": "2026-11-04T11:33:20.441Z",
  "updated_at": "2026-11-04 11:35:06",
  "completed_at": "2026-11-04 11:35:05"
}

Failure callback shape

{
  "request_id": "p-video-2-pro_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "p-video-2-pro",
  "error": "Description of the failure",
  "output": null,
  "created_at": "2026-11-04T11:33:20.441Z",
  "updated_at": "2026-11-04 11:35:06",
  "completed_at": "2026-11-04 11:35:05"
}

Delivery semantics

  • terminal mode: one Webhook callback when the request is COMPLETED or ERROR.
  • sync mode: a Webhook callback on each status change.
  • Callbacks are idempotent on request_id — de-duplicate on it.
  • Respond 200 within a few seconds; the Webhook endpoint must be HTTPS.

Request Parameters

ParameterRequiredTypeDefaultAllowed values / range
promptYesrequiredstring—Non-empty text
What the video should show: subject, action, camera and sound.
modeNostringspeedquality, speed, cost
quality: the highest quality. speed: the fastest. cost: the same model on less hardware, slower and billed at the lowest rate. Each mode has its own rate.
resolutionNostring768p480p, 768p, 1080p, 2k, 4k
Output resolution. 1080p, 2k and 4k are generated at 768p and upscaled (24 fps kept). Higher resolutions are billed at higher rates.
durationNointeger55 – 15
Length of the video in whole seconds.
imageNostring—Public https URL of an image
First frame.
last_frame_imageNostring—Public https URL of an image
Last frame.
aspect_ratioNostring16:916:9, 9:16, 4:3, 3:4, 3:2, 2:3, 1:1
Frame shape. With image, the image sets the shape.
prompt_upsamplerNostringturbooff, turbo, max
Expands your prompt into a detailed brief before generation, or not at all with off.
enable_safety_filterNobooleanfalsetrue, false
Check the inputs against the content policy. When off, only the always-on categories are blocked.
seedNointeger—Any integer
Random seed, for reproducible results.

How usage is measured

Billed per second of output video: duration seconds (5 when omitted), at the rate of the mode and resolution you choose (speed at 768p when omitted). cost is the lowest rate and quality the highest; each step up in resolution costs more. The rate is in the pricing panel on this page.

Parameters not supported

Some parameters are rejected outright, some values fail once the request is processed, and others are accepted and then ignored.

Rejected with 400

Checked when you submit: the request is rejected before it is queued.

ParameterWhyUse instead
model, versionThe model is fixed for this endpoint (P-Video 2 Pro) and is not caller-selectable.—
n, num_outputs, num_videos, num_images, number_of_images, batch_size, countThis API returns one video per request.One request per video
seconds, num_frames, frames_per_second, music_length_msThe length is set in whole seconds only.duration (5 – 15)
ratioNot a parameter of this endpoint.aspect_ratio
first_frame_image, image_urlNot a parameter of this endpoint.image
end_image_urlNot a parameter of this endpoint.last_frame_image
video_url, videoThis endpoint takes no input video.—
no_op, input, parametersA nested or wrapper object is not read.Every field at the top level of the body
audio, audio_urlThis endpoint takes no audio input; the video's sound is generated.—
draft, fps, prompt_upsampling, save_audio, disable_safety_filterP-Video 2 parameters.mode / prompt_upsampler / enable_safety_filter here

Accepted, then the request fails

These values pass the submit check, so the submit returns 202, but they are validated while the request is processed: the request fails, and the status endpoint (or Webhook) reports status: "ERROR" with an error message that names the problem.

ParameterWhen the request fails
image, last_frame_imageNot a public https URL.

Accepted but ignored

These are silently dropped — the request still returns 202, but the value has no effect on the generated video. Only the parameters listed in the table above are forwarded.

negative_prompt, webhook inside the body, and any parameter not listed above

Example Request

{
  "prompt": "A paper boat drifts across a calm pond at dusk, slow tracking shot",
  "mode": "speed",
  "resolution": "1080p",
  "duration": 5,
  "aspect_ratio": "16:9"
}

Example Response

{
  "request_id": "p-video-2-pro_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/p-video-2-pro_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Request Headers

HeaderRequiredDescription
Content-TypeYesapplication/json
Ocp-Apim-Subscription-KeyYesYour API subscription key.
X-Webhook-URLNoEnable Webhook callbacks (see Webhook section).

Response Handling

Status CodeMeaning
202Accepted — request queued; returns request_id and polling_url.
400Bad request — the body failed the submit check and was not queued: prompt missing or blank; a mode other than quality, speed or cost; a resolution other than 480p, 768p, 1080p, 2k or 4k; a duration that is not a whole number from 5 to 15; an aspect_ratio outside its allowed values; a prompt_upsampler other than off, turbo or max; an enable_safety_filter that is not true or false; a seed that is not an integer; an image or last_frame_image that is not a string; or any of model, version, n, num_outputs, num_videos, num_images, number_of_images, batch_size, count, seconds, num_frames, frames_per_second, music_length_ms, ratio, first_frame_image, image_url, end_image_url, video_url, video, no_op, input, parameters, audio, audio_url, draft, fps, prompt_upsampling, save_audio, disable_safety_filter (see “Parameters not supported” above).
401Unauthorized — missing or invalid subscription key.
402Insufficient balance.
403Forbidden.
429Too many requests.
500Internal server error.

Problems that can only be detected while the request is processed (“Accepted, then the request fails” above) are not a 400: they are reported through the status endpoint or Webhook with status: "ERROR".

Error Responses

A 400 names every rejected parameter in violations:

{
  "error": "Invalid request parameters",
  "message": "'duration' must be <= 15 (got 20)",
  "violations": [
    "'duration' must be <= 15 (got 20)"
  ]
}

A request that fails after it was queued is reported via the status endpoint (or Webhook) with status: "ERROR" and an error message — for example when image is not a public https URL.

Retrieving Results

Poll the status endpoint with the request_id from the submit response until status is COMPLETED or ERROR, then download the video from output.media_url.

curl 'https://gateway.pixazo.ai/v2/requests/status/p-video-2-pro_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY'

Completed response

An example of a completed request; the request id is masked.

{
  "request_id": "p-video-2-pro_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "p-video-2-pro",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/p-video-2-pro_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.mp4"
    ],
    "media_type": "video/mp4"
  },
  "created_at": "2026-11-04T11:33:20.441Z",
  "updated_at": "2026-11-04 11:35:06",
  "completed_at": "2026-11-04 11:35:05"
}

Response Fields

FieldTypeDescription
request_idstringUnique request identifier.
statusstringQUEUED, PROCESSING, COMPLETED or ERROR.
model_idstringThe model that handled the request.
errorstring or nullError message when status is ERROR; otherwise null.
output.media_urlarray of stringsURL of the generated video (one file per request). Download it and keep your own copy.
output.media_typestringVideo MIME type (video/mp4 for mp4).
created_atstringRequest creation timestamp.
updated_atstringLast status change timestamp.
completed_atstringCompletion timestamp.
polling_urlstringStatus URL for this request (in the submit response).

Status Values & Flow

QUEUED → PROCESSING → COMPLETED (success) or ERROR (failure). Treat any status other than QUEUED, PROCESSING or COMPLETED as a failure.

  • Save the request_id from the 202 response.
  • Poll the status endpoint every few seconds, or use a Webhook instead.
  • When status is COMPLETED, download the video from output.media_url.

P-Video 2 Pro API Pricing — Per-Second Rates

ResolutionVersionPrice (USD)
480pCost mode$0.0105/sec
768pCost mode$0.02625/sec
1080pCost mode$0.04725/sec
2kCost mode$0.06825/sec
4kCost mode$0.11025/sec
480pSpeed mode$0.021/sec
768pSpeed mode$0.03675/sec
1080pSpeed mode$0.05775/sec
2kSpeed mode$0.07875/sec
4kSpeed mode$0.12075/sec
480pQuality mode$0.042/sec
768pQuality mode$0.07875/sec
1080pQuality mode$0.09975/sec
2kQuality mode$0.12075/sec
4kQuality mode$0.16275/sec
Image to Video

P-Video 2 Pro API Documentation

Animate an image into a 5 to 15 second video with sound: send the image as the first frame (image) and a prompt that describes the motion, optionally ending on a last_frame_image. The image sets the frame shape. Output is 480p up to 4K, in one of three modes: quality, speed or cost. Asynchronous: submit returns a request_id; poll the status endpoint until the request is COMPLETED.

POST https://gateway.pixazo.ai/p-video-2-pro/v1/generate

Authentication

All requests require an API key passed via header.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour API subscription key

Image to Video - P-Video 2 Pro

Request Code

POST https://gateway.pixazo.ai/p-video-2-pro/v1/generate
Content-Type: application/json
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

{
  "prompt": "The woman brushes her hair back as a light breeze moves through it, then smiles at the camera, slow push-in",
  "image": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg",
  "mode": "speed",
  "resolution": "1080p",
  "duration": 5
}
import requests

url = "https://gateway.pixazo.ai/p-video-2-pro/v1/generate"
headers = {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
  "prompt": "The woman brushes her hair back as a light breeze moves through it, then smiles at the camera, slow push-in",
  "image": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg",
  "mode": "speed",
  "resolution": "1080p",
  "duration": 5
}

resp = requests.post(url, json=data, headers=headers)
print(resp.json())
const res = await fetch("https://gateway.pixazo.ai/p-video-2-pro/v1/generate", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
  },
  body: JSON.stringify({
  "prompt": "The woman brushes her hair back as a light breeze moves through it, then smiles at the camera, slow push-in",
  "image": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg",
  "mode": "speed",
  "resolution": "1080p",
  "duration": 5
})
});
console.log(await res.json());
curl -X POST 'https://gateway.pixazo.ai/p-video-2-pro/v1/generate' \
  -H 'Content-Type: application/json' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
  --data-raw '{"prompt": "The woman brushes her hair back as a light breeze moves through it, then smiles at the camera, slow push-in", "image": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg", "mode": "speed", "resolution": "1080p", "duration": 5}'

Output

{
  "request_id": "p-video-2-pro_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/p-video-2-pro_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Webhook (Optional)

Instead of polling, you can receive a Webhook callback when the request reaches a terminal state. Provide a Webhook URL via header on the submit request.

HeaderRequiredDescription
X-Webhook-URLTo enableHTTPS URL to receive the Webhook callback.
X-Webhook-ModeNoterminal (default, one callback on COMPLETED/ERROR) or sync (per-poll callbacks).

Example: enable Webhook

curl -X POST 'https://gateway.pixazo.ai/p-video-2-pro/v1/generate' \
  -H 'Content-Type: application/json' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
  -H 'X-Webhook-URL: https://your-server.com/webhook' \
  --data-raw '{"prompt": "The woman brushes her hair back as a light breeze moves through it, then smiles at the camera, slow push-in", "image": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg", "mode": "speed", "resolution": "1080p", "duration": 5}'

Callback Payload (success)

{
  "request_id": "p-video-2-pro_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "p-video-2-pro",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/p-video-2-pro_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.mp4"
    ],
    "media_type": "video/mp4"
  },
  "created_at": "2026-11-04T11:33:20.441Z",
  "updated_at": "2026-11-04 11:35:06",
  "completed_at": "2026-11-04 11:35:05"
}

Failure callback shape

{
  "request_id": "p-video-2-pro_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "p-video-2-pro",
  "error": "Description of the failure",
  "output": null,
  "created_at": "2026-11-04T11:33:20.441Z",
  "updated_at": "2026-11-04 11:35:06",
  "completed_at": "2026-11-04 11:35:05"
}

Delivery semantics

  • terminal mode: one Webhook callback when the request is COMPLETED or ERROR.
  • sync mode: a Webhook callback on each status change.
  • Callbacks are idempotent on request_id — de-duplicate on it.
  • Respond 200 within a few seconds; the Webhook endpoint must be HTTPS.

Request Parameters

ParameterRequiredTypeDefaultAllowed values / range
promptYesrequiredstring—Non-empty text
What the video should show: subject, action, camera and sound.
modeNostringspeedquality, speed, cost
quality: the highest quality. speed: the fastest. cost: the same model on less hardware, slower and billed at the lowest rate. Each mode has its own rate.
resolutionNostring768p480p, 768p, 1080p, 2k, 4k
Output resolution. 1080p, 2k and 4k are generated at 768p and upscaled (24 fps kept). Higher resolutions are billed at higher rates.
durationNointeger55 – 15
Length of the video in whole seconds.
imageNostring—Public https URL of an image
First frame.
last_frame_imageNostring—Public https URL of an image
Last frame.
aspect_ratioNostring16:916:9, 9:16, 4:3, 3:4, 3:2, 2:3, 1:1
Frame shape. With image, the image sets the shape.
prompt_upsamplerNostringturbooff, turbo, max
Expands your prompt into a detailed brief before generation, or not at all with off.
enable_safety_filterNobooleanfalsetrue, false
Check the inputs against the content policy. When off, only the always-on categories are blocked.
seedNointeger—Any integer
Random seed, for reproducible results.

How usage is measured

Billed per second of output video: duration seconds (5 when omitted), at the rate of the mode and resolution you choose (speed at 768p when omitted). cost is the lowest rate and quality the highest; each step up in resolution costs more. The rate is in the pricing panel on this page.

Parameters not supported

Some parameters are rejected outright, some values fail once the request is processed, and others are accepted and then ignored.

Rejected with 400

Checked when you submit: the request is rejected before it is queued.

ParameterWhyUse instead
model, versionThe model is fixed for this endpoint (P-Video 2 Pro) and is not caller-selectable.—
n, num_outputs, num_videos, num_images, number_of_images, batch_size, countThis API returns one video per request.One request per video
seconds, num_frames, frames_per_second, music_length_msThe length is set in whole seconds only.duration (5 – 15)
ratioNot a parameter of this endpoint.aspect_ratio
first_frame_image, image_urlNot a parameter of this endpoint.image
end_image_urlNot a parameter of this endpoint.last_frame_image
video_url, videoThis endpoint takes no input video.—
no_op, input, parametersA nested or wrapper object is not read.Every field at the top level of the body
audio, audio_urlThis endpoint takes no audio input; the video's sound is generated.—
draft, fps, prompt_upsampling, save_audio, disable_safety_filterP-Video 2 parameters.mode / prompt_upsampler / enable_safety_filter here

Accepted, then the request fails

These values pass the submit check, so the submit returns 202, but they are validated while the request is processed: the request fails, and the status endpoint (or Webhook) reports status: "ERROR" with an error message that names the problem.

ParameterWhen the request fails
image, last_frame_imageNot a public https URL.

Accepted but ignored

These are silently dropped — the request still returns 202, but the value has no effect on the generated video. Only the parameters listed in the table above are forwarded.

negative_prompt, webhook inside the body, and any parameter not listed above

Example Request

{
  "prompt": "The woman brushes her hair back as a light breeze moves through it, then smiles at the camera, slow push-in",
  "image": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg",
  "mode": "speed",
  "resolution": "1080p",
  "duration": 5
}

Example Response

{
  "request_id": "p-video-2-pro_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/p-video-2-pro_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Request Headers

HeaderRequiredDescription
Content-TypeYesapplication/json
Ocp-Apim-Subscription-KeyYesYour API subscription key.
X-Webhook-URLNoEnable Webhook callbacks (see Webhook section).

Response Handling

Status CodeMeaning
202Accepted — request queued; returns request_id and polling_url.
400Bad request — the body failed the submit check and was not queued: prompt missing or blank; a mode other than quality, speed or cost; a resolution other than 480p, 768p, 1080p, 2k or 4k; a duration that is not a whole number from 5 to 15; an aspect_ratio outside its allowed values; a prompt_upsampler other than off, turbo or max; an enable_safety_filter that is not true or false; a seed that is not an integer; an image or last_frame_image that is not a string; or any of model, version, n, num_outputs, num_videos, num_images, number_of_images, batch_size, count, seconds, num_frames, frames_per_second, music_length_ms, ratio, first_frame_image, image_url, end_image_url, video_url, video, no_op, input, parameters, audio, audio_url, draft, fps, prompt_upsampling, save_audio, disable_safety_filter (see “Parameters not supported” above).
401Unauthorized — missing or invalid subscription key.
402Insufficient balance.
403Forbidden.
429Too many requests.
500Internal server error.

Problems that can only be detected while the request is processed (“Accepted, then the request fails” above) are not a 400: they are reported through the status endpoint or Webhook with status: "ERROR".

Error Responses

A 400 names every rejected parameter in violations:

{
  "error": "Invalid request parameters",
  "message": "'duration' must be <= 15 (got 20)",
  "violations": [
    "'duration' must be <= 15 (got 20)"
  ]
}

A request that fails after it was queued is reported via the status endpoint (or Webhook) with status: "ERROR" and an error message — for example when image is not a public https URL.

Retrieving Results

Poll the status endpoint with the request_id from the submit response until status is COMPLETED or ERROR, then download the video from output.media_url.

curl 'https://gateway.pixazo.ai/v2/requests/status/p-video-2-pro_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY'

Completed response

An example of a completed request; the request id is masked.

{
  "request_id": "p-video-2-pro_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "p-video-2-pro",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/p-video-2-pro_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.mp4"
    ],
    "media_type": "video/mp4"
  },
  "created_at": "2026-11-04T11:33:20.441Z",
  "updated_at": "2026-11-04 11:35:06",
  "completed_at": "2026-11-04 11:35:05"
}

Response Fields

FieldTypeDescription
request_idstringUnique request identifier.
statusstringQUEUED, PROCESSING, COMPLETED or ERROR.
model_idstringThe model that handled the request.
errorstring or nullError message when status is ERROR; otherwise null.
output.media_urlarray of stringsURL of the generated video (one file per request). Download it and keep your own copy.
output.media_typestringVideo MIME type (video/mp4 for mp4).
created_atstringRequest creation timestamp.
updated_atstringLast status change timestamp.
completed_atstringCompletion timestamp.
polling_urlstringStatus URL for this request (in the submit response).

Status Values & Flow

QUEUED → PROCESSING → COMPLETED (success) or ERROR (failure). Treat any status other than QUEUED, PROCESSING or COMPLETED as a failure.

  • Save the request_id from the 202 response.
  • Poll the status endpoint every few seconds, or use a Webhook instead.
  • When status is COMPLETED, download the video from output.media_url.

P-Video 2 Pro API Pricing — Per-Second Rates

ResolutionVersionPrice (USD)
480pCost mode$0.0105/sec
768pCost mode$0.02625/sec
1080pCost mode$0.04725/sec
2kCost mode$0.06825/sec
4kCost mode$0.11025/sec
480pSpeed mode$0.021/sec
768pSpeed mode$0.03675/sec
1080pSpeed mode$0.05775/sec
2kSpeed mode$0.07875/sec
4kSpeed mode$0.12075/sec
480pQuality mode$0.042/sec
768pQuality mode$0.07875/sec
1080pQuality mode$0.09975/sec
2kQuality mode$0.12075/sec
4kQuality mode$0.16275/sec
Reference to Video (Ref Images + Ref Videos to Video)

P-Video 2 Pro API Documentation

Generate a 5 to 15 second video with sound that follows your reference images, videos and audio: up to 9 images, 3 videos and 3 audio files, plus an optional first and last frame, at 480p up to 4K, in speed or cost mode. Asynchronous: submit returns a request_id; poll the status endpoint until the request is COMPLETED.

POST https://gateway.pixazo.ai/p-video-2-pro-reference/v1/generate

Authentication

All requests require an API key passed via header.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour API subscription key

Reference to Video - P-Video 2 Pro Reference

Request Code

POST https://gateway.pixazo.ai/p-video-2-pro-reference/v1/generate
Content-Type: application/json
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

{
  "prompt": "A paper boat drifts across a calm pond at dusk, slow tracking shot",
  "image": [
    "https://example.com/paper-boat.jpg"
  ],
  "mode": "speed",
  "resolution": "768p",
  "duration": 5
}
import requests

url = "https://gateway.pixazo.ai/p-video-2-pro-reference/v1/generate"
headers = {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
  "prompt": "A paper boat drifts across a calm pond at dusk, slow tracking shot",
  "image": [
    "https://example.com/paper-boat.jpg"
  ],
  "mode": "speed",
  "resolution": "768p",
  "duration": 5
}

resp = requests.post(url, json=data, headers=headers)
print(resp.json())
const res = await fetch("https://gateway.pixazo.ai/p-video-2-pro-reference/v1/generate", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
  },
  body: JSON.stringify({
  "prompt": "A paper boat drifts across a calm pond at dusk, slow tracking shot",
  "image": [
    "https://example.com/paper-boat.jpg"
  ],
  "mode": "speed",
  "resolution": "768p",
  "duration": 5
})
});
console.log(await res.json());
curl -X POST 'https://gateway.pixazo.ai/p-video-2-pro-reference/v1/generate' \
  -H 'Content-Type: application/json' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
  --data-raw '{"prompt": "A paper boat drifts across a calm pond at dusk, slow tracking shot", "image": ["https://example.com/paper-boat.jpg"], "mode": "speed", "resolution": "768p", "duration": 5}'

Output

{
  "request_id": "p-video-2-pro-reference_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/p-video-2-pro-reference_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Webhook (Optional)

Instead of polling, you can receive a Webhook callback when the request reaches a terminal state. Provide a Webhook URL via header on the submit request.

HeaderRequiredDescription
X-Webhook-URLTo enableHTTPS URL to receive the Webhook callback.
X-Webhook-ModeNoterminal (default, one callback on COMPLETED/ERROR) or sync (per-poll callbacks).

Example: enable Webhook

curl -X POST 'https://gateway.pixazo.ai/p-video-2-pro-reference/v1/generate' \
  -H 'Content-Type: application/json' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
  -H 'X-Webhook-URL: https://your-server.com/webhook' \
  --data-raw '{"prompt": "A paper boat drifts across a calm pond at dusk, slow tracking shot", "image": ["https://example.com/paper-boat.jpg"], "mode": "speed", "resolution": "768p", "duration": 5}'

Callback Payload (success)

{
  "request_id": "p-video-2-pro-reference_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "p-video-2-pro-reference",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/p-video-2-pro-reference_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.mp4"
    ],
    "media_type": "video/mp4"
  },
  "created_at": "2026-11-04T11:33:20.441Z",
  "updated_at": "2026-11-04 11:35:06",
  "completed_at": "2026-11-04 11:35:05"
}

Failure callback shape

{
  "request_id": "p-video-2-pro-reference_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "p-video-2-pro-reference",
  "error": "Description of the failure",
  "output": null,
  "created_at": "2026-11-04T11:33:20.441Z",
  "updated_at": "2026-11-04 11:35:06",
  "completed_at": "2026-11-04 11:35:05"
}

Delivery semantics

  • terminal mode: one Webhook callback when the request is COMPLETED or ERROR.
  • sync mode: a Webhook callback on each status change.
  • Callbacks are idempotent on request_id — de-duplicate on it.
  • Respond 200 within a few seconds; the Webhook endpoint must be HTTPS.

Request Parameters

ParameterRequiredTypeDefaultAllowed values / range
promptYesrequiredstring—Non-empty text
What the video should show. Refer to the references by what they show (the boat, the voice, the camera move).
imageYes, unless video is sentarray of strings—Up to 9 public https URLs of images (20 MB each, at most 4096 px on each side); 9 in all with first_frame_image and last_frame_image
Reference images: characters, objects, places or style to carry into the video.
videoYes, unless image is sentarray of strings—Up to 3 public https URLs of MP4 or MOV videos (up to 1080p and 60 fps, 100 MB each, not fragmented / streaming MP4), each 2 – 15 seconds, 15 seconds in all
Reference videos: motion, camera work or a scene to follow.
audioNoarray of strings—Up to 3 public https URLs of WAV, FLAC or MP3 files, 15 seconds in all
Reference audio: a voice, music or sound to follow. The length must be readable from the file: an MP3 needs a length header (Xing/Info, which most encoders write).
keep_audioNobooleanfalsetrue, false
Use your one audio file as the video's sound track (send exactly one). A shorter audio plays from the start; a longer one is cut; an audio within 1 second of duration sets the video's length.
first_frame_imageNostring—Public https URL of an image
First frame of the video.
last_frame_imageNostring—Public https URL of an image
Last frame of the video.
modeNostringspeedspeed, cost
speed: the fastest. cost: the same model on less hardware, slower and billed at a lower rate. Each mode has its own rates.
resolutionNostring768p480p, 768p, 1080p, 2k, 4k
Output resolution. 1080p, 2k and 4k are generated at 768p and upscaled. Higher resolutions are billed at higher rates.
durationNointeger55 – 15
Length of the video in whole seconds.
aspect_ratioNostring16:9adaptive, 16:9, 9:16, 4:3, 3:4, 3:2, 2:3, 1:1
Frame shape. adaptive follows the shape of your references.
prompt_upsamplerNostringturbooff, turbo, max
Expands your prompt into a detailed brief that looks at your references first, or not at all with off. With first_frame_image or last_frame_image, off runs as turbo.
enable_safety_filterNobooleanfalsetrue, false
Check the inputs against the content policy. When off, only the always-on categories are blocked.
seedNointeger—Any integer
Random seed, for reproducible results.

How usage is measured

Billed in four parts, all measured when you submit, at the rates of the mode and resolution you choose (speed at 768p when omitted): (1) seconds of output video, duration (5 when omitted; with keep_audio, an audio within 1 second of duration that is longer sets it, rounded up to whole seconds); (2) seconds of reference video, all video files together; (3) the number of reference images: each entry of image, plus first_frame_image and last_frame_image when sent; (4) seconds of reference audio, all audio files together. Seconds of reference video and audio are rounded up to 0.01. A reference video or audio whose length cannot be read, or that is outside the limits above, is rejected with 400 and nothing is charged. The rates are in the pricing panel on this page.

Parameters not supported

Some parameters are rejected outright, some values fail once the request is processed, and others are accepted and then ignored.

Rejected with 400

Checked when you submit: the request is rejected before it is queued.

ParameterWhyUse instead
model, versionThe model is fixed for this endpoint (P-Video 2 Pro Reference) and is not caller-selectable.—
n, num_outputs, num_videos, num_images, number_of_images, batch_size, countThis API returns one video per request.One request per video
seconds, num_frames, frames_per_second, music_length_msThe length is set in whole seconds only.duration (5 – 15)
ratioNot a parameter of this endpoint.aspect_ratio
no_op, input, parametersA nested or wrapper object is not read.Every field at the top level of the body
image_url, image_urls, reference_image_urlsNot a parameter of this endpoint.image (a list)
end_image_urlNot a parameter of this endpoint.last_frame_image
video_url, video_urls, reference_video_urlsNot a parameter of this endpoint.video (a list)
audio_url, reference_audio_urlsNot a parameter of this endpoint.audio (a list)
draft, fps, prompt_upsampling, save_audio, disable_safety_filterP-Video 2 parameters.mode / prompt_upsampler / enable_safety_filter here

Accepted, then the request fails

These values pass the submit check, so the submit returns 202, but they are validated while the request is processed: the request fails, and the status endpoint (or Webhook) reports status: "ERROR" with an error message that names the problem.

ParameterWhen the request fails
image, video, audio entries, first_frame_image, last_frame_imageA file that cannot be used (for example a video over 1080p or 60 fps, or an image over 4096 px or 20 MB).

Accepted but ignored

These are silently dropped — the request still returns 202, but the value has no effect on the generated video. Only the parameters listed in the table above are forwarded.

negative_prompt, webhook inside the body, and any parameter not listed above

Example Request

{
  "prompt": "A paper boat drifts across a calm pond at dusk, slow tracking shot",
  "image": [
    "https://example.com/paper-boat.jpg"
  ],
  "mode": "speed",
  "resolution": "768p",
  "duration": 5
}

Example Response

{
  "request_id": "p-video-2-pro-reference_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/p-video-2-pro-reference_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Request Headers

HeaderRequiredDescription
Content-TypeYesapplication/json
Ocp-Apim-Subscription-KeyYesYour API subscription key.
X-Webhook-URLNoEnable Webhook callbacks (see Webhook section).

Response Handling

Status CodeMeaning
202Accepted — request queued; returns request_id and polling_url.
400Bad request — the body failed the submit check and was not queued: prompt missing or blank; neither image nor video sent; image, video or audio not a list of public https URLs, or with more entries than allowed; more than 9 images in all; a reference video or audio whose length cannot be read, a fragmented (streaming) MP4 video, a video shorter than 2 or longer than 15 seconds, or videos or audio over 15 seconds in all; keep_audio without exactly one audio; a mode other than speed or cost; a resolution other than 480p, 768p, 1080p, 2k or 4k; a duration that is not a whole number from 5 to 15; an aspect_ratio outside its allowed values; a prompt_upsampler other than off, turbo or max; a keep_audio or enable_safety_filter that is not true or false; a seed that is not an integer; or any of model, version, n, num_outputs, num_videos, num_images, number_of_images, batch_size, count, seconds, num_frames, frames_per_second, music_length_ms, ratio, no_op, input, parameters, image_url, image_urls, reference_image_urls, end_image_url, video_url, video_urls, reference_video_urls, audio_url, reference_audio_urls, draft, fps, prompt_upsampling, save_audio, disable_safety_filter (see “Parameters not supported” above).
401Unauthorized — missing or invalid subscription key.
402Insufficient balance.
403Forbidden.
429Too many requests.
500Internal server error.

Problems that can only be detected while the request is processed (“Accepted, then the request fails” above) are not a 400: they are reported through the status endpoint or Webhook with status: "ERROR".

Error Responses

A 400 names every rejected parameter in violations:

{
  "error": "Invalid request parameters",
  "message": "'duration' must be <= 15 (got 20)",
  "violations": [
    "'duration' must be <= 15 (got 20)"
  ]
}

A request that fails after it was queued is reported via the status endpoint (or Webhook) with status: "ERROR" and an error message — for example when a reference video is over 1080p.

Retrieving Results

Poll the status endpoint with the request_id from the submit response until status is COMPLETED or ERROR, then download the video from output.media_url.

curl 'https://gateway.pixazo.ai/v2/requests/status/p-video-2-pro-reference_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY'

Completed response

An example of a completed request; the request id is masked.

{
  "request_id": "p-video-2-pro-reference_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "p-video-2-pro-reference",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/p-video-2-pro-reference_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.mp4"
    ],
    "media_type": "video/mp4"
  },
  "created_at": "2026-11-04T11:33:20.441Z",
  "updated_at": "2026-11-04 11:35:06",
  "completed_at": "2026-11-04 11:35:05"
}

Response Fields

FieldTypeDescription
request_idstringUnique request identifier.
statusstringQUEUED, PROCESSING, COMPLETED or ERROR.
model_idstringThe model that handled the request.
errorstring or nullError message when status is ERROR; otherwise null.
output.media_urlarray of stringsURL of the generated video (one file per request). Download it and keep your own copy.
output.media_typestringVideo MIME type (video/mp4 for mp4).
created_atstringRequest creation timestamp.
updated_atstringLast status change timestamp.
completed_atstringCompletion timestamp.
polling_urlstringStatus URL for this request (in the submit response).

Status Values & Flow

QUEUED → PROCESSING → COMPLETED (success) or ERROR (failure). Treat any status other than QUEUED, PROCESSING or COMPLETED as a failure.

  • Save the request_id from the 202 response.
  • Poll the status endpoint every few seconds, or use a Webhook instead.
  • When status is COMPLETED, download the video from output.media_url.

P-Video 2 Pro API Pricing

ResolutionVersionPrice (USD)
480pCost mode$0.015
768pCost mode$0.025
1080pCost mode$0.045
2kCost mode$0.065
4kCost mode$0.105
480pSpeed mode$0.02
768pSpeed mode$0.035
1080pSpeed mode$0.055
2kSpeed mode$0.075
4kSpeed mode$0.115
Per second of reference video (480p output)Cost mode$0.03
Per second of reference video (768p and above)Cost mode$0.06
Per reference imageCost mode$0.005
Per second of reference audioCost mode$0.0015
Per second of reference video (480p output)Speed mode$0.04
Per second of reference video (768p and above)Speed mode$0.06
Per reference imageSpeed mode$0.01
Per second of reference audioSpeed mode$0.0025
9. P Video Avatar

P Video Avatar API Documentation

https://gateway.pixazo.ai/p-video-avatar/v1/p-video-avatar/generate

Authentication

All requests require an API key passed via header.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour API subscription key

P Video Avatar Generation Request - P Video Avatar API

Request Code

POST https://gateway.pixazo.ai/p-video-avatar/v1/p-video-avatar/generate HTTP/1.1
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

{
  "image": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/input_model.png",
  "voice": "Charon (Male)",
  "voice_language": "English (US)",
  "voice_script": "p-video is the fastest video model on earth!",
  "voice_prompt": "Say the following with a warm, confident tone.",
  "video_prompt": "A studio-lit talking head, soft key light, subtle camera movement.",
  "resolution": "1080p",
  "seed": 42
}
import requests

url = "https://gateway.pixazo.ai/p-video-avatar/v1/p-video-avatar/generate"
headers = {
    "Content-Type": "application/json",
    "Cache-Control": "no-cache",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
    "image": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/input_model.png",
    "voice": "Charon (Male)",
    "voice_language": "English (US)",
    "voice_script": "p-video is the fastest video model on earth!",
    "voice_prompt": "Say the following with a warm, confident tone.",
    "video_prompt": "A studio-lit talking head, soft key light, subtle camera movement.",
    "resolution": "1080p",
    "seed": 42
}

response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = 'https://gateway.pixazo.ai/p-video-avatar/v1/p-video-avatar/generate';
const headers = {
  'Content-Type': 'application/json',
  'Cache-Control': 'no-cache',
  'Ocp-Apim-Subscription-Key': 'YOUR_SUBSCRIPTION_KEY'
};
const data = {
  image: 'https://pub-582b7213209642b9b995c96c95a30381.r2.dev/input_model.png',
  voice: 'Charon (Male)',
  voice_language: 'English (US)',
  voice_script: 'p-video is the fastest video model on earth!',
  voice_prompt: 'Say the following with a warm, confident tone.',
  video_prompt: 'A studio-lit talking head, soft key light, subtle camera movement.',
  resolution: '1080p',
  seed: 42
};

fetch(url, {
  method: 'POST',
  headers: headers,
  body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
curl -X POST "https://gateway.pixazo.ai/p-video-avatar/v1/p-video-avatar/generate" \
  -H "Content-Type: application/json" \
  -H "Cache-Control: no-cache" \
  -H "Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY" \
  --data-raw '{
    "image": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/input_model.png",
    "voice": "Charon (Male)",
    "voice_language": "English (US)",
    "voice_script": "p-video is the fastest video model on earth!",
    "voice_prompt": "Say the following with a warm, confident tone.",
    "video_prompt": "A studio-lit talking head, soft key light, subtle camera movement.",
    "resolution": "1080p",
    "seed": 42
  }'

Output

{
  "request_id": "p-video-avatar_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/p-video-avatar_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Webhook (Optional)

Add the X-Webhook-URL header to your submit request to receive a POST callback when the job completes — no polling required.

Using curl? These are HTTP request headers — pass each with -H, e.g. -H "X-Webhook-URL: https://your-server.com/webhook/callback". Do not paste them as bare lines, and end every line of a multi-line command with \.

Webhook Headers

HeaderRequiredDefaultDescription
X-Webhook-URLYes (to enable)—HTTPS endpoint on your server that will receive the POST callback. Must respond 2xx within a few seconds (process async if needed).
X-Webhook-ModeNoterminalterminal — fires once at the final status (COMPLETED/FAILED/ERROR). sync — fires on every poll cycle plus the terminal event, and caps the queue’s polling delay at 15s for tighter progress updates.

Example: enable webhook

X-Webhook-URL: https://your-server.com/webhook/callback
X-Webhook-Mode: terminal

Callback Payload

Your endpoint receives a POST application/json with the same shape as the GET /v2/requests/status/{request_id} response. Example terminal callback (mode terminal):

{
  "request_id": "p-video-avatar_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "p-video-avatar",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/p-video-avatar_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.mp4"
    ],
    "media_type": "video/mp4"
  },
  "created_at": "2026-05-22T13:17:32.110Z",
  "updated_at": "2026-05-22 13:19:23",
  "completed_at": "2026-05-22 13:19:23"
}

Failure callback shape

{
  "request_id": "p-video-avatar_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "p-video-avatar",
  "error": "Description of the error",
  "output": null,
  "created_at": "...",
  "updated_at": "...",
  "completed_at": "..."
}

Delivery semantics

  • terminal mode (default) — exactly one POST when the request reaches a terminal status. No callback during PROCESSING.
  • sync mode — POST on every status poll (with delay capped at ~15s) plus a final POST at terminal status. Use when you want progress updates.
  • Idempotency — use request_id as your idempotency key. Network retries can deliver the same callback more than once; your handler must tolerate duplicates.
  • Response — respond 200 OK within a few seconds. The queue does not block on slow handlers, but persistent failures may stop further deliveries.
  • HTTPS required — plain http:// URLs are rejected.

Request Parameters - P Video Avatar Generation

ParameterRequiredTypeDefaultAllowed values / range
imageYesrequiredstring (URL)—jpg, jpeg, png, webp
Publicly reachable URL of the portrait image used as the first frame of the video.
audioConditionalstring (URL)——
URL of an audio track the avatar lip-syncs to. Provide either audio or voice_script. If both are sent, audio wins and voice_script is ignored. The generated video length matches this audio.
voiceNostring"Zephyr (Female)"
Show all
All 30 voices — Female (14): Zephyr (Female), Kore (Female), Leda (Female), Aoede (Female), Callirrhoe (Female), Autonoe (Female), Despina (Female), Erinome (Female), Laomedeia (Female), Achernar (Female), Gacrux (Female), Pulcherrima (Female), Vindemiatrix (Female), Sulafat (Female). Male (16): Puck (Male), Charon (Male), Fenrir (Male), Orus (Male), Enceladus (Male), Iapetus (Male), Umbriel (Male), Algenib (Male), Algieba (Male), Schedar (Male), Achird (Male), Zubenelgenubi (Male), Sadachbia (Male), Sadaltager (Male), Alnilam (Male), Rasalgethi (Male).
Named voice used to synthesize speech from voice_script. Ignored when audio is provided.
voice_languageNostring"English (US)"English (US), English (UK), Spanish, French, German, Italian, Portuguese (Brazil), Japanese, Korean, Hindi
Language of the synthesized speech. Pair it with a voice that suits the persona. Ignored when audio is provided.
voice_scriptConditionalstring""—
The script the avatar speaks, written in the target language. Required unless audio is provided. The video length is set by how long this speech is.
voice_promptNostring"Say the following."—
Delivery-style guidance for the speech (tone, pacing, emotion). Describe how the line is said, not what is said.
video_promptNostring"The person is talking."—
Visual guidance for body movement, framing and background behaviour. Avoid restating the script here.
negative_promptNostring""—
Things you do NOT want in the video, e.g. subtitles, text, blurry, low quality, watermark. Disabled when left empty.
strength_negative_promptNonumber0.50 – 4
How strongly the negative_prompt is applied. The optimal value can vary with the video length (experimental feature).
resolutionNostring"720p"720p, 1080p
Output video resolution. Iterate at 720p, then re-run final assets at 1080p.
seedNointegerrandom—
Random seed that controls the generation's randomness. Reuse the same seed with identical settings to reproduce a result; omit it for a different output each time.
disable_safety_filterNobooleantruetrue, false
When true (the default), the safety checks on the prompts and input image are skipped. Set it to false to enforce them.
disable_prompt_upsamplingNobooleanfalsetrue, false
When true, your prompts are sent to the model exactly as written and the automatic prompt-enhancement step is skipped.
no_opNobooleanfalsetrue, false
Health-check mode — validates the request and returns a status without running inference, so no video is produced.
webhookNostring (URL)—HTTPS URL
Gateway will POST the final result to this URL when the request reaches a terminal state.
webhook_events_filterNostring[]—completed, failed, canceled
Restricts which events trigger the webhook. Defaults to all terminal events.

Content Item Types & Limits

TypeMaxFormat / SizeDescription
image1JPG, PNG, WEBPAvatar image.
audio1MP3, WAVVoice / audio track.

Example Request

{
  "image": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/input_model.png",
  "audio": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/abhinav_YF5ZZmi6.mp3",
  "voice": "Charon (Male)",
  "voice_language": "English (US)",
  "voice_script": "p-video is the fastest video model on earth!",
  "voice_prompt": "Say the following with a warm, confident tone.",
  "video_prompt": "A studio-lit talking head, soft key light, subtle camera movement.",
  "resolution": "1080p",
  "seed": 42,
  "disable_safety_filter": true,
  "disable_prompt_upsampling": false,
  "no_op": false,
  "webhook": "https://your-server.com/webhooks/p-video-avatar",
  "webhook_events_filter": ["completed", "failed"]
}

Response

{
  "request_id": "p-video-avatar_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/p-video-avatar_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Request Headers

Header Value
Content-Typeapplication/json
Cache-Controlno-cache
Ocp-Apim-Subscription-KeyYOUR_SUBSCRIPTION_KEY

Response Handling

Common status codes.

CodeMeaning
202Accepted — Request queued
Bad Request
401Unauthorized
402Insufficient Balance
403Forbidden
Too Many Requests
500Internal Server Error

Error Responses

Queue system errors, model validation errors, and the shape returned via status/webhook.

Queue System Errors

// 402 — Insufficient balance
{
  "error": "Insufficient Balance",
  "message": "Your wallet does not have enough balance. Required: $0.01"
}
// 400 — Model not found
{
  "error": "Model not found",
  "message": "Model 'p-video-avatar' not found or is disabled"
}

Model Validation Errors (400)

// Missing or invalid fields — examples
{ "error": "image is required and must be a string URL" }
{ "error": "image must be a valid URL" }
{ "error": "voice must be one of: Zephyr (Female), Kore (Female), ... Rasalgethi (Male)" }
{ "error": "voice_language must be one of: English (US), English (UK), ..., Hindi" }
{ "error": "resolution must be one of: 720p, 1080p" }
{ "error": "seed must be a non-negative integer" }
{ "error": "voice_script must be a string" }
{ "error": "disable_safety_filter must be a boolean" }
{ "error": "Invalid webhook URL" }

Error via Status/Webhook

{
  "request_id": "p-video-avatar_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "p-video-avatar",
  "error": "Description of the error",
  "output": null
}

Retrieving Results

Poll the universal status endpoint to check progress and retrieve results.

Endpoint

GET https://gateway.pixazo.ai/v2/requests/status/{request_id}
Ocp-Apim-Subscription-Key: YOUR_API_KEY

cURL Example

curl -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
  "https://gateway.pixazo.ai/v2/requests/status/p-video-avatar_019d42ce-ae71-7999-24c9-5d76447ecafb4"

Response (Completed)

{
  "request_id": "p-video-avatar_019d42ce-ae71-7999-24c9-5d76447ecafb4",
  "status": "COMPLETED",
  "model_id": "p-video-avatar",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/p-video-avatar_019d42ce-ae71-7999-24c9-5d76447ecafb4/output.mp4"
    ],
    "media_type": "video/mp4"
  },
  "created_at": "2026-05-01T07:13:45.138Z",
  "updated_at": "2026-05-01T07:14:32.000Z",
  "completed_at": "2026-05-01T07:14:32.000Z"
}

Response Fields

FieldTypeDescription
request_idstringUnique request identifier
statusstringQUEUED, PROCESSING, COMPLETED, FAILED, or ERROR
model_idstringModel that processed the request
errorstring|nullError message if failed
output.media_urlarrayURLs to generated media (R2 CDN)
output.media_typestringMIME type (video/mp4)
created_atstringWhen request was created
completed_atstring|nullWhen request completed
polling_urlstringStatus URL (initial response only)

Status Values

StatusDescription
QUEUEDRequest accepted, waiting to be processed
PROCESSINGBeing processed by the model
COMPLETEDDone — output contains the result
FAILEDFailed — check error field
ERRORSystem error — not charged

Status Flow

QUEUED → PROCESSING → COMPLETED
                    → FAILED
                    → ERROR

Typical Workflow

  1. Send a generate request to the API endpoint
  2. Save the request_id from the response
  3. Poll every 5-10 seconds: GET /v2/requests/status/{request_id}
  4. When status is "COMPLETED", download from output.media_url

Tip: Use X-Webhook-URL header to get a callback instead of polling.

P Video Avatar API Pricing — Per-Second Rates

ResolutionPrice (USD)
720p$0.025/sec
1080p$0.045/sec
10. P Video v1

P Video v1 API Documentation

https://gateway.pixazo.ai/p-video/v1/p-video/generate

Authentication

All requests require an API key passed via header.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour API subscription key

Video Request - P Video

Request Code

POST https://gateway.pixazo.ai/p-video/v1/p-video/generate
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_API_KEY

{
  "prompt": "A cat walking in a garden"
}
import requests

url = "https://gateway.pixazo.ai/p-video/v1/p-video/generate"
headers = {
    "Content-Type": "application/json",
    "Cache-Control": "no-cache",
    "Ocp-Apim-Subscription-Key": "YOUR_API_KEY"
}
data = {
    "prompt": "A cat walking in a garden"
}

response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = 'https://gateway.pixazo.ai/p-video/v1/p-video/generate';
const headers = {
  'Content-Type': 'application/json',
  'Cache-Control': 'no-cache',
  'Ocp-Apim-Subscription-Key': 'YOUR_API_KEY'
};
const data = {
  prompt: 'A cat walking in a garden'
};

fetch(url, {
  method: 'POST',
  headers: headers,
  body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
curl -X POST "https://gateway.pixazo.ai/p-video/v1/p-video/generate" \
  -H "Content-Type: application/json" \
  -H "Cache-Control: no-cache" \
  -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
  --data-raw '{
    "prompt": "A cat walking in a garden"
  }'

Output

{
  "request_id": "p-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/p-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Webhook (Optional)

Add the X-Webhook-URL header to your submit request to receive a POST callback when the job completes — no polling required.

Using curl? These are HTTP request headers — pass each with -H, e.g. -H "X-Webhook-URL: https://your-server.com/webhook/callback". Do not paste them as bare lines, and end every line of a multi-line command with \.

Webhook Headers

HeaderRequiredDefaultDescription
X-Webhook-URLYes (to enable)—HTTPS endpoint on your server that will receive the POST callback. Must respond 2xx within a few seconds (process async if needed).
X-Webhook-ModeNoterminalterminal — fires once at the final status (COMPLETED/FAILED/ERROR). sync — fires on every poll cycle plus the terminal event, and caps the queue’s polling delay at 15s for tighter progress updates.

Example: enable webhook

X-Webhook-URL: https://your-server.com/webhook/callback
X-Webhook-Mode: terminal

Callback Payload

Your endpoint receives a POST application/json with the same shape as the GET /v2/requests/status/{request_id} response. Example terminal callback (mode terminal):

{
  "request_id": "p-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "p-video",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/p-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.mp4"
    ],
    "media_type": "video/mp4"
  },
  "created_at": "2026-05-22T13:17:32.110Z",
  "updated_at": "2026-05-22 13:19:23",
  "completed_at": "2026-05-22 13:19:23"
}

Failure callback shape

{
  "request_id": "p-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "p-video",
  "error": "Description of the error",
  "output": null,
  "created_at": "...",
  "updated_at": "...",
  "completed_at": "..."
}

Delivery semantics

  • terminal mode (default) — exactly one POST when the request reaches a terminal status. No callback during PROCESSING.
  • sync mode — POST on every status poll (with delay capped at ~15s) plus a final POST at terminal status. Use when you want progress updates.
  • Idempotency — use request_id as your idempotency key. Network retries can deliver the same callback more than once; your handler must tolerate duplicates.
  • Response — respond 200 OK within a few seconds. The queue does not block on slow handlers, but persistent failures may stop further deliveries.
  • HTTPS required — plain http:// URLs are rejected.

Request Parameters - Video Request

ParameterRequiredTypeDefaultAllowed values / range
promptYesrequiredstring——
Text prompt for video generation. Required for every mode (text-, image- and audio-conditioned).
imageNostring (URI)—jpg, jpeg, png, webp
Input image to generate video from (image-to-video). When provided, aspect_ratio is ignored and the image's aspect ratio is used.
last_frame_imageNostring (URI)—jpg, jpeg, png, webp
Reference image for the last frame of the video.
audioNostring (URI)—flac, mp3, wav
Input audio to condition video generation. When provided, duration is ignored and the audio length is used.
durationNointeger51–20
Duration of the video in seconds. Ignored when audio is provided.
aspect_ratioNostring"16:9"16:9, 9:16, 4:3, 3:4, 3:2, 2:3, 1:1
Aspect ratio of the video. Ignored when an input image is provided.
resolutionNostring"720p"720p, 1080p
Resolution of the generated video.
fpsNointeger2424, 48
Frames per second of the video. 48 gives smoother motion at higher cost.
draftNobooleanfalsetrue, false
Draft mode. Generates a lower-quality preview of the video (about 4× faster) for quick iteration.
prompt_upsamplingNobooleantruetrue, false
Use prompt upsampling to automatically expand and enhance the prompt before generation. Set to false when you need the exact prompt wording honoured.
disable_safety_filterNobooleantruetrue, false
Disable the safety filter for prompts (and input image). When disabled, prompts are not checked for unsafe content before generation.
save_audioNobooleantruetrue, false
Save the generated video with its audio track.
seedNointeger—any integer
Random seed. Set for reproducible generation; leave empty for a random seed.
no_opNobooleanfalsetrue, false
Health-check mode — returns a status response without running inference (no video is generated).
webhookNostring——
Webhook URL for async notifications when generation completes.
webhook_events_filterNoarray——
Event types to receive (e.g. ["completed"]).

Content Item Types & Limits

TypeMaxFormat / SizeDescription
image1JPG, PNG, WEBPInput image.
audio1MP3, WAVAudio track.

Example Request

{
  "prompt": "A cat walking gracefully through a sunlit garden with butterflies and flowers swaying in the breeze",
  "image": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg",
  "audio": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/audio/speech-17s.mp3",
  "duration": 10,
  "aspect_ratio": "16:9",
  "resolution": "1080p",
  "fps": 48,
  "draft": false,
  "prompt_upsampling": true,
  "disable_safety_filter": true,
  "save_audio": true,
  "seed": 42,
  "webhook": "https://your-webhook.com/callback",
  "webhook_events_filter": ["completed"]
}

Response

{
  "request_id": "p-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/p-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Request Headers

Header Value
Content-Typeapplication/json
Cache-Controlno-cache
Ocp-Apim-Subscription-KeyYOUR_API_KEY

Response Handling

Common status codes.

CodeMeaning
202Accepted — Request queued
Bad Request
401Unauthorized
402Insufficient Balance
403Forbidden
Too Many Requests
500Internal Server Error

Error Responses

Queue system errors and model validation errors.

Queue System Errors

// 402 — Insufficient balance
{
  "error": "Insufficient Balance",
  "message": "Your wallet does not have enough balance."
}
// 400 — Model not found
{
  "error": "Model not found",
  "message": "Model 'p-video' not found or is disabled"
}

Error via Status/Webhook

{
  "request_id": "p-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "p-video",
  "error": "Description of the error",
  "output": null
}

Retrieving Results

Poll the universal status endpoint to check progress and retrieve results.

Endpoint

GET https://gateway.pixazo.ai/v2/requests/status/{request_id}
Ocp-Apim-Subscription-Key: YOUR_API_KEY

cURL Example

curl -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
  "https://gateway.pixazo.ai/v2/requests/status/p-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"

Response (Completed)

{
  "request_id": "p-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "p-video",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/p-video_019dxxxx-xxxx/output.ext"
    ],
    "media_type": "application/octet-stream"
  },
  "created_at": "2026-03-31T10:00:00.000Z",
  "updated_at": "2026-03-31T10:00:15.000Z",
  "completed_at": "2026-03-31T10:00:15.000Z"
}

Response Fields

FieldTypeDescription
request_idstringUnique request identifier
statusstringQUEUED, PROCESSING, COMPLETED, FAILED, or ERROR
model_idstringModel that processed the request
errorstring|nullError message if failed
output.media_urlarrayURLs to generated media (R2 CDN)
output.media_typestringMIME type of the output
created_atstringWhen request was created
completed_atstring|nullWhen request completed
polling_urlstringStatus URL (initial response only)

Status Values

StatusDescription
QUEUEDRequest accepted, waiting to be processed
PROCESSINGBeing processed by the model
COMPLETEDDone — output contains the result
FAILEDFailed — check error field
ERRORSystem error — not charged

Status Flow

QUEUED → PROCESSING → COMPLETED
                    → FAILED
                    → ERROR

Typical Workflow

  1. Send a generate request to the API endpoint
  2. Save the request_id from the response
  3. Poll every 5-10 seconds: GET /v2/requests/status/{request_id}
  4. When status is "COMPLETED", download from output.media_url

Tip: Use X-Webhook-URL header to get a callback instead of polling.

P Video v1 API Pricing — Per-Second Rates

ResolutionModePrice (USD)
720pStandard$0.021/sec
720pDraft$0.00525/sec
1080pStandard$0.042/sec
1080pDraft$0.0105/sec

⚡ Performance

Live usage measured on Pixazo's gateway, split by model version. Generation time is how long a generation takes end-to-end (lower is better). Success rate is the percent of generations that complete (higher is better).

Show data for the last
Generations
57,300last 30d
~1,910 per day
Success rate
98.8%
of completed generations
Generation time
109.9savg
p95 119.4s
Requests
Nov 1max 13,800Nov 30
P Video v1Avg 1,720/day
P-Video 2 Pro AvatarAvg 90/day
P-Video 2 Pro LipsyncAvg 20/day
P-Video UpscaleAvg 17/day
OtherAvg 63/day
Generation Time
Nov 1max 2.5minNov 30
P Video v1Avg 108.9s
P-Video 2 Pro AvatarAvg 2.1min
P-Video 2 Pro LipsyncAvg 2.3min
P-Video UpscaleAvg 105.7s
OtherAvg 108.8s
Error Rate
Nov 1max 25.0%Nov 30
P Video v1Avg 0.4%
P-Video 2 Pro AvatarAvg 3.7%
P-Video 2 Pro LipsyncAvg 16.7%
P-Video UpscaleAvg 0.0%
OtherAvg 15.8%

〰 Uptime

Percent of generations that succeeded over the selected period, per model version.

Avg. Success Rate (30d)
98.78%
across all generations of this model family
Uptime
Nov 1max 100%Nov 30
P Video v1Avg 99.61%
P-Video 2 Pro AvatarAvg 96.30%
P-Video 2 Pro LipsyncAvg 83.33%
P-Video UpscaleAvg 100.00%
OtherAvg 84.21%