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.

Models Version
Get 10% Cashback on Your First Payment (up to $500)
Add funds and get 10% cashback on your first payment (up to $500).
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/generateAuthentication
All requests require an API key passed via header.
| Header | Type | Required | Description |
|---|---|---|---|
| Ocp-Apim-Subscription-Key | string | Yes | Your 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.
| Header | Required | Description |
|---|---|---|
| X-Webhook-URL | To enable | HTTPS URL to receive the Webhook callback. |
| X-Webhook-Mode | No | terminal (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
200within a few seconds; the Webhook endpoint must be HTTPS.
Request Parameters
| Parameter | Required | Type | Default | Allowed values / range |
|---|---|---|---|---|
video | Yesrequired | string | — | 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. | ||||
audio | Yesrequired | string | — | 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. | ||||
seed | No | integer | random | Any 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_filter | No | boolean | false | true, 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.
| Parameter | Why |
|---|---|
aspect_ratio, resolution, output_resolution | Not accepted: the output keeps the video's resolution and shape, up to 1080p. |
audio_url | Not a field here: send the new speech as 'audio'. |
duration | Not accepted: the output is as long as the shorter of the video and the audio, up to 60 seconds. |
enable_safety_checker, disable_safety_checker | Not 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_fps | Not a field of this API. |
n, num_outputs, num_videos, num_images, number_of_images, batch_size, count | Not supported: P-Video 2 Pro Lipsync returns one video per request. Send one request per video. |
prompt, instruction_prompt | Not accepted: P-Video 2 Pro Lipsync takes no prompt; the mouth follows the speech in 'audio'. |
sync_mode, lipsync_mode, emotion, model_mode, temperature | Not accepted: P-Video 2 Pro Lipsync has no lipsync options; send 'video' and 'audio' (and optionally 'seed' and 'enable_safety_filter'). |
video_url, video_uri | Not 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.
| Parameter | When the request fails |
|---|---|
video | No face is found in the video (Generation failed: Prediction failed: Async prediction failed: ValueError: no face found in the video). |
video, audio | A file shorter than 0.9 seconds, or not a readable video or audio file. |
video, audio | The 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:
| Inputs | Size | Length | Frame rate | Sound |
|---|---|---|---|---|
| 5 s video, 1920×1080 + 5 s audio | 1920×1080 | 5.00 s | 24 fps | Yes |
| 8 s video, 1920×1080 + 5 s audio | 1920×1080 | 5.00 s | 24 fps | Yes |
| 5 s video, 1920×1080 + 8 s audio | 1920×1080 | 5.00 s | 24 fps | Yes |
| 5 s video, 1280×720 + 5 s audio | 1280×720 | 5.00 s | 24 fps | Yes |
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
| Header | Required | Description |
|---|---|---|
| Content-Type | Yes | application/json |
| Ocp-Apim-Subscription-Key | Yes | Your API subscription key. |
| X-Webhook-URL | No | Enable Webhook callbacks (see Webhook section). |
| X-Webhook-Mode | No | terminal (default) or sync (see Webhook section). |
Response Handling
| Status Code | Meaning |
|---|---|
| 202 | Accepted — request queued; returns request_id and polling_url. |
| 400 | Bad request — the body failed the submit check (see Request Parameters) and was not queued. |
| 401 | Unauthorized — missing or invalid subscription key. |
| 402 | Insufficient balance for the hold this request needs. |
| 429 | Too many requests. |
| 500 | Internal 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
| Field | Type | Description |
|---|---|---|
| request_id | string | Unique request identifier. |
| status | string | QUEUED, PROCESSING, COMPLETED or ERROR. |
| model_id | string | The model that handled the request. |
| error | string or null | Error message when status is ERROR; otherwise null. |
| output.media_url | array of strings | URL of the MP4 (one per request). Download it and keep your own copy. |
| output.media_type | string | video/mp4. |
| created_at | string | Request creation timestamp. |
| updated_at | string | Last status change timestamp. |
| completed_at | string | Completion timestamp. |
| polling_url | string | Status URL for this request (in the submit response). |
Status Values & Flow
QUEUED → PROCESSING → COMPLETED (success) or ERROR (failure).
Typical workflow
- Send the request to
POST https://gateway.pixazo.ai/p-video-2-pro-lipsync/v1/generate. - Save the
request_idfrom the202response. - Poll
GET /v2/requests/status/{request_id}every 5 to 10 seconds, or use a Webhook instead. - When
statusisCOMPLETED, download the video fromoutput.media_url.
P-Video 2 Pro Lipsync API Pricing — Per-Second Rates
| Resolution | Price (USD) |
|---|---|
| Per second of output video, any resolution (up to 1080p) | $0.02625/sec |
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/generateAuthentication
All requests require an API key passed via header.
| Header | Type | Required | Description |
|---|---|---|---|
| Ocp-Apim-Subscription-Key | string | Yes | Your 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.
| Header | Required | Description |
|---|---|---|
| X-Webhook-URL | To enable | HTTPS URL to receive the Webhook callback. |
| X-Webhook-Mode | No | terminal (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
200within a few seconds; the Webhook endpoint must be HTTPS.
Request Parameters
| Parameter | Required | Type | Default | Allowed values / range |
|---|---|---|---|---|
video | Yesrequired | string | — | 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. | ||||
target | No | string | "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. | ||||
fps | No | integer | the source's rate | 16 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. | ||||
turbo | No | boolean | false | true, false |
| A much faster model with slightly lower quality, at about a third of the standard price, at any frame rate. | ||||
enable_safety_filter | No | boolean | false | true, 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.
| target | Most frames | At 24 fps | At 30 fps or more |
|---|---|---|---|
720p | 2,400 | about 100 seconds | about 80 seconds |
1080p | 1,200 | about 50 seconds | about 40 seconds |
2k | 600 | about 25 seconds | about 20 seconds |
4k | 300 | about 12.5 seconds | about 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.
| Parameter | Why |
|---|---|
video longer than 150 seconds | Measured when you submit (error: Input too long). Nothing is queued or charged. |
video that cannot be downloaded | The file is fetched when you submit (error: Asset proxy failed). Nothing is queued or charged. |
duration | Not 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_checker | Not 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, size | Not a field of this API. |
n, num_outputs, num_videos, num_images, number_of_images, batch_size, count | Not supported: P-Video Upscale returns one video per request. Send one request per video. |
prompt, instruction_prompt | Not accepted: P-Video Upscale takes no prompt, only the video and the 'target' size. |
resolution, output_resolution, target_resolution, upscale_factor, scale | Not accepted here: use 'target' (720p, 1080p, 2k or 4k). |
target_fps, frame_rate, output_fps | Not accepted here: use 'fps' (an integer from 16 to 60; leave it out to keep the source's frame rate). |
video_url | Not 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.
| Parameter | When the request fails |
|---|---|
video | The file is not a readable video. |
video | The 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:
| Request | Size | Length | Frame rate |
|---|---|---|---|
| 1080p | 1920×1080 | 3.0 s | 24 fps |
2K, fps 60 | 2560×1440 | 3.0 s | 60 fps |
4K, fps 24 | 3840×2160 | 3.0 s | 24 fps |
720p, turbo | 1280×720 | 3.0 s | 24 fps |
4K, turbo | 3840×2160 | 3.0 s | 24 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
| Header | Required | Description |
|---|---|---|
| Content-Type | Yes | application/json |
| Ocp-Apim-Subscription-Key | Yes | Your API subscription key. |
| X-Webhook-URL | No | Enable Webhook callbacks (see Webhook section). |
| X-Webhook-Mode | No | terminal (default) or sync (see Webhook section). |
Response Handling
| Status Code | Meaning |
|---|---|
| 202 | Accepted — request queued; returns request_id and polling_url. |
| 400 | Bad request — the body failed the submit check (see Request Parameters) and was not queued. |
| 401 | Unauthorized — missing or invalid subscription key. |
| 402 | Insufficient balance for the hold this request needs. |
| 429 | Too many requests. |
| 500 | Internal 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
| Field | Type | Description |
|---|---|---|
| request_id | string | Unique request identifier. |
| status | string | QUEUED, PROCESSING, COMPLETED or ERROR. |
| model_id | string | The model that handled the request. |
| error | string or null | Error message when status is ERROR; otherwise null. |
| output.media_url | array of strings | URL of the MP4 (one per request). Download it and keep your own copy. |
| output.media_type | string | video/mp4. |
| created_at | string | Request creation timestamp. |
| updated_at | string | Last status change timestamp. |
| completed_at | string | Completion timestamp. |
| polling_url | string | Status URL for this request (in the submit response). |
Status Values & Flow
QUEUED → PROCESSING → COMPLETED (success) or ERROR (failure).
Typical workflow
- Send the request to
POST https://gateway.pixazo.ai/p-video-upscale/v1/generate. - Save the
request_idfrom the202response. - Poll
GET /v2/requests/status/{request_id}every 5 to 10 seconds, or use a Webhook instead. - When
statusisCOMPLETED, download the video fromoutput.media_url.
P-Video Upscale API Pricing — Per-Second Rates
| Output | Price (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 |
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/generateAuthentication
All requests require an API key passed via header.
| Header | Type | Required | Description |
|---|---|---|---|
| Ocp-Apim-Subscription-Key | string | Yes | Your 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.
| Header | Required | Description |
|---|---|---|
| X-Webhook-URL | To enable | HTTPS URL to receive the Webhook callback. |
| X-Webhook-Mode | No | terminal (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
| Parameter | Required | Type | Default | Allowed values / range |
|---|---|---|---|---|
video | Yesrequired | string | — | 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. | ||||
prompt | Yesrequired | string | — | 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. | ||||
images | No | array 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. | ||||
draft | No | boolean | false | true, false |
true: a faster, cheaper preview. Rerun with false once the prompt works. | ||||
prompt_upsampling | No | boolean | — | true, false |
| Let the model expand your prompt. | ||||
save_audio | No | boolean | true | true, false |
| Keep the source soundtrack in the output video. | ||||
enable_safety_filter | No | boolean | — | true, false |
| Check the inputs against the content policy. | ||||
seed | No | integer | random | Any 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.
| Parameter | Why | Use instead |
|---|---|---|
video longer than 15 seconds | Measured when you submit (error: Input too long). Nothing is queued or charged. | Trim the video to 15 seconds or less |
duration | The output is as long as the source video. | Trim the source video |
resolution | The model sets the output size: at launch, a 1280×720 source came back at 848×480. | — |
video_url | Not a field here. | video |
image, image_url, image_urls, reference_images | Not fields here. | images (a list) |
instruction_prompt, edit_prompt | Not fields here. | prompt |
images with more than 4 pictures | At most four references. | Up to 4 pictures |
video or an images entry that cannot be downloaded | The 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_script | Fields of the other P-Video models. | — |
n, num_outputs, num_videos, batch_size | One video per request. | One request per video |
model, version | This 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.
| Parameter | When the request fails |
|---|---|
video | The file is not a readable video. |
images | A picture is not a readable image. |
video, images, prompt | The 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:
| Request | Size | Length |
|---|---|---|
| Full quality (default) | 848×480 | 3.0 s |
draft: true | 848×480 | 3.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
| Header | Required | Description |
|---|---|---|
| Content-Type | Yes | application/json |
| Ocp-Apim-Subscription-Key | Yes | Your API subscription key. |
| X-Webhook-URL | No | Enable Webhook callbacks (see Webhook section). |
Response Handling
| Status Code | Meaning |
|---|---|
| 202 | Accepted — request queued; returns request_id and polling_url. |
| 400 | Bad request — the body failed the submit check (see Request Parameters) and was not queued. |
| 401 | Unauthorized — missing or invalid subscription key. |
| 402 | Insufficient balance. |
| 403 | Forbidden. |
| 429 | Too many requests. |
| 500 | Internal 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
| Field | Type | Description |
|---|---|---|
| request_id | string | Unique request identifier. |
| status | string | QUEUED, PROCESSING, COMPLETED or ERROR. |
| model_id | string | The model that handled the request. |
| error | string or null | Error message when status is ERROR; otherwise null. |
| output.media_url | array of strings | URL of the MP4 (one per request). Download it and keep your own copy. |
| output.media_type | string | video/mp4. |
| created_at | string | Request creation timestamp. |
| updated_at | string | Last status change timestamp. |
| completed_at | string | Completion timestamp. |
| polling_url | string | Status 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
| Resolution | Mode | Price (USD) |
|---|---|---|
| Full quality | Standard | $0.04725/sec |
| Draft | Draft | $0.02625/sec |
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/generateAuthentication
All requests require an API key passed via header.
| Header | Type | Required | Description |
|---|---|---|---|
| Ocp-Apim-Subscription-Key | string | Yes | Your 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.
| Header | Required | Description |
|---|---|---|
| X-Webhook-URL | To enable | HTTPS URL to receive the Webhook callback. |
| X-Webhook-Mode | No | terminal (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
| Parameter | Required | Type | Default | Allowed values / range |
|---|---|---|---|---|
video | Yesrequired | string | — | 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. | ||||
image | Yesrequired | string | — | A public https URL of a JPG, PNG or WEBP picture |
| The subject to animate. | ||||
instruction_prompt | No | string | — | Free text |
| Extra notes on how the subject should follow the motion. | ||||
resolution | No | string | 720p | 720p (about 1 megapixel), 1080p (about 2 megapixels) |
| Output size. The video takes the picture's framing and shape, not the source video's. | ||||
target_fps | No | string | original | original, 24, 48 |
| Frame rate of the output; the default keeps the source's. | ||||
save_audio | No | boolean | true | true, false |
| Keep the source video's sound in the output. | ||||
ignore_audio | No | boolean | false | true, false |
Generate without listening to the source audio. With save_audio on, the sound is still added. | ||||
turbo | No | boolean | false | true, false |
| Faster generation at slightly lower quality; same price. | ||||
disable_safety_checker | No | boolean | false | true, false |
| Turn off the safety checker on the generated video. | ||||
seed | No | integer | random | Any 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.
| Parameter | Why | Use instead |
|---|---|---|
video longer than 120 seconds | Measured when you submit (error: Input too long). Nothing is queued or charged. | Trim the video to 2 minutes or less |
duration | The output is as long as the source video. | Trim the source video |
video_url | Not a field here. | video |
image_url, images | Not fields here. | image (one picture) |
prompt | Not a field here. | instruction_prompt |
enable_safety_filter | Not a field here. | disable_safety_checker |
video or image that cannot be downloaded | The 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_script | Fields of the other P-Video models. | — |
n, num_outputs, num_videos, batch_size | One video per request. | One request per video |
model, version, no_op | This 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.
| Parameter | When the request fails |
|---|---|
video | The file is not a readable MP4 video. |
image | The picture is not a readable image. |
video, image, instruction_prompt | The 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:
| Request | Size | Length | Frame rate |
|---|---|---|---|
Default (720p) | 768×1280 | 3.0 s | 24 fps |
1080p, turbo | 1152×1792 | 3.0 s | 24 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
| Header | Required | Description |
|---|---|---|
| Content-Type | Yes | application/json |
| Ocp-Apim-Subscription-Key | Yes | Your API subscription key. |
| X-Webhook-URL | No | Enable Webhook callbacks (see Webhook section). |
Response Handling
| Status Code | Meaning |
|---|---|
| 202 | Accepted — request queued; returns request_id and polling_url. |
| 400 | Bad request — the body failed the submit check (see Request Parameters) and was not queued. |
| 401 | Unauthorized — missing or invalid subscription key. |
| 402 | Insufficient balance. |
| 403 | Forbidden. |
| 429 | Too many requests. |
| 500 | Internal 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
| Field | Type | Description |
|---|---|---|
| request_id | string | Unique request identifier. |
| status | string | QUEUED, PROCESSING, COMPLETED or ERROR. |
| model_id | string | The model that handled the request. |
| error | string or null | Error message when status is ERROR; otherwise null. |
| output.media_url | array of strings | URL of the MP4 (one per request). Download it and keep your own copy. |
| output.media_type | string | video/mp4. |
| created_at | string | Request creation timestamp. |
| updated_at | string | Last status change timestamp. |
| completed_at | string | Completion timestamp. |
| polling_url | string | Status 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
| Resolution | Price (USD) |
|---|---|
| 720p | $0.0315/sec |
| 1080p | $0.063/sec |
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/generateAuthentication
All requests require an API key passed via header.
| Header | Type | Required | Description |
|---|---|---|---|
| Ocp-Apim-Subscription-Key | string | Yes | Your 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.
| Header | Required | Description |
|---|---|---|
| X-Webhook-URL | To enable | HTTPS URL to receive the Webhook callback. |
| X-Webhook-Mode | No | terminal (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
| Parameter | Required | Type | Default | Allowed values / range |
|---|---|---|---|---|
video | Yesrequired | string | — | 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. | ||||
images | Yesrequired | array 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_prompt | No | string | — | 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. | ||||
resolution | No | string | 768p | 480p, 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_audio | No | boolean | true | true, false |
| Keep the source soundtrack in the output video. | ||||
ignore_audio | No | boolean | false | true, 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_filter | No | boolean | true | true, false |
| Check the inputs against the content policy. When off, the always-on rules still apply. | ||||
seed | No | integer | random | Any 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.
| Parameter | Why | Use instead |
|---|---|---|
duration | The output is as long as the source video. | Trim the source video |
video_url | Not a field here. | video |
image, image_url, image_urls, reference_images | Not fields here. | images (a list) |
prompt | Not a field here. | instruction_prompt |
disable_safety_checker | P-Video Replace v1's name. | enable_safety_filter |
images with 0 or more than 2 pictures | One person, or two people with one picture each. | 1 or 2 pictures |
video or an images entry that cannot be downloaded | The 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, audio | Fields of the other P-Video models. | — |
n, num_outputs, num_videos, batch_size | One video per request. | One request per video |
model, version | This 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.
| Parameter | When the request fails |
|---|---|
video | The file is not a readable video, is shorter than 1 second, or its aspect ratio is outside 1:4 to 4:1. |
images | A picture is not a readable image. |
video, images, instruction_prompt | The 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:
| Request | Resolution | Size | Length |
|---|---|---|---|
8 s source, 480p | 480p | 832×480 | 8.0 s |
3 s source, default, with instruction_prompt | 768p | 1344×768 | 3.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
| Header | Required | Description |
|---|---|---|
| Content-Type | Yes | application/json |
| Ocp-Apim-Subscription-Key | Yes | Your API subscription key. |
| X-Webhook-URL | No | Enable Webhook callbacks (see Webhook section). |
Response Handling
| Status Code | Meaning |
|---|---|
| 202 | Accepted — request queued; returns request_id and polling_url. |
| 400 | Bad request — the body failed the submit check (see Request Parameters) and was not queued. |
| 401 | Unauthorized — missing or invalid subscription key. |
| 402 | Insufficient balance. |
| 403 | Forbidden. |
| 429 | Too many requests. |
| 500 | Internal 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
| Field | Type | Description |
|---|---|---|
| request_id | string | Unique request identifier. |
| status | string | QUEUED, PROCESSING, COMPLETED or ERROR. |
| model_id | string | The model that handled the request. |
| error | string or null | Error message when status is ERROR; otherwise null. |
| output.media_url | array of strings | URL of the MP4 (one per request). Download it and keep your own copy. |
| output.media_type | string | video/mp4. |
| created_at | string | Request creation timestamp. |
| updated_at | string | Last status change timestamp. |
| completed_at | string | Completion timestamp. |
| polling_url | string | Status 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
| Resolution | Price (USD) |
|---|---|
| 480p | $0.02625/sec |
| 768p | $0.0525/sec |
| 1080p | $0.063/sec |
| 2k | $0.0735/sec |
| 4k | $0.0945/sec |
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/generateAuthentication
All requests require an API key passed via header.
| Header | Type | Required | Description |
|---|---|---|---|
| Ocp-Apim-Subscription-Key | string | Yes | Your 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.
| Header | Required | Description |
|---|---|---|
| X-Webhook-URL | To enable | HTTPS URL to receive the Webhook callback. |
| X-Webhook-Mode | No | terminal (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
| Parameter | Required | Type | Default | Allowed values / range |
|---|---|---|---|---|
image | Yesrequired | string | — | A public https URL of a JPG, JPEG, PNG or WEBP image |
| The portrait of the person who speaks. It becomes the first frame. | ||||
audio | One of these two | string | — | 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_script | One of these two | string | — | 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. | ||||
voice | No | string | Zephyr (Female) | One of the 30 voices below |
The text-to-speech voice for voice_script. | ||||
voice_language | No | string | English (US) | English (US), English (UK), Spanish, French, German, Italian, Portuguese (Brazil), Japanese, Korean, Hindi |
The language of voice_script. | ||||
voice_prompt | No | string | Say the following. | Free text |
| How the voice should sound: tone, pacing, accent or emotion. It is not spoken. | ||||
prompt | No | string | The person is talking. | Free text |
| What the video should show: the setting and how the person moves. | ||||
resolution | No | string | 768p | 480p, 768p, 1080p, 2k, 4k |
1080p, 2k and 4k are generated at 768p and upscaled. 4k takes at most 125 seconds of speech. | ||||
prompt_upsampling | No | boolean | true | true, false |
| A vision model looks at the image and adds the scene's own motion to your prompt. Your words stay first. | ||||
enable_safety_filter | No | boolean | false | true, false |
| Block content in the optional moderation categories. The always-on rules apply either way. | ||||
seed | No | integer | random | Any 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 voices | Male voices |
|---|---|
| Zephyr, Kore, Leda, Aoede, Callirrhoe, Autonoe, Despina, Erinome, Laomedeia, Achernar, Gacrux, Pulcherrima, Vindemiatrix, Sulafat | Puck, 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.
| Parameter | Why | Use instead |
|---|---|---|
duration | The speech sets the length. | Send longer or shorter audio or voice_script |
video_prompt | P Video Avatar v1's name. | prompt |
disable_safety_filter | P Video Avatar v1's name. | enable_safety_filter |
disable_prompt_upsampling | P Video Avatar v1's name. | prompt_upsampling |
negative_prompt, strength_negative_prompt | Not supported by this model. | — |
image_url | Not a field here. | image |
audio_url | Not a field here. | audio |
text | Not a field here. | voice_script |
mode, aspect_ratio, last_frame_image, draft, fps | Fields of the other P-Video models. | — |
n, num_outputs, num_videos, batch_size | One video per request. | One request per video |
model, version | This 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.
| Parameter | When the request fails |
|---|---|
image | The file is not a readable image. |
audio | The file is not readable speech audio, is shorter than 1 second or longer than 3 minutes. |
resolution | 4k with more than 125 seconds of speech. |
image, voice_script, prompt | The 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:
| Request | Resolution | Size | Length |
|---|---|---|---|
voice_script, 480p | 480p | 480×704 | 5.9 s |
audio (7.6 s), default | 768p | 768×1152 | 7.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
| Header | Required | Description |
|---|---|---|
| Content-Type | Yes | application/json |
| Ocp-Apim-Subscription-Key | Yes | Your API subscription key. |
| X-Webhook-URL | No | Enable Webhook callbacks (see Webhook section). |
Response Handling
| Status Code | Meaning |
|---|---|
| 202 | Accepted — request queued; returns request_id and polling_url. |
| 400 | Bad request — the body failed the submit check (see Request Parameters) and was not queued. |
| 401 | Unauthorized — missing or invalid subscription key. |
| 402 | Insufficient balance. |
| 403 | Forbidden. |
| 429 | Too many requests. |
| 500 | Internal 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
| Field | Type | Description |
|---|---|---|
| request_id | string | Unique request identifier. |
| status | string | QUEUED, PROCESSING, COMPLETED or ERROR. |
| model_id | string | The model that handled the request. |
| error | string or null | Error message when status is ERROR; otherwise null. |
| output.media_url | array of strings | URL of the MP4 (one per request). Download it and keep your own copy. |
| output.media_type | string | video/mp4. |
| created_at | string | Request creation timestamp. |
| updated_at | string | Last status change timestamp. |
| completed_at | string | Completion timestamp. |
| polling_url | string | Status 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
| Resolution | Price (USD) |
|---|---|
| 480p | $0.021/sec |
| 768p | $0.042/sec |
| 1080p | $0.063/sec |
| 2k | $0.084/sec |
| 4k | $0.126/sec |
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/generateAuthentication
All requests require an API key passed via header.
| Header | Type | Required | Description |
|---|---|---|---|
| Ocp-Apim-Subscription-Key | string | Yes | Your 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.
| Header | Required | Description |
|---|---|---|
| X-Webhook-URL | To enable | HTTPS URL to receive the Webhook callback. |
| X-Webhook-Mode | No | terminal (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
200within a few seconds; the Webhook endpoint must be HTTPS.
Request Parameters
| Parameter | Required | Type | Default | Allowed values / range |
|---|---|---|---|---|
prompt | Yesrequired | string | — | Non-empty text |
| What the video should show: subject, action, camera and sound. | ||||
image | No | string | — | 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_image | No | string | — | Public https URL of an image (jpg, jpeg, png, webp) |
Last frame. Use it with image for a first-to-last transition. | ||||
audio | No | string | — | 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). | ||||
duration | No | integer | 5 | 1 – 20 |
Length of the video in whole seconds. Leave it out when you send audio. | ||||
aspect_ratio | No | string | 16:9 | 16:9, 9:16, 4:3, 3:4, 3:2, 2:3, 1:1 |
Frame shape. Ignored when image is sent. | ||||
resolution | No | string | 720p | 720p, 1080p |
| Output resolution. 1080p is billed at a higher rate than 720p. | ||||
draft | No | boolean | false | true, false |
| Draft mode: a faster, lower-quality preview, billed at a lower rate. | ||||
fps | No | integer | 24 | 24, 48 |
| Frames per second of the video. | ||||
prompt_upsampling | No | boolean | true | true, false |
| Rewrites your prompt into a more detailed one before generation. | ||||
save_audio | No | boolean | true | true, false |
| Keep the generated sound track in the video. | ||||
disable_safety_filter | No | boolean | true | true, false |
Set false to check the inputs and the video against the provider's optional content filter. | ||||
seed | No | integer | — | 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.
| Parameter | Why | Use instead |
|---|---|---|
model, version | The 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, count | This API returns one video per request. | One request per video |
seconds, num_frames, frames_per_second, music_length_ms | The length is set in whole seconds only. | duration (1 – 20) |
ratio | Not a parameter of this endpoint. | aspect_ratio |
no_op, input, parameters | A nested or wrapper object is not read. | Every field at the top level of the body |
first_frame_image, image_url | Not a parameter of this endpoint. | image |
end_image_url | Not a parameter of this endpoint. | last_frame_image |
video_url, video | This endpoint takes no input video. | — |
audio_url | Not a parameter of this endpoint. | audio |
mode, prompt_upsampler, enable_safety_filter | P-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.
| Parameter | When the request fails |
|---|---|
image, last_frame_image | Not 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
| Header | Required | Description |
|---|---|---|
| Content-Type | Yes | application/json |
| Ocp-Apim-Subscription-Key | Yes | Your API subscription key. |
| X-Webhook-URL | No | Enable Webhook callbacks (see Webhook section). |
Response Handling
| Status Code | Meaning |
|---|---|
| 202 | Accepted — request queued; returns request_id and polling_url. |
| 400 | Bad 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). |
| 401 | Unauthorized — missing or invalid subscription key. |
| 402 | Insufficient balance. |
| 403 | Forbidden. |
| 429 | Too many requests. |
| 500 | Internal 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
| Field | Type | Description |
|---|---|---|
| request_id | string | Unique request identifier. |
| status | string | QUEUED, PROCESSING, COMPLETED or ERROR. |
| model_id | string | The model that handled the request. |
| error | string or null | Error message when status is ERROR; otherwise null. |
| output.media_url | array of strings | URL of the generated video (one file per request). Download it and keep your own copy. |
| output.media_type | string | Video MIME type (video/mp4 for mp4). |
| created_at | string | Request creation timestamp. |
| updated_at | string | Last status change timestamp. |
| completed_at | string | Completion timestamp. |
| polling_url | string | Status 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_idfrom the202response. - Poll the status endpoint every few seconds, or use a Webhook instead.
- When
statusisCOMPLETED, download the video fromoutput.media_url.
P-Video 2 API Pricing — Per-Second Rates
| Resolution | Mode | Price (USD) |
|---|---|---|
| 720p | Standard | $0.0315/sec |
| 720p | Draft | $0.01575/sec |
| 1080p | Standard | $0.063/sec |
| 1080p | Draft | $0.0315/sec |
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/generateAuthentication
All requests require an API key passed via header.
| Header | Type | Required | Description |
|---|---|---|---|
| Ocp-Apim-Subscription-Key | string | Yes | Your 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.
| Header | Required | Description |
|---|---|---|
| X-Webhook-URL | To enable | HTTPS URL to receive the Webhook callback. |
| X-Webhook-Mode | No | terminal (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
200within a few seconds; the Webhook endpoint must be HTTPS.
Request Parameters
| Parameter | Required | Type | Default | Allowed values / range |
|---|---|---|---|---|
prompt | Yesrequired | string | — | Non-empty text |
| What the video should show: subject, action, camera and sound. | ||||
image | No | string | — | 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_image | No | string | — | Public https URL of an image (jpg, jpeg, png, webp) |
Last frame. Use it with image for a first-to-last transition. | ||||
audio | No | string | — | 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). | ||||
duration | No | integer | 5 | 1 – 20 |
Length of the video in whole seconds. Leave it out when you send audio. | ||||
aspect_ratio | No | string | 16:9 | 16:9, 9:16, 4:3, 3:4, 3:2, 2:3, 1:1 |
Frame shape. Ignored when image is sent. | ||||
resolution | No | string | 720p | 720p, 1080p |
| Output resolution. 1080p is billed at a higher rate than 720p. | ||||
draft | No | boolean | false | true, false |
| Draft mode: a faster, lower-quality preview, billed at a lower rate. | ||||
fps | No | integer | 24 | 24, 48 |
| Frames per second of the video. | ||||
prompt_upsampling | No | boolean | true | true, false |
| Rewrites your prompt into a more detailed one before generation. | ||||
save_audio | No | boolean | true | true, false |
| Keep the generated sound track in the video. | ||||
disable_safety_filter | No | boolean | true | true, false |
Set false to check the inputs and the video against the provider's optional content filter. | ||||
seed | No | integer | — | 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.
| Parameter | Why | Use instead |
|---|---|---|
model, version | The 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, count | This API returns one video per request. | One request per video |
seconds, num_frames, frames_per_second, music_length_ms | The length is set in whole seconds only. | duration (1 – 20) |
ratio | Not a parameter of this endpoint. | aspect_ratio |
no_op, input, parameters | A nested or wrapper object is not read. | Every field at the top level of the body |
first_frame_image, image_url | Not a parameter of this endpoint. | image |
end_image_url | Not a parameter of this endpoint. | last_frame_image |
video_url, video | This endpoint takes no input video. | — |
audio_url | Not a parameter of this endpoint. | audio |
mode, prompt_upsampler, enable_safety_filter | P-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.
| Parameter | When the request fails |
|---|---|
image, last_frame_image | Not 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
| Header | Required | Description |
|---|---|---|
| Content-Type | Yes | application/json |
| Ocp-Apim-Subscription-Key | Yes | Your API subscription key. |
| X-Webhook-URL | No | Enable Webhook callbacks (see Webhook section). |
Response Handling
| Status Code | Meaning |
|---|---|
| 202 | Accepted — request queued; returns request_id and polling_url. |
| 400 | Bad 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). |
| 401 | Unauthorized — missing or invalid subscription key. |
| 402 | Insufficient balance. |
| 403 | Forbidden. |
| 429 | Too many requests. |
| 500 | Internal 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
| Field | Type | Description |
|---|---|---|
| request_id | string | Unique request identifier. |
| status | string | QUEUED, PROCESSING, COMPLETED or ERROR. |
| model_id | string | The model that handled the request. |
| error | string or null | Error message when status is ERROR; otherwise null. |
| output.media_url | array of strings | URL of the generated video (one file per request). Download it and keep your own copy. |
| output.media_type | string | Video MIME type (video/mp4 for mp4). |
| created_at | string | Request creation timestamp. |
| updated_at | string | Last status change timestamp. |
| completed_at | string | Completion timestamp. |
| polling_url | string | Status 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_idfrom the202response. - Poll the status endpoint every few seconds, or use a Webhook instead.
- When
statusisCOMPLETED, download the video fromoutput.media_url.
P-Video 2 API Pricing — Per-Second Rates
| Resolution | Mode | Price (USD) |
|---|---|---|
| 720p | Standard | $0.0315/sec |
| 720p | Draft | $0.01575/sec |
| 1080p | Standard | $0.063/sec |
| 1080p | Draft | $0.0315/sec |
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/generateAuthentication
All requests require an API key passed via header.
| Header | Type | Required | Description |
|---|---|---|---|
| Ocp-Apim-Subscription-Key | string | Yes | Your 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.
| Header | Required | Description |
|---|---|---|
| X-Webhook-URL | To enable | HTTPS URL to receive the Webhook callback. |
| X-Webhook-Mode | No | terminal (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
200within a few seconds; the Webhook endpoint must be HTTPS.
Request Parameters
| Parameter | Required | Type | Default | Allowed values / range |
|---|---|---|---|---|
prompt | Yesrequired | string | — | Non-empty text |
| What the video should show: subject, action, camera and sound. | ||||
mode | No | string | speed | quality, 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. | ||||
resolution | No | string | 768p | 480p, 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. | ||||
duration | No | integer | 5 | 5 – 15 |
| Length of the video in whole seconds. | ||||
image | No | string | — | Public https URL of an image |
| First frame. | ||||
last_frame_image | No | string | — | Public https URL of an image |
| Last frame. | ||||
aspect_ratio | No | string | 16:9 | 16:9, 9:16, 4:3, 3:4, 3:2, 2:3, 1:1 |
Frame shape. With image, the image sets the shape. | ||||
prompt_upsampler | No | string | turbo | off, turbo, max |
Expands your prompt into a detailed brief before generation, or not at all with off. | ||||
enable_safety_filter | No | boolean | false | true, false |
| Check the inputs against the content policy. When off, only the always-on categories are blocked. | ||||
seed | No | integer | — | 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.
| Parameter | Why | Use instead |
|---|---|---|
model, version | The 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, count | This API returns one video per request. | One request per video |
seconds, num_frames, frames_per_second, music_length_ms | The length is set in whole seconds only. | duration (5 – 15) |
ratio | Not a parameter of this endpoint. | aspect_ratio |
first_frame_image, image_url | Not a parameter of this endpoint. | image |
end_image_url | Not a parameter of this endpoint. | last_frame_image |
video_url, video | This endpoint takes no input video. | — |
no_op, input, parameters | A nested or wrapper object is not read. | Every field at the top level of the body |
audio, audio_url | This endpoint takes no audio input; the video's sound is generated. | — |
draft, fps, prompt_upsampling, save_audio, disable_safety_filter | P-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.
| Parameter | When the request fails |
|---|---|
image, last_frame_image | Not 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
| Header | Required | Description |
|---|---|---|
| Content-Type | Yes | application/json |
| Ocp-Apim-Subscription-Key | Yes | Your API subscription key. |
| X-Webhook-URL | No | Enable Webhook callbacks (see Webhook section). |
Response Handling
| Status Code | Meaning |
|---|---|
| 202 | Accepted — request queued; returns request_id and polling_url. |
| 400 | Bad 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). |
| 401 | Unauthorized — missing or invalid subscription key. |
| 402 | Insufficient balance. |
| 403 | Forbidden. |
| 429 | Too many requests. |
| 500 | Internal 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
| Field | Type | Description |
|---|---|---|
| request_id | string | Unique request identifier. |
| status | string | QUEUED, PROCESSING, COMPLETED or ERROR. |
| model_id | string | The model that handled the request. |
| error | string or null | Error message when status is ERROR; otherwise null. |
| output.media_url | array of strings | URL of the generated video (one file per request). Download it and keep your own copy. |
| output.media_type | string | Video MIME type (video/mp4 for mp4). |
| created_at | string | Request creation timestamp. |
| updated_at | string | Last status change timestamp. |
| completed_at | string | Completion timestamp. |
| polling_url | string | Status 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_idfrom the202response. - Poll the status endpoint every few seconds, or use a Webhook instead.
- When
statusisCOMPLETED, download the video fromoutput.media_url.
P-Video 2 Pro API Pricing — Per-Second Rates
| Resolution | Version | Price (USD) |
|---|---|---|
| 480p | Cost mode | $0.0105/sec |
| 768p | Cost mode | $0.02625/sec |
| 1080p | Cost mode | $0.04725/sec |
| 2k | Cost mode | $0.06825/sec |
| 4k | Cost mode | $0.11025/sec |
| 480p | Speed mode | $0.021/sec |
| 768p | Speed mode | $0.03675/sec |
| 1080p | Speed mode | $0.05775/sec |
| 2k | Speed mode | $0.07875/sec |
| 4k | Speed mode | $0.12075/sec |
| 480p | Quality mode | $0.042/sec |
| 768p | Quality mode | $0.07875/sec |
| 1080p | Quality mode | $0.09975/sec |
| 2k | Quality mode | $0.12075/sec |
| 4k | Quality mode | $0.16275/sec |
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/generateAuthentication
All requests require an API key passed via header.
| Header | Type | Required | Description |
|---|---|---|---|
| Ocp-Apim-Subscription-Key | string | Yes | Your 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.
| Header | Required | Description |
|---|---|---|
| X-Webhook-URL | To enable | HTTPS URL to receive the Webhook callback. |
| X-Webhook-Mode | No | terminal (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
200within a few seconds; the Webhook endpoint must be HTTPS.
Request Parameters
| Parameter | Required | Type | Default | Allowed values / range |
|---|---|---|---|---|
prompt | Yesrequired | string | — | Non-empty text |
| What the video should show: subject, action, camera and sound. | ||||
mode | No | string | speed | quality, 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. | ||||
resolution | No | string | 768p | 480p, 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. | ||||
duration | No | integer | 5 | 5 – 15 |
| Length of the video in whole seconds. | ||||
image | No | string | — | Public https URL of an image |
| First frame. | ||||
last_frame_image | No | string | — | Public https URL of an image |
| Last frame. | ||||
aspect_ratio | No | string | 16:9 | 16:9, 9:16, 4:3, 3:4, 3:2, 2:3, 1:1 |
Frame shape. With image, the image sets the shape. | ||||
prompt_upsampler | No | string | turbo | off, turbo, max |
Expands your prompt into a detailed brief before generation, or not at all with off. | ||||
enable_safety_filter | No | boolean | false | true, false |
| Check the inputs against the content policy. When off, only the always-on categories are blocked. | ||||
seed | No | integer | — | 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.
| Parameter | Why | Use instead |
|---|---|---|
model, version | The 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, count | This API returns one video per request. | One request per video |
seconds, num_frames, frames_per_second, music_length_ms | The length is set in whole seconds only. | duration (5 – 15) |
ratio | Not a parameter of this endpoint. | aspect_ratio |
first_frame_image, image_url | Not a parameter of this endpoint. | image |
end_image_url | Not a parameter of this endpoint. | last_frame_image |
video_url, video | This endpoint takes no input video. | — |
no_op, input, parameters | A nested or wrapper object is not read. | Every field at the top level of the body |
audio, audio_url | This endpoint takes no audio input; the video's sound is generated. | — |
draft, fps, prompt_upsampling, save_audio, disable_safety_filter | P-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.
| Parameter | When the request fails |
|---|---|
image, last_frame_image | Not 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
| Header | Required | Description |
|---|---|---|
| Content-Type | Yes | application/json |
| Ocp-Apim-Subscription-Key | Yes | Your API subscription key. |
| X-Webhook-URL | No | Enable Webhook callbacks (see Webhook section). |
Response Handling
| Status Code | Meaning |
|---|---|
| 202 | Accepted — request queued; returns request_id and polling_url. |
| 400 | Bad 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). |
| 401 | Unauthorized — missing or invalid subscription key. |
| 402 | Insufficient balance. |
| 403 | Forbidden. |
| 429 | Too many requests. |
| 500 | Internal 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
| Field | Type | Description |
|---|---|---|
| request_id | string | Unique request identifier. |
| status | string | QUEUED, PROCESSING, COMPLETED or ERROR. |
| model_id | string | The model that handled the request. |
| error | string or null | Error message when status is ERROR; otherwise null. |
| output.media_url | array of strings | URL of the generated video (one file per request). Download it and keep your own copy. |
| output.media_type | string | Video MIME type (video/mp4 for mp4). |
| created_at | string | Request creation timestamp. |
| updated_at | string | Last status change timestamp. |
| completed_at | string | Completion timestamp. |
| polling_url | string | Status 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_idfrom the202response. - Poll the status endpoint every few seconds, or use a Webhook instead.
- When
statusisCOMPLETED, download the video fromoutput.media_url.
P-Video 2 Pro API Pricing — Per-Second Rates
| Resolution | Version | Price (USD) |
|---|---|---|
| 480p | Cost mode | $0.0105/sec |
| 768p | Cost mode | $0.02625/sec |
| 1080p | Cost mode | $0.04725/sec |
| 2k | Cost mode | $0.06825/sec |
| 4k | Cost mode | $0.11025/sec |
| 480p | Speed mode | $0.021/sec |
| 768p | Speed mode | $0.03675/sec |
| 1080p | Speed mode | $0.05775/sec |
| 2k | Speed mode | $0.07875/sec |
| 4k | Speed mode | $0.12075/sec |
| 480p | Quality mode | $0.042/sec |
| 768p | Quality mode | $0.07875/sec |
| 1080p | Quality mode | $0.09975/sec |
| 2k | Quality mode | $0.12075/sec |
| 4k | Quality mode | $0.16275/sec |
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/generateAuthentication
All requests require an API key passed via header.
| Header | Type | Required | Description |
|---|---|---|---|
| Ocp-Apim-Subscription-Key | string | Yes | Your 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.
| Header | Required | Description |
|---|---|---|
| X-Webhook-URL | To enable | HTTPS URL to receive the Webhook callback. |
| X-Webhook-Mode | No | terminal (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
200within a few seconds; the Webhook endpoint must be HTTPS.
Request Parameters
| Parameter | Required | Type | Default | Allowed values / range |
|---|---|---|---|---|
prompt | Yesrequired | string | — | Non-empty text |
| What the video should show. Refer to the references by what they show (the boat, the voice, the camera move). | ||||
image | Yes, unless video is sent | array 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. | ||||
video | Yes, unless image is sent | array 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. | ||||
audio | No | array 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_audio | No | boolean | false | true, 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_image | No | string | — | Public https URL of an image |
| First frame of the video. | ||||
last_frame_image | No | string | — | Public https URL of an image |
| Last frame of the video. | ||||
mode | No | string | speed | speed, cost |
speed: the fastest. cost: the same model on less hardware, slower and billed at a lower rate. Each mode has its own rates. | ||||
resolution | No | string | 768p | 480p, 768p, 1080p, 2k, 4k |
| Output resolution. 1080p, 2k and 4k are generated at 768p and upscaled. Higher resolutions are billed at higher rates. | ||||
duration | No | integer | 5 | 5 – 15 |
| Length of the video in whole seconds. | ||||
aspect_ratio | No | string | 16:9 | adaptive, 16:9, 9:16, 4:3, 3:4, 3:2, 2:3, 1:1 |
Frame shape. adaptive follows the shape of your references. | ||||
prompt_upsampler | No | string | turbo | off, 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_filter | No | boolean | false | true, false |
| Check the inputs against the content policy. When off, only the always-on categories are blocked. | ||||
seed | No | integer | — | 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.
| Parameter | Why | Use instead |
|---|---|---|
model, version | The 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, count | This API returns one video per request. | One request per video |
seconds, num_frames, frames_per_second, music_length_ms | The length is set in whole seconds only. | duration (5 – 15) |
ratio | Not a parameter of this endpoint. | aspect_ratio |
no_op, input, parameters | A nested or wrapper object is not read. | Every field at the top level of the body |
image_url, image_urls, reference_image_urls | Not a parameter of this endpoint. | image (a list) |
end_image_url | Not a parameter of this endpoint. | last_frame_image |
video_url, video_urls, reference_video_urls | Not a parameter of this endpoint. | video (a list) |
audio_url, reference_audio_urls | Not a parameter of this endpoint. | audio (a list) |
draft, fps, prompt_upsampling, save_audio, disable_safety_filter | P-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.
| Parameter | When the request fails |
|---|---|
image, video, audio entries, first_frame_image, last_frame_image | A 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
| Header | Required | Description |
|---|---|---|
| Content-Type | Yes | application/json |
| Ocp-Apim-Subscription-Key | Yes | Your API subscription key. |
| X-Webhook-URL | No | Enable Webhook callbacks (see Webhook section). |
Response Handling
| Status Code | Meaning |
|---|---|
| 202 | Accepted — request queued; returns request_id and polling_url. |
| 400 | Bad 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). |
| 401 | Unauthorized — missing or invalid subscription key. |
| 402 | Insufficient balance. |
| 403 | Forbidden. |
| 429 | Too many requests. |
| 500 | Internal 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
| Field | Type | Description |
|---|---|---|
| request_id | string | Unique request identifier. |
| status | string | QUEUED, PROCESSING, COMPLETED or ERROR. |
| model_id | string | The model that handled the request. |
| error | string or null | Error message when status is ERROR; otherwise null. |
| output.media_url | array of strings | URL of the generated video (one file per request). Download it and keep your own copy. |
| output.media_type | string | Video MIME type (video/mp4 for mp4). |
| created_at | string | Request creation timestamp. |
| updated_at | string | Last status change timestamp. |
| completed_at | string | Completion timestamp. |
| polling_url | string | Status 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_idfrom the202response. - Poll the status endpoint every few seconds, or use a Webhook instead.
- When
statusisCOMPLETED, download the video fromoutput.media_url.
P-Video 2 Pro API Pricing
| Resolution | Version | Price (USD) |
|---|---|---|
| 480p | Cost mode | $0.015 |
| 768p | Cost mode | $0.025 |
| 1080p | Cost mode | $0.045 |
| 2k | Cost mode | $0.065 |
| 4k | Cost mode | $0.105 |
| 480p | Speed mode | $0.02 |
| 768p | Speed mode | $0.035 |
| 1080p | Speed mode | $0.055 |
| 2k | Speed mode | $0.075 |
| 4k | Speed 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 image | Cost mode | $0.005 |
| Per second of reference audio | Cost 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 image | Speed mode | $0.01 |
| Per second of reference audio | Speed mode | $0.0025 |
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.
| Header | Type | Required | Description |
|---|---|---|---|
| Ocp-Apim-Subscription-Key | string | Yes | Your 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
| Header | Required | Default | Description |
|---|---|---|---|
X-Webhook-URL | Yes (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-Mode | No | terminal | terminal — 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
POSTwhen the request reaches a terminal status. No callback duringPROCESSING. - sync mode —
POSTon every status poll (with delay capped at ~15s) plus a finalPOSTat terminal status. Use when you want progress updates. - Idempotency — use
request_idas your idempotency key. Network retries can deliver the same callback more than once; your handler must tolerate duplicates. - Response — respond
200 OKwithin 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
| Parameter | Required | Type | Default | Allowed values / range |
|---|---|---|---|---|
image | Yesrequired | string (URL) | — | jpg, jpeg, png, webp |
| Publicly reachable URL of the portrait image used as the first frame of the video. | ||||
audio | Conditional | string (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. | ||||
voice | No | string | "Zephyr (Female)" | Show allAll 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_language | No | string | "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_script | Conditional | string | "" | — |
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_prompt | No | string | "Say the following." | — |
| Delivery-style guidance for the speech (tone, pacing, emotion). Describe how the line is said, not what is said. | ||||
video_prompt | No | string | "The person is talking." | — |
| Visual guidance for body movement, framing and background behaviour. Avoid restating the script here. | ||||
negative_prompt | No | string | "" | — |
| Things you do NOT want in the video, e.g. subtitles, text, blurry, low quality, watermark. Disabled when left empty. | ||||
strength_negative_prompt | No | number | 0.5 | 0 – 4 |
How strongly the negative_prompt is applied. The optimal value can vary with the video length (experimental feature). | ||||
resolution | No | string | "720p" | 720p, 1080p |
Output video resolution. Iterate at 720p, then re-run final assets at 1080p. | ||||
seed | No | integer | random | — |
| 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_filter | No | boolean | true | true, 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_upsampling | No | boolean | false | true, false |
When true, your prompts are sent to the model exactly as written and the automatic prompt-enhancement step is skipped. | ||||
no_op | No | boolean | false | true, false |
| Health-check mode — validates the request and returns a status without running inference, so no video is produced. | ||||
webhook | No | string (URL) | — | HTTPS URL |
| Gateway will POST the final result to this URL when the request reaches a terminal state. | ||||
webhook_events_filter | No | string[] | — | completed, failed, canceled |
| Restricts which events trigger the webhook. Defaults to all terminal events. | ||||
Content Item Types & Limits
| Type | Max | Format / Size | Description |
|---|---|---|---|
| image | 1 | JPG, PNG, WEBP | Avatar image. |
| audio | 1 | MP3, WAV | Voice / 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-Type | application/json |
| Cache-Control | no-cache |
| Ocp-Apim-Subscription-Key | YOUR_SUBSCRIPTION_KEY |
Response Handling
Common status codes.
| Code | Meaning |
|---|---|
| 202 | Accepted — Request queued |
| 400 | Bad Request |
| 401 | Unauthorized |
| 402 | Insufficient Balance |
| 403 | Forbidden |
| 429 | Too Many Requests |
| 500 | Internal 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
| Field | Type | Description |
|---|---|---|
| request_id | string | Unique request identifier |
| status | string | QUEUED, PROCESSING, COMPLETED, FAILED, or ERROR |
| model_id | string | Model that processed the request |
| error | string|null | Error message if failed |
| output.media_url | array | URLs to generated media (R2 CDN) |
| output.media_type | string | MIME type (video/mp4) |
| created_at | string | When request was created |
| completed_at | string|null | When request completed |
| polling_url | string | Status URL (initial response only) |
Status Values
| Status | Description |
|---|---|
| QUEUED | Request accepted, waiting to be processed |
| PROCESSING | Being processed by the model |
| COMPLETED | Done — output contains the result |
| FAILED | Failed — check error field |
| ERROR | System error — not charged |
Status Flow
QUEUED → PROCESSING → COMPLETED
→ FAILED
→ ERROR
Typical Workflow
- Send a generate request to the API endpoint
- Save the
request_idfrom the response - Poll every 5-10 seconds:
GET /v2/requests/status/{request_id} - When
statusis"COMPLETED", download fromoutput.media_url
Tip: Use X-Webhook-URL header to get a callback instead of polling.
P Video Avatar API Pricing — Per-Second Rates
| Resolution | Price (USD) |
|---|---|
| 720p | $0.025/sec |
| 1080p | $0.045/sec |
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.
| Header | Type | Required | Description |
|---|---|---|---|
| Ocp-Apim-Subscription-Key | string | Yes | Your 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
| Header | Required | Default | Description |
|---|---|---|---|
X-Webhook-URL | Yes (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-Mode | No | terminal | terminal — 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
POSTwhen the request reaches a terminal status. No callback duringPROCESSING. - sync mode —
POSTon every status poll (with delay capped at ~15s) plus a finalPOSTat terminal status. Use when you want progress updates. - Idempotency — use
request_idas your idempotency key. Network retries can deliver the same callback more than once; your handler must tolerate duplicates. - Response — respond
200 OKwithin 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
| Parameter | Required | Type | Default | Allowed values / range |
|---|---|---|---|---|
prompt | Yesrequired | string | — | — |
| Text prompt for video generation. Required for every mode (text-, image- and audio-conditioned). | ||||
image | No | string (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_image | No | string (URI) | — | jpg, jpeg, png, webp |
| Reference image for the last frame of the video. | ||||
audio | No | string (URI) | — | flac, mp3, wav |
| Input audio to condition video generation. When provided, duration is ignored and the audio length is used. | ||||
duration | No | integer | 5 | 1–20 |
| Duration of the video in seconds. Ignored when audio is provided. | ||||
aspect_ratio | No | string | "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. | ||||
resolution | No | string | "720p" | 720p, 1080p |
| Resolution of the generated video. | ||||
fps | No | integer | 24 | 24, 48 |
| Frames per second of the video. 48 gives smoother motion at higher cost. | ||||
draft | No | boolean | false | true, false |
| Draft mode. Generates a lower-quality preview of the video (about 4× faster) for quick iteration. | ||||
prompt_upsampling | No | boolean | true | true, 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_filter | No | boolean | true | true, false |
| Disable the safety filter for prompts (and input image). When disabled, prompts are not checked for unsafe content before generation. | ||||
save_audio | No | boolean | true | true, false |
| Save the generated video with its audio track. | ||||
seed | No | integer | — | any integer |
| Random seed. Set for reproducible generation; leave empty for a random seed. | ||||
no_op | No | boolean | false | true, false |
| Health-check mode — returns a status response without running inference (no video is generated). | ||||
webhook | No | string | — | — |
| Webhook URL for async notifications when generation completes. | ||||
webhook_events_filter | No | array | — | — |
| Event types to receive (e.g. ["completed"]). | ||||
Content Item Types & Limits
| Type | Max | Format / Size | Description |
|---|---|---|---|
| image | 1 | JPG, PNG, WEBP | Input image. |
| audio | 1 | MP3, WAV | Audio 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-Type | application/json |
| Cache-Control | no-cache |
| Ocp-Apim-Subscription-Key | YOUR_API_KEY |
Response Handling
Common status codes.
| Code | Meaning |
|---|---|
| 202 | Accepted — Request queued |
| 400 | Bad Request |
| 401 | Unauthorized |
| 402 | Insufficient Balance |
| 403 | Forbidden |
| 429 | Too Many Requests |
| 500 | Internal 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
| Field | Type | Description |
|---|---|---|
| request_id | string | Unique request identifier |
| status | string | QUEUED, PROCESSING, COMPLETED, FAILED, or ERROR |
| model_id | string | Model that processed the request |
| error | string|null | Error message if failed |
| output.media_url | array | URLs to generated media (R2 CDN) |
| output.media_type | string | MIME type of the output |
| created_at | string | When request was created |
| completed_at | string|null | When request completed |
| polling_url | string | Status URL (initial response only) |
Status Values
| Status | Description |
|---|---|
| QUEUED | Request accepted, waiting to be processed |
| PROCESSING | Being processed by the model |
| COMPLETED | Done — output contains the result |
| FAILED | Failed — check error field |
| ERROR | System error — not charged |
Status Flow
QUEUED → PROCESSING → COMPLETED
→ FAILED
→ ERROR
Typical Workflow
- Send a generate request to the API endpoint
- Save the
request_idfrom the response - Poll every 5-10 seconds:
GET /v2/requests/status/{request_id} - When
statusis"COMPLETED", download fromoutput.media_url
Tip: Use X-Webhook-URL header to get a callback instead of polling.
P Video v1 API Pricing — Per-Second Rates
| Resolution | Mode | Price (USD) |
|---|---|---|
| 720p | Standard | $0.021/sec |
| 720p | Draft | $0.00525/sec |
| 1080p | Standard | $0.042/sec |
| 1080p | Draft | $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).
〰 Uptime
Percent of generations that succeeded over the selected period, per model version.