Pika H3 Flex API: Pricing, Documentation

by Pika

Pika API stands out for its sophisticated multi-modal generation capabilities, giving developers the power to transform diverse inputs into high-quality video content with ease. By supporting text-to-video, image-to-video, and video-to-video workflows, the interface translates simple descriptive text prompts into vivid motion, breathes dynamic life into static source images, and seamlessly alters or enhances existing video files. This versatile multi-modal framework allows applications to adapt to varied creative needs, bridging the gap between different media formats to deliver automated, highly tailored, and visually engaging cinematic outputs.

Get API Key
Pika API

Models Version

WELCOME BONUS

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

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

Claim Your Cashback →

Pika H3 Flex API Documentation

Generate a video with sound from a text prompt with Pika H3 Flex. You choose the length (duration, 3 to 15 seconds), the resolution (resolution, 480p, 768p, 1080p, 2k or 4k) and the frame shape (aspect_ratio). 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/pika-h3-flex/v1/text-to-video

Authentication

All requests require an API key passed via header.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour API subscription key

Text to Video - Pika H3 Flex

Request Code

POST https://gateway.pixazo.ai/pika-h3-flex/v1/text-to-video
Content-Type: application/json
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

{
  "prompt": "A red kite flies over a green hill on a sunny day, its tail ribbons fluttering in a gentle wind.",
  "duration": 5,
  "resolution": "768p"
}
import requests

url = "https://gateway.pixazo.ai/pika-h3-flex/v1/text-to-video"
headers = {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
  "prompt": "A red kite flies over a green hill on a sunny day, its tail ribbons fluttering in a gentle wind.",
  "duration": 5,
  "resolution": "768p"
}

resp = requests.post(url, json=data, headers=headers)
print(resp.json())
const res = await fetch("https://gateway.pixazo.ai/pika-h3-flex/v1/text-to-video", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
  },
  body: JSON.stringify({
  "prompt": "A red kite flies over a green hill on a sunny day, its tail ribbons fluttering in a gentle wind.",
  "duration": 5,
  "resolution": "768p"
})
});
console.log(await res.json());
curl -X POST 'https://gateway.pixazo.ai/pika-h3-flex/v1/text-to-video' \
  -H 'Content-Type: application/json' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
  --data-raw '{"prompt": "A red kite flies over a green hill on a sunny day, its tail ribbons fluttering in a gentle wind.", "duration": 5, "resolution": "768p"}'

Output

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

Webhook (Optional)

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

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

Example: enable Webhook

curl -X POST 'https://gateway.pixazo.ai/pika-h3-flex/v1/text-to-video' \
  -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 red kite flies over a green hill on a sunny day, its tail ribbons fluttering in a gentle wind.", "duration": 5, "resolution": "768p"}'

Callback Payload (success)

{
  "request_id": "pika-h3-flex_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "pika-h3-flex",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/{request_id}/output.mp4"
    ],
    "media_type": "video/mp4"
  },
  "created_at": "2026-10-09T10:04:54.387Z",
  "completed_at": "2026-10-09 10:06:21"
}

Failure callback shape

{
  "request_id": "pika-h3-flex_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "pika-h3-flex",
  "error": "Description of the failure"
}

Delivery semantics

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

Request Parameters

ParameterRequiredTypeDefaultAllowed values / rangeDescription
promptYesstring—Non-empty text, up to 8000 charactersWhat happens in the video: the scene, the action, the camera movement, the sound and the mood.
durationNointeger53–15Requested length of the video in whole seconds. Billing is per second of output: this length at 480p and 768p, the rendered length at 1080p, 2k and 4k (see How Billing Is Measured).
resolutionNostring"768p"480p, 768p, 1080p, 2k, 4kOutput resolution, written exactly as listed. Each step up costs more per second of output; 480p and 768p are made natively, higher resolutions are made at 768p, then upscaled, and billed by their rendered length.
aspect_ratioNostringAutomaticauto, 21:9, 16:9, 3:2, 4:3, 5:4, 1:1, 4:5, 3:4, 2:3, 9:16, 9:21Frame shape of the video, written exactly as listed (see Aspect Ratio). It does not change the amount billed.
rewriteNobooleantruetrue, falsetrue improves your prompt before the video is made; false uses it exactly as written. It does not change the amount billed.
seedNointegerRandom0–9007199254740991Seed for the random generator; leave it out for a random seed. It does not change the amount billed.
output_modeNostring"video"video, audio-stemsWhat is returned. video: the video with its sound. audio-stems: the same video, plus its sound as 3 separate WAV files (Dialogue, Music and Effect) in output.stems; the stems are billed on top of the video (see How Billing Is Measured).
channel_modeNostring"mono"mono, stereoThe channels of the WAV stems; used only with output_mode audio-stems. It does not change the video's sound or the amount billed.

Good to know

  • Each request returns one video. batch_size, num_images, number_of_images, n and count are rejected — send one request per video.
  • Set the length with duration, in whole seconds from 3 to 15 (5 when you leave it out); seconds, num_frames, frames_per_second and music_length_ms are rejected.
  • Set the resolution with resolution: 480p, 768p, 1080p, 2k or 4k, written exactly as listed (768p when you leave it out).
  • Send every field at the top level of the JSON body, with the text in prompt; parameters, content and text are rejected.
  • Text to video takes no images or references: image, last_frame_image, references, image_url and image_urls are rejected (use Image to Video for first and last frames, and Reference to Video for reference images and audio).
  • mode is taken only by the prompt rewriter, and rejected here.
  • Omit a field instead of sending null.
  • Use the JSON types shown: duration and seed are whole numbers (5, not "5"), and rewrite is true or false, not a string.
  • Results are always returned as a URL in output.media_url: one MP4 file with sound per request. With output_mode audio-stems, output.stems also lists the 3 WAV stems.
  • Webhooks are set with the X-Webhook-URL / X-Webhook-Mode headers; webhook_url and callback_url in the JSON body are rejected.

Length and Resolution

Set duration to the length you want in whole seconds, from 3 to 15; 5 applies when you leave it out. Set resolution to one of the values below; 768p applies when you leave it out. Billing is per second of output at the rate for the requested resolution, so a longer or higher-resolution video costs more. At 1080p, 2k and 4k the billed length is the rendered length: the upscaler renders whole 17-frame blocks at 24 fps, so it can be slightly longer than duration (for example, 6 seconds bills about 6.58 seconds).

resolutionNote
480pMade natively; the lowest cost per second of output
768pThe default; made natively
1080pMade at 768p, then upscaled; billed by the rendered length
2kMade at 768p, then upscaled; billed by the rendered length
4kMade at 768p, then upscaled; billed by the rendered length; the highest cost per second of output

Example: an 8-second vertical video at 1080p

{
  "prompt": "A paper boat drifts down a rain-soaked street at dusk, reflections shimmering on the water.",
  "aspect_ratio": "9:16",
  "duration": 8,
  "resolution": "1080p"
}

Aspect Ratio

Set aspect_ratio to auto, 21:9, 16:9, 3:2, 4:3, 5:4, 1:1, 4:5, 3:4, 2:3, 9:16 or 9:21. auto lets the model pick the frame shape from your prompt. When you leave it out, auto applies while rewrite is on; with rewrite set to false, the video is 16:9. A ratio you set always wins. It does not change the amount billed.

Prompt Rewrite

rewrite is true when you leave it out: Pika H3 Flex improves your prompt before it makes the video. Set rewrite to false to use your prompt exactly as written, for example a prompt you already rewrote with the Prompt Rewriter. It does not change the amount billed.

Example: use the prompt exactly as written, at 480p

{
  "prompt": "Waves roll onto a quiet beach at sunrise, the camera slowly tracking along the shoreline.",
  "rewrite": false,
  "duration": 5,
  "resolution": "480p"
}

Audio

Every video comes with sound, made together with the picture; there is no setting to turn it off, and it does not change the amount billed. With output_mode audio-stems you also get that sound as 3 separate WAV files — Dialogue, Music and Effect — listed in output.stems (each with name, url and duration_s), while output.media_url still holds the video. channel_mode (mono, the default, or stereo) sets the channels of the stems only. The stems are billed on top of the video (see How Billing Is Measured).

Example Request

{
  "prompt": "A red kite flies over a green hill on a sunny day, its tail ribbons fluttering in a gentle wind.",
  "duration": 5,
  "resolution": "768p"
}

Example Response

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

Request Headers

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

Response Handling

Status CodeMeaning
202Accepted — request queued; returns request_id and polling_url.
400Invalid request — a required field is missing, a value has the wrong type, is out of range or is not one of the allowed values, or a field this operation does not accept was sent. The message says what to fix.
401Unauthorized — missing or invalid subscription key.
402Insufficient balance for the hold this request needs.
429Too many requests.
500Internal server error.

Parameter problems are caught when you submit and returned as a 400, before any hold is placed on your balance. Problems that need the model to run are reported through the status endpoint as status: "ERROR", with a message in error saying what went wrong. Failed requests are not billed — the hold is released in full.

ConditionHow it surfaces
Missing or invalid subscription keysynchronous 401
Balance too low for the holdsynchronous 402
Missing or empty prompt, prompt not a string, or longer than 8000 characterssynchronous 400
resolution not one of the allowed values (written exactly as listed)synchronous 400
aspect_ratio not one of the allowed values (written exactly as listed)synchronous 400
duration not a whole number from 3 to 15 — for example 2, 16 or the string "5"synchronous 400
seed not a whole number from 0 to 9007199254740991 — for example -1 or the string "0"synchronous 400
rewrite not true or falsesynchronous 400
output_mode other than video or audio-stemssynchronous 400
channel_mode not one of the allowed values (written exactly as listed)synchronous 400
batch_size, num_images, number_of_images, n, count (one video per request)synchronous 400
seconds, num_frames, frames_per_second, music_length_ms (set the length with duration, in whole seconds)synchronous 400
parameters, content, text (send the fields at the top level of the JSON body, the text in prompt)synchronous 400
image_url, image_urls (images go to Image to Video (image, last_frame_image) or Reference to Video (references))synchronous 400
image, last_frame_image, references (text to video takes no images or references: use Image to Video or Reference to Video)synchronous 400
mode (only the prompt rewriter takes it)synchronous 400
webhook_url, callback_url in the JSON body (use the X-Webhook-URL / X-Webhook-Mode headers)synchronous 400
A prompt the model refuses, for example under its content policystatus: "ERROR"
A temporary problem on the provider side (nothing is charged; try again later)status: "ERROR"

Example error responses

A refused request returns error, a message that joins every problem found, and the same problems one by one in violations.

Missing prompt (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'prompt' is required",
  "violations": [
    "'prompt' is required"
  ]
}

A value that is not allowed (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'resolution' must be one of: \"480p\", \"768p\", \"1080p\", \"2k\", \"4k\" (got \"4K\")",
  "violations": [
    "'resolution' must be one of: \"480p\", \"768p\", \"1080p\", \"2k\", \"4k\" (got \"4K\")"
  ]
}

A value out of range (synchronous 400)

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

A number sent as a string (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'duration' must be integer (got string)",
  "violations": [
    "'duration' must be integer (got string)"
  ]
}

More than one video per request (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'num_images' must be one of:  (got 2); 'num_images' is not supported: Pika H3 Flex returns one video per request. Send one request per video.",
  "violations": [
    "'num_images' must be one of:  (got 2)",
    "'num_images' is not supported: Pika H3 Flex returns one video per request. Send one request per video."
  ]
}

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. Treat any status other than QUEUED, PROCESSING or COMPLETED as a failure.

Endpoint

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

cURL example

curl 'https://gateway.pixazo.ai/v2/requests/status/pika-h3-flex_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY'

Completed response

{
  "request_id": "pika-h3-flex_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "pika-h3-flex",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/{request_id}/output.mp4"
    ],
    "media_type": "video/mp4"
  },
  "created_at": "2026-10-09T10:04:54.387Z",
  "completed_at": "2026-10-09 10:06:21"
}

Response Fields

FieldTypeDescription
request_idstringUnique request identifier.
statusstringQUEUED, PROCESSING, COMPLETED or ERROR.
model_idstringThe model that handled the request — pika-h3-flex for this endpoint.
output.media_urlarray of stringsURL of the video (one MP4 file per request).
output.media_typestringvideo/mp4.
output.stemsarray of objectsOnly with output_mode audio-stems: the 3 WAV stems, each {name, url, duration_s}, with name Dialogue, Music or Effect.
created_atstringRequest creation timestamp.
completed_atstringCompletion timestamp.
errorstringError message when status is ERROR.
polling_urlstringStatus URL for this request (submit response only).

Status Values & Flow

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

Typical workflow

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

How Billing Is Measured

Billing is measured per second of output, at the rate for the requested resolution: the amount is the per-second rate for resolution (768p when you leave it out) times the billed length. At 480p and 768p the billed length is duration (5 seconds when you leave it out). At 1080p, 2k and 4k the billed length is the rendered length: the upscaler renders whole 17-frame blocks at 24 fps, so it can be slightly longer than duration (for example, 6 seconds bills about 6.58 seconds). Each step up in resolution costs more per second, from 480p (the lowest rate) to 4k (the highest). The prompt, seed, aspect ratio, prompt rewrite and the sound do not change the amount. The amount is placed as a hold when the request is submitted and released in full if the request fails. With output_mode audio-stems, the 3 stems are billed on top of the video, per second of each stem (each stem is about as long as the rendered video); the hold covers them, and when the video is done you are billed for the stems actually delivered. The current rate is shown in the pricing panel on this page.

Pika H3 Flex API Pricing — Per-Second Rates

Billed per second of output at the rate for the requested resolution; at 1080p and above, the billed length is the rendered length (the upscaler renders whole 17-frame blocks at 24 fps), so 6 s bills about 6.58 s. The prompt, seed, aspect ratio, prompt rewrite and the sound do not change the amount.

ResolutionPrice (USD)
480p$0.0105/sec
768p$0.021/sec
1080p$0.0368/sec
2k$0.042/sec
4k$0.084/sec
Image to Video

Pika H3 Flex API Documentation

Animate an image with Pika H3 Flex: send the first frame in image, the last frame in last_frame_image, or both, with a prompt describing how the video unfolds. The video comes with sound. You choose the length (duration, 3 to 15 seconds) and the resolution (resolution, 480p, 768p, 1080p, 2k or 4k). 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/pika-h3-flex/v1/image-to-video

Authentication

All requests require an API key passed via header.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour API subscription key

Image to Video - Pika H3 Flex

Request Code

POST https://gateway.pixazo.ai/pika-h3-flex/v1/image-to-video
Content-Type: application/json
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

{
  "image": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg",
  "prompt": "The person turns toward the camera and smiles as a light breeze moves her hair.",
  "duration": 5,
  "resolution": "768p"
}
import requests

url = "https://gateway.pixazo.ai/pika-h3-flex/v1/image-to-video"
headers = {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
  "image": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg",
  "prompt": "The person turns toward the camera and smiles as a light breeze moves her hair.",
  "duration": 5,
  "resolution": "768p"
}

resp = requests.post(url, json=data, headers=headers)
print(resp.json())
const res = await fetch("https://gateway.pixazo.ai/pika-h3-flex/v1/image-to-video", {
  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",
  "prompt": "The person turns toward the camera and smiles as a light breeze moves her hair.",
  "duration": 5,
  "resolution": "768p"
})
});
console.log(await res.json());
curl -X POST 'https://gateway.pixazo.ai/pika-h3-flex/v1/image-to-video' \
  -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", "prompt": "The person turns toward the camera and smiles as a light breeze moves her hair.", "duration": 5, "resolution": "768p"}'

Output

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

Webhook (Optional)

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

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

Example: enable Webhook

curl -X POST 'https://gateway.pixazo.ai/pika-h3-flex/v1/image-to-video' \
  -H 'Content-Type: application/json' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
  -H 'X-Webhook-URL: https://your-server.com/webhook' \
  --data-raw '{"image": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg", "prompt": "The person turns toward the camera and smiles as a light breeze moves her hair.", "duration": 5, "resolution": "768p"}'

Callback Payload (success)

{
  "request_id": "pika-h3-flex_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "pika-h3-flex",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/{request_id}/output.mp4"
    ],
    "media_type": "video/mp4"
  },
  "created_at": "2026-10-09T10:04:54.387Z",
  "completed_at": "2026-10-09 10:06:21"
}

Failure callback shape

{
  "request_id": "pika-h3-flex_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "pika-h3-flex",
  "error": "Description of the failure"
}

Delivery semantics

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

Request Parameters

ParameterRequiredTypeDefaultAllowed values / rangeDescription
imageYes, unless last_frame_image is sentstring—A publicly reachable http(s) URL, up to 8192 charactersThe first frame of the video: a static PNG, JPEG or WebP image, up to 24 MiB and 40 million pixels.
last_frame_imageYes, unless image is sentstring—A publicly reachable http(s) URL, up to 8192 charactersThe last frame of the video, with the same formats and limits as image.
promptYesstring—Non-empty text, up to 8000 charactersHow the video unfolds from your frame: the motion, the camera movement, the sound and the mood.
durationNointeger53–15Requested length of the video in whole seconds. Billing is per second of output: this length at 480p and 768p, the rendered length at 1080p, 2k and 4k (see How Billing Is Measured).
resolutionNostring"768p"480p, 768p, 1080p, 2k, 4kOutput resolution, written exactly as listed. Each step up costs more per second of output; 480p and 768p are made natively, higher resolutions are made at 768p, then upscaled, and billed by their rendered length.
aspect_ratioNostringAutomaticauto, 21:9, 16:9, 3:2, 4:3, 5:4, 1:1, 4:5, 3:4, 2:3, 9:16, 9:21Frame shape of the video, written exactly as listed (see First and Last Frame). It does not change the amount billed.
rewriteNobooleantruetrue, falsetrue improves your prompt before the video is made; false uses it exactly as written. It does not change the amount billed.
seedNointegerRandom0–9007199254740991Seed for the random generator; leave it out for a random seed. It does not change the amount billed.
output_modeNostring"video"video, audio-stemsWhat is returned. video: the video with its sound. audio-stems: the same video, plus its sound as 3 separate WAV files (Dialogue, Music and Effect) in output.stems; the stems are billed on top of the video (see How Billing Is Measured).
channel_modeNostring"mono"mono, stereoThe channels of the WAV stems; used only with output_mode audio-stems. It does not change the video's sound or the amount billed.

Good to know

  • Each request returns one video. batch_size, num_images, number_of_images, n and count are rejected — send one request per video.
  • Set the length with duration, in whole seconds from 3 to 15 (5 when you leave it out); seconds, num_frames, frames_per_second and music_length_ms are rejected.
  • Set the resolution with resolution: 480p, 768p, 1080p, 2k or 4k, written exactly as listed (768p when you leave it out).
  • Send every field at the top level of the JSON body, with the text in prompt; parameters, content and text are rejected.
  • Send the first frame in image, the last frame in last_frame_image, or both; references, image_url and image_urls are rejected (reference media go to Reference to Video).
  • mode is taken only by the prompt rewriter, and rejected here.
  • Omit a field instead of sending null.
  • Use the JSON types shown: duration and seed are whole numbers (5, not "5"), and rewrite is true or false, not a string.
  • Results are always returned as a URL in output.media_url: one MP4 file with sound per request. With output_mode audio-stems, output.stems also lists the 3 WAV stems.
  • Webhooks are set with the X-Webhook-URL / X-Webhook-Mode headers; webhook_url and callback_url in the JSON body are rejected.

Length and Resolution

Set duration to the length you want in whole seconds, from 3 to 15; 5 applies when you leave it out. Set resolution to one of the values below; 768p applies when you leave it out. Billing is per second of output at the rate for the requested resolution, so a longer or higher-resolution video costs more. At 1080p, 2k and 4k the billed length is the rendered length: the upscaler renders whole 17-frame blocks at 24 fps, so it can be slightly longer than duration (for example, 6 seconds bills about 6.58 seconds).

resolutionNote
480pMade natively; the lowest cost per second of output
768pThe default; made natively
1080pMade at 768p, then upscaled; billed by the rendered length
2kMade at 768p, then upscaled; billed by the rendered length
4kMade at 768p, then upscaled; billed by the rendered length; the highest cost per second of output

Example: an 8-second vertical video at 1080p

{
  "image": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg",
  "prompt": "The camera slowly pushes in while the person looks up and laughs.",
  "aspect_ratio": "9:16",
  "duration": 8,
  "resolution": "1080p"
}

First and Last Frame

  • Send the first frame in image, the last frame in last_frame_image, or both: at least one of them is required. Each is one publicly reachable http(s) URL; a list is rejected.
  • Use static PNG, JPEG or WebP images of up to 24 MiB and 40 million pixels. A URL that cannot be downloaded is refused when you submit (a 400 with error Asset proxy failed); an image the model cannot use ends the request with status: "ERROR". Either way nothing is charged.
  • Set the frame shape with aspect_ratio (auto, 21:9, 16:9, 3:2, 4:3, 5:4, 1:1, 4:5, 3:4, 2:3, 9:16 or 9:21): your images are resized and center-cropped to it. auto follows the first image you send. When you leave it out, auto applies while rewrite is on; with rewrite set to false, the first image you send sets the shape. It does not change the amount billed.
  • Describe how the video unfolds in prompt (required).

Example: a video that ends on your image, with a fixed seed at 480p

{
  "last_frame_image": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg",
  "prompt": "A slow pull-in that ends on this portrait as the person looks into the camera.",
  "seed": 42,
  "duration": 5,
  "resolution": "480p"
}

Prompt Rewrite

rewrite is true when you leave it out: Pika H3 Flex improves your prompt before it makes the video. Set rewrite to false to use your prompt exactly as written, for example a prompt you already rewrote with the Prompt Rewriter. It does not change the amount billed.

Example: use the prompt exactly as written, at 480p

{
  "image": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg",
  "prompt": "The person waves at the camera.",
  "rewrite": false,
  "duration": 5,
  "resolution": "480p"
}

Audio

Every video comes with sound, made together with the picture; there is no setting to turn it off, and it does not change the amount billed. With output_mode audio-stems you also get that sound as 3 separate WAV files — Dialogue, Music and Effect — listed in output.stems (each with name, url and duration_s), while output.media_url still holds the video. channel_mode (mono, the default, or stereo) sets the channels of the stems only. The stems are billed on top of the video (see How Billing Is Measured).

Example Request

{
  "image": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg",
  "prompt": "The person turns toward the camera and smiles as a light breeze moves her hair.",
  "duration": 5,
  "resolution": "768p"
}

Example Response

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

Request Headers

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

Response Handling

Status CodeMeaning
202Accepted — request queued; returns request_id and polling_url.
400Invalid request — a required field is missing, a value has the wrong type, is out of range or is not one of the allowed values, a field this operation does not accept was sent, or an input file could not be downloaded (error: Asset proxy failed). The message says what to fix.
401Unauthorized — missing or invalid subscription key.
402Insufficient balance for the hold this request needs.
429Too many requests.
500Internal server error.

Parameter problems are caught when you submit and returned as a 400, before any hold is placed on your balance. Problems that need the model to run are reported through the status endpoint as status: "ERROR", with a message in error saying what went wrong. Failed requests are not billed — the hold is released in full.

ConditionHow it surfaces
Missing or invalid subscription keysynchronous 401
Balance too low for the holdsynchronous 402
Missing or empty prompt, prompt not a string, or longer than 8000 characterssynchronous 400
Neither image nor last_frame_image, or one of them not a single http(s) URL of at most 8192 characterssynchronous 400
resolution not one of the allowed values (written exactly as listed)synchronous 400
aspect_ratio not one of the allowed values (written exactly as listed)synchronous 400
duration not a whole number from 3 to 15 — for example 2, 16 or the string "5"synchronous 400
seed not a whole number from 0 to 9007199254740991 — for example -1 or the string "0"synchronous 400
rewrite not true or falsesynchronous 400
output_mode other than video or audio-stemssynchronous 400
channel_mode not one of the allowed values (written exactly as listed)synchronous 400
batch_size, num_images, number_of_images, n, count (one video per request)synchronous 400
seconds, num_frames, frames_per_second, music_length_ms (set the length with duration, in whole seconds)synchronous 400
parameters, content, text (send the fields at the top level of the JSON body, the text in prompt)synchronous 400
image_url, image_urls (send the frames in image and last_frame_image)synchronous 400
references (reference media go to Reference to Video)synchronous 400
mode (only the prompt rewriter takes it)synchronous 400
webhook_url, callback_url in the JSON body (use the X-Webhook-URL / X-Webhook-Mode headers)synchronous 400
An image or last_frame_image URL that cannot be downloaded (nothing is charged)synchronous 400 (error: Asset proxy failed)
An image the model cannot use, for example an unsupported format, over 24 MiB or over 40 million pixels (nothing is charged)status: "ERROR"
A prompt or media the model refuses, for example under its content policystatus: "ERROR"
A temporary problem on the provider side (nothing is charged; try again later)status: "ERROR"

Example error responses

A refused request returns error, a message that joins every problem found, and the same problems one by one in violations.

Missing prompt (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'prompt' is required",
  "violations": [
    "'prompt' is required"
  ]
}

A value that is not allowed (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'resolution' must be one of: \"480p\", \"768p\", \"1080p\", \"2k\", \"4k\" (got \"4K\")",
  "violations": [
    "'resolution' must be one of: \"480p\", \"768p\", \"1080p\", \"2k\", \"4k\" (got \"4K\")"
  ]
}

A value out of range (synchronous 400)

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

A number sent as a string (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'duration' must be integer (got string)",
  "violations": [
    "'duration' must be integer (got string)"
  ]
}

Neither image nor last_frame_image (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'image' is required unless 'last_frame_image' is provided",
  "violations": [
    "'image' is required unless 'last_frame_image' is provided"
  ]
}

More than one video per request (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'num_images' must be one of:  (got 2); 'num_images' is not supported: Pika H3 Flex returns one video per request. Send one request per video.",
  "violations": [
    "'num_images' must be one of:  (got 2)",
    "'num_images' is not supported: Pika H3 Flex returns one video per request. Send one request per video."
  ]
}

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. Treat any status other than QUEUED, PROCESSING or COMPLETED as a failure.

Endpoint

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

cURL example

curl 'https://gateway.pixazo.ai/v2/requests/status/pika-h3-flex_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY'

Completed response

{
  "request_id": "pika-h3-flex_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "pika-h3-flex",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/{request_id}/output.mp4"
    ],
    "media_type": "video/mp4"
  },
  "created_at": "2026-10-09T10:04:54.387Z",
  "completed_at": "2026-10-09 10:06:21"
}

Response Fields

FieldTypeDescription
request_idstringUnique request identifier.
statusstringQUEUED, PROCESSING, COMPLETED or ERROR.
model_idstringThe model that handled the request — pika-h3-flex for this endpoint.
output.media_urlarray of stringsURL of the video (one MP4 file per request).
output.media_typestringvideo/mp4.
output.stemsarray of objectsOnly with output_mode audio-stems: the 3 WAV stems, each {name, url, duration_s}, with name Dialogue, Music or Effect.
created_atstringRequest creation timestamp.
completed_atstringCompletion timestamp.
errorstringError message when status is ERROR.
polling_urlstringStatus URL for this request (submit response only).

Status Values & Flow

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

Typical workflow

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

How Billing Is Measured

Billing is measured per second of output, at the rate for the requested resolution: the amount is the per-second rate for resolution (768p when you leave it out) times the billed length. At 480p and 768p the billed length is duration (5 seconds when you leave it out). At 1080p, 2k and 4k the billed length is the rendered length: the upscaler renders whole 17-frame blocks at 24 fps, so it can be slightly longer than duration (for example, 6 seconds bills about 6.58 seconds). Each step up in resolution costs more per second, from 480p (the lowest rate) to 4k (the highest). The prompt, seed, aspect ratio, prompt rewrite, the frame images and the sound do not change the amount. The amount is placed as a hold when the request is submitted and released in full if the request fails. With output_mode audio-stems, the 3 stems are billed on top of the video, per second of each stem (each stem is about as long as the rendered video); the hold covers them, and when the video is done you are billed for the stems actually delivered. The current rate is shown in the pricing panel on this page.

Pika H3 Flex API Pricing — Per-Second Rates

Billed per second of output at the rate for the requested resolution; at 1080p and above, the billed length is the rendered length (the upscaler renders whole 17-frame blocks at 24 fps), so 6 s bills about 6.58 s. The frame images, prompt, seed, aspect ratio, prompt rewrite and the sound do not change the amount.

ResolutionPrice (USD)
480p$0.0105/sec
768p$0.021/sec
1080p$0.0368/sec
2k$0.042/sec
4k$0.084/sec
Reference to Video

Pika H3 Flex API Documentation

Generate a video with sound from reference images, videos and audio with Pika H3 Flex: send up to 9 images, 3 video clips and 3 audio clips, 12 in all, with at least one image or video, in references, and cite them in prompt as @Image1, @Video1, @Audio1 and so on. You choose the length (3 to 15 seconds), the resolution (480p, 768p, 1080p, 2k or 4k) and the frame shape (aspect_ratio). 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/pika-h3-flex/v1/reference-to-video

Authentication

All requests require an API key passed via header.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour API subscription key

Reference to Video - Pika H3 Flex

Request Code

POST https://gateway.pixazo.ai/pika-h3-flex/v1/reference-to-video
Content-Type: application/json
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

{
  "prompt": "@Image1 comes alive and speaks in the voice of @Audio1.",
  "references": [
    {
      "type": "image",
      "url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"
    },
    {
      "type": "audio",
      "url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/audio/speech-6s.mp3"
    }
  ],
  "duration": 5,
  "resolution": "768p"
}
import requests

url = "https://gateway.pixazo.ai/pika-h3-flex/v1/reference-to-video"
headers = {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
  "prompt": "@Image1 comes alive and speaks in the voice of @Audio1.",
  "references": [
    {
      "type": "image",
      "url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"
    },
    {
      "type": "audio",
      "url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/audio/speech-6s.mp3"
    }
  ],
  "duration": 5,
  "resolution": "768p"
}

resp = requests.post(url, json=data, headers=headers)
print(resp.json())
const res = await fetch("https://gateway.pixazo.ai/pika-h3-flex/v1/reference-to-video", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
  },
  body: JSON.stringify({
  "prompt": "@Image1 comes alive and speaks in the voice of @Audio1.",
  "references": [
    {
      "type": "image",
      "url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"
    },
    {
      "type": "audio",
      "url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/audio/speech-6s.mp3"
    }
  ],
  "duration": 5,
  "resolution": "768p"
})
});
console.log(await res.json());
curl -X POST 'https://gateway.pixazo.ai/pika-h3-flex/v1/reference-to-video' \
  -H 'Content-Type: application/json' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
  --data-raw '{"prompt": "@Image1 comes alive and speaks in the voice of @Audio1.", "references": [{"type": "image", "url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"}, {"type": "audio", "url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/audio/speech-6s.mp3"}], "duration": 5, "resolution": "768p"}'

Output

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

Webhook (Optional)

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

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

Example: enable Webhook

curl -X POST 'https://gateway.pixazo.ai/pika-h3-flex/v1/reference-to-video' \
  -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": "@Image1 comes alive and speaks in the voice of @Audio1.", "references": [{"type": "image", "url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"}, {"type": "audio", "url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/audio/speech-6s.mp3"}], "duration": 5, "resolution": "768p"}'

Callback Payload (success)

{
  "request_id": "pika-h3-flex_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "pika-h3-flex",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/{request_id}/output.mp4"
    ],
    "media_type": "video/mp4"
  },
  "created_at": "2026-10-09T10:04:54.387Z",
  "completed_at": "2026-10-09 10:06:21"
}

Failure callback shape

{
  "request_id": "pika-h3-flex_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "pika-h3-flex",
  "error": "Description of the failure"
}

Delivery semantics

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

Request Parameters

ParameterRequiredTypeDefaultAllowed values / rangeDescription
promptYesstring—Non-empty text, up to 8000 charactersThe new scene. Cite your references by type and position: @Image1, @Image2, @Video1, @Audio1 and so on.
referencesYesarray—1–12 objectsYour reference media, in order: objects {"type": "image", "url": "https://..."}, {"type": "video", "url": "https://..."} or {"type": "audio", "url": "https://..."}; up to 9 images, 3 video clips and 3 audio clips, 12 in all, with at least one image or video. Each url is a public https URL of at most 8192 characters. Each second of reference video is billed (see How Billing Is Measured).
durationNointeger53–15Requested length of the video in whole seconds. Billing is per second of output: this length at 480p and 768p, the rendered length at 1080p, 2k and 4k, plus any seconds of reference video (see How Billing Is Measured).
resolutionNostring"768p"480p, 768p, 1080p, 2k, 4kOutput resolution, written exactly as listed. Each step up costs more per second of output; 480p and 768p are made natively, higher resolutions are made at 768p, then upscaled, and billed by their rendered length.
aspect_ratioNostringAutomaticauto, 21:9, 16:9, 3:2, 4:3, 5:4, 1:1, 4:5, 3:4, 2:3, 9:16, 9:21Frame shape of the video, written exactly as listed (see Aspect Ratio). It does not change the amount billed.
rewriteNobooleantruetrue, falsetrue improves your prompt before the video is made; false uses it exactly as written. It does not change the amount billed.
seedNointegerRandom0–9007199254740991Seed for the random generator; leave it out for a random seed. It does not change the amount billed.
output_modeNostring"video"video, audio-stemsWhat is returned. video: the video with its sound. audio-stems: the same video, plus its sound as 3 separate WAV files (Dialogue, Music and Effect) in output.stems; the stems are billed on top of the video (see How Billing Is Measured).
channel_modeNostring"mono"mono, stereoThe channels of the WAV stems; used only with output_mode audio-stems. It does not change the video's sound or the amount billed.

Good to know

  • Each request returns one video. batch_size, num_images, number_of_images, n and count are rejected — send one request per video.
  • Set the length with duration, in whole seconds from 3 to 15 (5 when you leave it out); seconds, num_frames, frames_per_second and music_length_ms are rejected.
  • Set the resolution with resolution: 480p, 768p, 1080p, 2k or 4k, written exactly as listed (768p when you leave it out).
  • Send every field at the top level of the JSON body, with the text in prompt; parameters, content and text are rejected.
  • Send your media in references, in order; image, last_frame_image, image_url and image_urls are rejected (first and last frames go to Image to Video).
  • mode is taken only by the prompt rewriter, and rejected here.
  • Omit a field instead of sending null.
  • Use the JSON types shown: duration and seed are whole numbers (5, not "5"), and rewrite is true or false, not a string.
  • Results are always returned as a URL in output.media_url: one MP4 file with sound per request. With output_mode audio-stems, output.stems also lists the 3 WAV stems.
  • Webhooks are set with the X-Webhook-URL / X-Webhook-Mode headers; webhook_url and callback_url in the JSON body are rejected.

Length and Resolution

Set duration to the length you want in whole seconds, from 3 to 15; 5 applies when you leave it out. Set resolution to one of the values below; 768p applies when you leave it out. Billing is per second of output at the rate for the requested resolution, so a longer or higher-resolution video costs more. At 1080p, 2k and 4k the billed length is the rendered length: the upscaler renders whole 17-frame blocks at 24 fps, so it can be slightly longer than duration (for example, 6 seconds bills about 6.58 seconds).

resolutionNote
480pMade natively; the lowest cost per second of output
768pThe default; made natively
1080pMade at 768p, then upscaled; billed by the rendered length
2kMade at 768p, then upscaled; billed by the rendered length
4kMade at 768p, then upscaled; billed by the rendered length; the highest cost per second of output

Example: a 10-second video at 1080p

{
  "prompt": "The person in @Image1 walks along a beach at sunset, waves rolling in behind her.",
  "references": [
    {
      "type": "image",
      "url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"
    }
  ],
  "aspect_ratio": "16:9",
  "duration": 10,
  "resolution": "1080p"
}

References

  • Send up to 9 images, 3 video clips and 3 audio clips, 12 in all, with at least one image or video, in references: each one an object with type (image, video or audio) and url (a public https URL of at most 8192 characters), and nothing else.
  • Cite them in prompt by type and position: the first image is @Image1, the second @Image2, the first video clip @Video1, the first audio clip @Audio1, and so on.
  • Images: PNG, JPEG or WebP, up to 40 million pixels each, and between 1:4 (tall) and 4:1 (wide) in shape. Video clips: 2 to 15 seconds each, and at most 15 seconds of video in all; a large video is scaled down in proportion before the video is made. Audio clips: 2 to 15 seconds each, and at most 15 seconds of audio in all.
  • Each file may be up to 50 MiB: a file over 24 MiB is compressed to 24 MiB before the video is made (a smaller one is used as sent), and after that all files together must come to at most about 48 MiB.
  • Each second of reference video is billed at the same per-second rate as the output, on top of the output (see How Billing Is Measured). Images and audio clips do not change the amount.
  • A reference URL that cannot be downloaded is refused when you submit (a 400 with error Asset proxy failed); a file the model cannot use ends the request with status: "ERROR". Either way nothing is charged.

Example: one image and one voice clip in a square frame

{
  "prompt": "The person in @Image1 sits at a street cafe and tells a short story in the voice of @Audio1.",
  "references": [
    {
      "type": "image",
      "url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"
    },
    {
      "type": "audio",
      "url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/audio/speech-6s.mp3"
    }
  ],
  "aspect_ratio": "1:1",
  "duration": 6,
  "resolution": "480p"
}

Example: one image and one video clip for the motion

{
  "prompt": "The person in @Image1 dances with the same moves as the dancer in @Video1.",
  "references": [
    {
      "type": "image",
      "url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"
    },
    {
      "type": "video",
      "url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/video/input-5s.mp4"
    }
  ],
  "aspect_ratio": "16:9",
  "duration": 5,
  "resolution": "480p"
}

Aspect Ratio

Set aspect_ratio to auto, 21:9, 16:9, 3:2, 4:3, 5:4, 1:1, 4:5, 3:4, 2:3, 9:16 or 9:21. auto lets the model pick the frame shape from your prompt. When you leave it out, auto applies while rewrite is on; with rewrite set to false, the video is 16:9. A ratio you set always wins. It does not change the amount billed.

Prompt Rewrite

rewrite is true when you leave it out: Pika H3 Flex improves your prompt before it makes the video. Set rewrite to false to use your prompt exactly as written, for example a prompt you already rewrote with the Prompt Rewriter. It does not change the amount billed.

Example: use the prompt exactly as written, at 480p

{
  "prompt": "@Image1 waves at the camera in a sunny park.",
  "references": [
    {
      "type": "image",
      "url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"
    }
  ],
  "rewrite": false,
  "duration": 5,
  "resolution": "480p"
}

Audio

Every video comes with sound, made together with the picture; there is no setting to turn it off, and it does not change the amount billed. With output_mode audio-stems you also get that sound as 3 separate WAV files — Dialogue, Music and Effect — listed in output.stems (each with name, url and duration_s), while output.media_url still holds the video. channel_mode (mono, the default, or stereo) sets the channels of the stems only. The stems are billed on top of the video (see How Billing Is Measured).

Example Request

{
  "prompt": "@Image1 comes alive and speaks in the voice of @Audio1.",
  "references": [
    {
      "type": "image",
      "url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"
    },
    {
      "type": "audio",
      "url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/audio/speech-6s.mp3"
    }
  ],
  "duration": 5,
  "resolution": "768p"
}

Example Response

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

Request Headers

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

Response Handling

Status CodeMeaning
202Accepted — request queued; returns request_id and polling_url.
400Invalid request — a required field is missing, a value has the wrong type, is out of range or is not one of the allowed values, a field this operation does not accept was sent, or an input file could not be downloaded (error: Asset proxy failed). The message says what to fix.
401Unauthorized — missing or invalid subscription key.
402Insufficient balance for the hold this request needs.
429Too many requests.
500Internal server error.

Parameter problems are caught when you submit and returned as a 400, before any hold is placed on your balance. Problems that need the model to run are reported through the status endpoint as status: "ERROR", with a message in error saying what went wrong. Failed requests are not billed — the hold is released in full.

ConditionHow it surfaces
Missing or invalid subscription keysynchronous 401
Balance too low for the holdsynchronous 402
Missing or empty prompt, prompt not a string, or longer than 8000 characterssynchronous 400
Missing or empty referencessynchronous 400
More than 12 references, more than 9 images, 3 video clips or 3 audio clips, no image or video among them, a reference that is not an object with type and url only, or a url that is not a public https URL of at most 8192 characterssynchronous 400
resolution not one of the allowed values (written exactly as listed)synchronous 400
aspect_ratio not one of the allowed values (written exactly as listed)synchronous 400
duration not a whole number from 3 to 15 — for example 2, 16 or the string "5"synchronous 400
seed not a whole number from 0 to 9007199254740991 — for example -1 or the string "0"synchronous 400
rewrite not true or falsesynchronous 400
output_mode other than video or audio-stemssynchronous 400
channel_mode not one of the allowed values (written exactly as listed)synchronous 400
batch_size, num_images, number_of_images, n, count (one video per request)synchronous 400
seconds, num_frames, frames_per_second, music_length_ms (set the length with duration, in whole seconds)synchronous 400
parameters, content, text (send the fields at the top level of the JSON body, the text in prompt)synchronous 400
image_url, image_urls (send images in references)synchronous 400
image, last_frame_image (first and last frames go to Image to Video)synchronous 400
mode (only the prompt rewriter takes it)synchronous 400
webhook_url, callback_url in the JSON body (use the X-Webhook-URL / X-Webhook-Mode headers)synchronous 400
A reference URL that cannot be downloaded (nothing is charged)synchronous 400 (error: Asset proxy failed)
A reference the model cannot use, for example an unsupported format, a file over 50 MiB, an image taller than 1:4 or wider than 4:1, a video or audio clip shorter than 2 or longer than 15 seconds, or more than 15 seconds of video or of audio in all (nothing is charged)status: "ERROR"
A prompt or media the model refuses, for example under its content policystatus: "ERROR"
A temporary problem on the provider side (nothing is charged; try again later)status: "ERROR"

Example error responses

A refused request returns error, a message that joins every problem found, and the same problems one by one in violations.

Missing prompt (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'prompt' is required",
  "violations": [
    "'prompt' is required"
  ]
}

A value that is not allowed (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'resolution' must be one of: \"480p\", \"768p\", \"1080p\", \"2k\", \"4k\" (got \"4K\")",
  "violations": [
    "'resolution' must be one of: \"480p\", \"768p\", \"1080p\", \"2k\", \"4k\" (got \"4K\")"
  ]
}

A value out of range (synchronous 400)

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

A number sent as a string (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'duration' must be integer (got string)",
  "violations": [
    "'duration' must be integer (got string)"
  ]
}

Missing references (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'references' is required",
  "violations": [
    "'references' is required"
  ]
}

More than one video per request (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'num_images' must be one of:  (got 2); 'num_images' is not supported: Pika H3 Flex returns one video per request. Send one request per video.",
  "violations": [
    "'num_images' must be one of:  (got 2)",
    "'num_images' is not supported: Pika H3 Flex returns one video per request. Send one request per video."
  ]
}

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. Treat any status other than QUEUED, PROCESSING or COMPLETED as a failure.

Endpoint

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

cURL example

curl 'https://gateway.pixazo.ai/v2/requests/status/pika-h3-flex_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY'

Completed response

{
  "request_id": "pika-h3-flex_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "pika-h3-flex",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/{request_id}/output.mp4"
    ],
    "media_type": "video/mp4"
  },
  "created_at": "2026-10-09T10:04:54.387Z",
  "completed_at": "2026-10-09 10:06:21"
}

Response Fields

FieldTypeDescription
request_idstringUnique request identifier.
statusstringQUEUED, PROCESSING, COMPLETED or ERROR.
model_idstringThe model that handled the request — pika-h3-flex for this endpoint.
output.media_urlarray of stringsURL of the video (one MP4 file per request).
output.media_typestringvideo/mp4.
output.stemsarray of objectsOnly with output_mode audio-stems: the 3 WAV stems, each {name, url, duration_s}, with name Dialogue, Music or Effect.
created_atstringRequest creation timestamp.
completed_atstringCompletion timestamp.
errorstringError message when status is ERROR.
polling_urlstringStatus URL for this request (submit response only).

Status Values & Flow

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

Typical workflow

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

How Billing Is Measured

Billing is measured per second of output, at the rate for the requested resolution: the amount is the per-second rate for resolution (768p when you leave it out) times the billed length. At 480p and 768p the billed length is duration (5 seconds when you leave it out). At 1080p, 2k and 4k the billed length is the rendered length: the upscaler renders whole 17-frame blocks at 24 fps, so it can be slightly longer than duration (for example, 6 seconds bills about 6.58 seconds). Each step up in resolution costs more per second, from 480p (the lowest rate) to 4k (the highest). Reference to Video has its own per-second rates, higher than those of Text to Video and Image to Video. Reference videos are billed too: each second of reference video costs the same per-second rate as the output at the requested resolution, on top of the output. The prompt, seed, aspect ratio, prompt rewrite, image and audio references and the sound do not change the amount. The amount is placed as a hold when the request is submitted and released in full if the request fails. With a reference video, the hold covers the most reference video a request can carry (15 seconds); when the video is done you are billed for the seconds of reference video actually used, and the rest of the hold is released. With output_mode audio-stems, the 3 stems are billed on top of the video, per second of each stem (each stem is about as long as the rendered video); the hold covers them, and when the video is done you are billed for the stems actually delivered. The current rate is shown in the pricing panel on this page.

Pika H3 Flex API Pricing — Per-Second Rates

Billed per second of output at the Reference to Video rate for the requested resolution; at 1080p and above, the billed length is the rendered length (the upscaler renders whole 17-frame blocks at 24 fps), so 6 s bills about 6.58 s. The references, prompt, seed, aspect ratio, prompt rewrite and the sound do not change the amount.

ResolutionPrice (USD)
480p$0.0315/sec
768p$0.063/sec
1080p$0.0788/sec
2k$0.084/sec
4k$0.105/sec
Prompt Rewriter

Pika H3 Flex API Documentation

Rewrite a short idea into a detailed video prompt with the Pika H3 Flex Prompt Rewriter, without making a video. With mode fl2va it writes a prompt for Text to Video or Image to Video, using your first and last frame images if you send them; with ref2va it writes one for Reference to Video, using your reference media. Asynchronous: submit returns a request_id; poll the status endpoint until the request is COMPLETED, then read the rewritten prompt in output.rewritten_prompt.

POST https://gateway.pixazo.ai/pika-h3-flex/v1/prompt-rewriter

Authentication

All requests require an API key passed via header.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour API subscription key

Prompt Rewriter - Pika H3 Flex

Request Code

POST https://gateway.pixazo.ai/pika-h3-flex/v1/prompt-rewriter
Content-Type: application/json
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

{
  "mode": "fl2va",
  "prompt": "A red kite flies over a green hill on a sunny day, its tail ribbons fluttering in a gentle wind."
}
import requests

url = "https://gateway.pixazo.ai/pika-h3-flex/v1/prompt-rewriter"
headers = {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
  "mode": "fl2va",
  "prompt": "A red kite flies over a green hill on a sunny day, its tail ribbons fluttering in a gentle wind."
}

resp = requests.post(url, json=data, headers=headers)
print(resp.json())
const res = await fetch("https://gateway.pixazo.ai/pika-h3-flex/v1/prompt-rewriter", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
  },
  body: JSON.stringify({
  "mode": "fl2va",
  "prompt": "A red kite flies over a green hill on a sunny day, its tail ribbons fluttering in a gentle wind."
})
});
console.log(await res.json());
curl -X POST 'https://gateway.pixazo.ai/pika-h3-flex/v1/prompt-rewriter' \
  -H 'Content-Type: application/json' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
  --data-raw '{"mode": "fl2va", "prompt": "A red kite flies over a green hill on a sunny day, its tail ribbons fluttering in a gentle wind."}'

Output

{
  "request_id": "pika-h3-flex-prompt-rewriter_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/pika-h3-flex-prompt-rewriter_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Webhook (Optional)

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

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

Example: enable Webhook

curl -X POST 'https://gateway.pixazo.ai/pika-h3-flex/v1/prompt-rewriter' \
  -H 'Content-Type: application/json' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
  -H 'X-Webhook-URL: https://your-server.com/webhook' \
  --data-raw '{"mode": "fl2va", "prompt": "A red kite flies over a green hill on a sunny day, its tail ribbons fluttering in a gentle wind."}'

Callback Payload (success)

{
  "request_id": "pika-h3-flex-prompt-rewriter_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "pika-h3-flex-prompt-rewriter",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/{request_id}/output.json"
    ],
    "media_type": "application/json",
    "rewritten_prompt": "integrated_multimodal_description: [Shot 1] Cinematic, wide-angle shot of a vibrant red diamond-shaped kite soaring high in a clear, azure sky. The kite is tethered by a thin, taut white string that stretches downward toward the crest of a lush, rolling green hill in the foreground. The hill is covered in dense, emerald grass that sways rhythmically under a ...",
    "rewrite": {
      "prompt": "integrated_multimodal_description: [Shot 1] Cinematic, wide-angle shot of a vibrant red diamond-shaped kite soaring high in a clear, azure sky. The kite is ...",
      "mode": "fl2va",
      "aspect_ratio": "16:9",
      "valid": true,
      "validation_errors": []
    }
  },
  "created_at": "2026-10-09T10:04:54.387Z",
  "completed_at": "2026-10-09 10:06:21"
}

Failure callback shape

{
  "request_id": "pika-h3-flex-prompt-rewriter_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "pika-h3-flex-prompt-rewriter",
  "error": "Description of the failure"
}

Delivery semantics

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

Request Parameters

ParameterRequiredTypeDefaultAllowed values / rangeDescription
modeNostring"fl2va"fl2va, ref2vafl2va: a prompt for Text to Video or Image to Video, using image / last_frame_image if you send them. ref2va: a prompt for Reference to Video, using references.
promptYesstring—Non-empty text, up to 8000 charactersThe idea to rewrite.
durationNointeger53–15The length in seconds of the video the prompt is written for. It does not change the amount billed.
aspect_ratioNostring—auto, 21:9, 16:9, 3:2, 4:3, 5:4, 1:1, 4:5, 3:4, 2:3, 9:16, 9:21The frame shape the prompt is written for. It does not change the amount billed.
imageNostring—A publicly reachable http(s) URL, up to 8192 charactersWith fl2va: the first frame the video will start from (PNG, JPEG or WebP).
last_frame_imageNostring—A publicly reachable http(s) URL, up to 8192 charactersWith fl2va: the last frame the video will end on.
referencesNoarray—1–12 objectsWith ref2va: your reference media, in order, as objects {"type": "image", "url": "https://..."}, {"type": "video", "url": "https://..."} or {"type": "audio", "url": "https://..."}; up to 9 images, 3 video clips and 3 audio clips, 12 in all, with at least one image or video. Each url is a public https URL of at most 8192 characters. A reference may also carry a role saying what it is for: 1 to 48 lower-case letters, digits or underscores, starting with a letter, for example identity, scene_layout or voice_timbre. Video references do not change the amount billed.

Good to know

  • Each request returns one rewritten prompt as text; no video is made.
  • Video settings are not taken here: resolution, seed, rewrite, output_mode and channel_mode are rejected. Send them with the rewritten prompt to the video operation.
  • Send every field at the top level of the JSON body, with the text in prompt; parameters, content and text are rejected.
  • Omit a field instead of sending null.
  • Use the JSON types shown: duration is a whole number (5, not "5").
  • Webhooks are set with the X-Webhook-URL / X-Webhook-Mode headers; webhook_url and callback_url in the JSON body are rejected.
  • Fields this operation does not take are rejected: batch_size, num_images, number_of_images, n, count, seconds, num_frames, frames_per_second, music_length_ms, image_url and image_urls.

Modes and Media

  • fl2va (the default) writes a prompt for Text to Video or Image to Video. Send the first frame in image and the last frame in last_frame_image if the video will use them, so the prompt fits them.
  • ref2va writes a prompt for Reference to Video from your media in references: up to 9 images, 3 video clips and 3 audio clips, 12 in all, with at least one image or video. Cite them in prompt as @Image1, @Video1, @Audio1 and so on, and give a reference a role to say what it is for. The rewriter looks at the images and videos; it does not listen to the audio.
  • Set duration and aspect_ratio to what the video will use, so the prompt fits the length and the frame shape.
  • Then send output.rewritten_prompt as prompt to the video operation, with rewrite set to false so it is used exactly as written.

Example: a prompt for Image to Video, vertical, 8 seconds

{
  "mode": "fl2va",
  "prompt": "The person turns toward the camera and smiles.",
  "image": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg",
  "duration": 8,
  "aspect_ratio": "9:16"
}

Example: a prompt for Reference to Video

{
  "mode": "ref2va",
  "prompt": "@Image1 comes alive and speaks in the voice of @Audio1.",
  "references": [
    {
      "type": "image",
      "url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg",
      "role": "identity"
    },
    {
      "type": "audio",
      "url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/audio/speech-6s.mp3",
      "role": "voice_timbre"
    }
  ]
}

Example Request

{
  "mode": "fl2va",
  "prompt": "A red kite flies over a green hill on a sunny day, its tail ribbons fluttering in a gentle wind."
}

Example Response

{
  "request_id": "pika-h3-flex-prompt-rewriter_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/pika-h3-flex-prompt-rewriter_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Request Headers

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

Response Handling

Status CodeMeaning
202Accepted — request queued; returns request_id and polling_url.
400Invalid request — a required field is missing, a value has the wrong type, is out of range or is not one of the allowed values, a field this operation does not accept was sent, or an input file could not be downloaded (error: Asset proxy failed). The message says what to fix.
401Unauthorized — missing or invalid subscription key.
402Insufficient balance for the hold this request needs.
429Too many requests.
500Internal server error.

Parameter problems are caught when you submit and returned as a 400, before any hold is placed on your balance. Problems that need the model to run are reported through the status endpoint as status: "ERROR", with a message in error saying what went wrong. Failed requests are not billed — the hold is released in full.

ConditionHow it surfaces
Missing or invalid subscription keysynchronous 401
Balance too low for the holdsynchronous 402
Missing or empty prompt, prompt not a string, or longer than 8000 characterssynchronous 400
mode not fl2va or ref2va (written exactly as listed)synchronous 400
duration not a whole number from 3 to 15 — for example 2, 16 or the string "5"synchronous 400
aspect_ratio not one of the allowed values (written exactly as listed)synchronous 400
image or last_frame_image not a single http(s) URL of at most 8192 characterssynchronous 400
More than 12 references, more than 9 images, 3 video clips or 3 audio clips, no image or video among them, a reference that is not an object with type, url and an optional role only, a url that is not a public https URL of at most 8192 characters, or a role that is not a role namesynchronous 400
batch_size, num_images, number_of_images, n, count (one prompt per request)synchronous 400
seconds, num_frames, frames_per_second, music_length_ms (set the length with duration, in whole seconds)synchronous 400
parameters, content, text (send the fields at the top level of the JSON body, the text in prompt)synchronous 400
image_url, image_urls (send keyframes in image / last_frame_image, or media in references)synchronous 400
resolution, seed, rewrite, output_mode, channel_mode (video settings: send them to the video operations)synchronous 400
webhook_url, callback_url in the JSON body (use the X-Webhook-URL / X-Webhook-Mode headers)synchronous 400
An image, last_frame_image or reference URL that cannot be downloaded (nothing is charged)synchronous 400 (error: Asset proxy failed)
A file the model cannot use, or media that do not fit the mode (nothing is charged)status: "ERROR"
A prompt or media the model refuses, for example under its content policystatus: "ERROR"
A temporary problem on the provider side (nothing is charged; try again later)status: "ERROR"

Example error responses

A refused request returns error, a message that joins every problem found, and the same problems one by one in violations.

Missing prompt (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'prompt' is required",
  "violations": [
    "'prompt' is required"
  ]
}

A value that is not allowed (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'mode' must be one of: \"fl2va\", \"ref2va\" (got \"fl2v\")",
  "violations": [
    "'mode' must be one of: \"fl2va\", \"ref2va\" (got \"fl2v\")"
  ]
}

A value out of range (synchronous 400)

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

A number sent as a string (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'duration' must be integer (got string)",
  "violations": [
    "'duration' must be integer (got string)"
  ]
}

A video setting the rewriter does not take (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'resolution' is not accepted by the prompt rewriter: it returns a rewritten prompt, not a video. Send 'resolution' with the video request.",
  "violations": [
    "'resolution' is not accepted by the prompt rewriter: it returns a rewritten prompt, not a video. Send 'resolution' with the video request."
  ]
}

Retrieving Results

Poll the status endpoint with the request_id from the submit response until status is COMPLETED or ERROR, then read the rewritten prompt in output.rewritten_prompt (the same JSON is stored as a file at output.media_url[0]). Treat any status other than QUEUED, PROCESSING or COMPLETED as a failure.

Endpoint

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

cURL example

curl 'https://gateway.pixazo.ai/v2/requests/status/pika-h3-flex-prompt-rewriter_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY'

Completed response

{
  "request_id": "pika-h3-flex-prompt-rewriter_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "pika-h3-flex-prompt-rewriter",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/{request_id}/output.json"
    ],
    "media_type": "application/json",
    "rewritten_prompt": "integrated_multimodal_description: [Shot 1] Cinematic, wide-angle shot of a vibrant red diamond-shaped kite soaring high in a clear, azure sky. The kite is tethered by a thin, taut white string that stretches downward toward the crest of a lush, rolling green hill in the foreground. The hill is covered in dense, emerald grass that sways rhythmically under a ...",
    "rewrite": {
      "prompt": "integrated_multimodal_description: [Shot 1] Cinematic, wide-angle shot of a vibrant red diamond-shaped kite soaring high in a clear, azure sky. The kite is ...",
      "mode": "fl2va",
      "aspect_ratio": "16:9",
      "valid": true,
      "validation_errors": []
    }
  },
  "created_at": "2026-10-09T10:04:54.387Z",
  "completed_at": "2026-10-09 10:06:21"
}

Response Fields

FieldTypeDescription
request_idstringUnique request identifier.
statusstringQUEUED, PROCESSING, COMPLETED or ERROR.
model_idstringThe model that handled the request — pika-h3-flex-prompt-rewriter for this endpoint.
output.rewritten_promptstringThe rewritten prompt. Send it as prompt to Text to Video, Image to Video or Reference to Video, with rewrite set to false so it is used exactly as written.
output.rewriteobjectThe rewriter's full result: the rewritten prompt with the settings it was written for.
output.rewrite.promptstringThe rewritten prompt (the same text as output.rewritten_prompt).
output.rewrite.modestringThe mode the prompt was rewritten in: fl2va or ref2va.
output.rewrite.aspect_ratiostringThe frame shape the prompt was written for.
output.rewrite.validbooleanWhether the rewritten prompt passed the rewriter's own checks.
output.rewrite.validation_errorsarrayThe rewriter's own check messages; empty when valid is true.
output.truncatedbooleanPresent and true only when a text longer than 32 KB was shortened in this response; the file at output.media_url[0] holds it in full.
output.media_urlarray of stringsURL of a JSON file holding the same result in full.
output.media_typestringapplication/json.
created_atstringRequest creation timestamp.
completed_atstringCompletion timestamp.
errorstringError message when status is ERROR.
polling_urlstringStatus URL for this request (submit response only).

Status Values & Flow

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

Typical workflow

  1. Send the request to POST https://gateway.pixazo.ai/pika-h3-flex/v1/prompt-rewriter.
  2. Save the request_id from the 202 response.
  3. Poll GET /v2/requests/status/{request_id} every 10 seconds or so, or use a Webhook instead.
  4. When status is COMPLETED, read the rewritten prompt in output.rewritten_prompt and send it to the video operation.

How Billing Is Measured

Billing is per request: one flat amount for each rewritten prompt. The prompt, the mode, the duration, the aspect ratio and the media you send do not change the amount. The amount is placed as a hold when the request is submitted and released in full if the request fails. The current rate is shown in the pricing panel on this page.

Pika H3 Flex API Pricing

Your request will cost $0.021 per request.
Draft to Video

Pika H3 Flex API Documentation

Finish a Pika H3 Flex draft at a higher resolution: send the request_id of your own finished Pika H3 Flex video made at 480p or 768p as draft_request_id (the same prompt, media and settings are used again), or the URL of your own 480p or 768p video as video, and the final resolution (resolution, 1080p, 2k or 4k). 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/pika-h3-flex/v1/draft-to-video

Authentication

All requests require an API key passed via header.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour API subscription key

Draft to Video - Pika H3 Flex

Request Code

POST https://gateway.pixazo.ai/pika-h3-flex/v1/draft-to-video
Content-Type: application/json
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

{
  "draft_request_id": "pika-h3-flex_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "resolution": "2k"
}
import requests

url = "https://gateway.pixazo.ai/pika-h3-flex/v1/draft-to-video"
headers = {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
  "draft_request_id": "pika-h3-flex_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "resolution": "2k"
}

resp = requests.post(url, json=data, headers=headers)
print(resp.json())
const res = await fetch("https://gateway.pixazo.ai/pika-h3-flex/v1/draft-to-video", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
  },
  body: JSON.stringify({
  "draft_request_id": "pika-h3-flex_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "resolution": "2k"
})
});
console.log(await res.json());
curl -X POST 'https://gateway.pixazo.ai/pika-h3-flex/v1/draft-to-video' \
  -H 'Content-Type: application/json' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
  --data-raw '{"draft_request_id": "pika-h3-flex_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "resolution": "2k"}'

Output

{
  "request_id": "pika-h3-flex-draft-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/pika-h3-flex-draft-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Webhook (Optional)

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

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

Example: enable Webhook

curl -X POST 'https://gateway.pixazo.ai/pika-h3-flex/v1/draft-to-video' \
  -H 'Content-Type: application/json' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
  -H 'X-Webhook-URL: https://your-server.com/webhook' \
  --data-raw '{"draft_request_id": "pika-h3-flex_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "resolution": "2k"}'

Callback Payload (success)

{
  "request_id": "pika-h3-flex-draft-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "pika-h3-flex-draft-to-video",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/{request_id}/output.mp4"
    ],
    "media_type": "video/mp4"
  },
  "created_at": "2026-10-09T10:04:54.387Z",
  "completed_at": "2026-10-09 10:06:21"
}

Failure callback shape

{
  "request_id": "pika-h3-flex-draft-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "pika-h3-flex-draft-to-video",
  "error": "Description of the failure"
}

Delivery semantics

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

Request Parameters

ParameterRequiredTypeDefaultAllowed values / rangeDescription
draft_request_idOne of draft_request_id / videostring—Non-empty text, up to 128 charactersThe request_id of your own finished Pika H3 Flex Text to Video, Image to Video or Reference to Video request made at 480p or 768p: the draft to finish (see Drafts).
videoOne of draft_request_id / videostring—Public https URL, up to 8192 charactersThe URL of your own video to finish instead of a draft: a regular MP4 or MOV file at 480p or 768p (short edge at most 768 pixels), at most 60 seconds, 1441 frames and 512 MiB (see Drafts).
resolutionNostring"2k"1080p, 2k, 4kThe resolution of the finished video, written exactly as listed.

Good to know

  • Each request returns one video; send one request per video.
  • Send draft_request_id or video (not both), and resolution: any other field is refused.
  • Send every field at the top level of the JSON body, and omit a field instead of sending null.
  • Set a Webhook with the X-Webhook-URL header (see Webhook), not in the JSON body.
  • A field this operation does not take is refused with a 400 that says where it belongs (see Response Handling).
  • The result is returned as a URL in output.media_url: one MP4 file per request.

Drafts

  • A draft is a Pika H3 Flex video you made at 480p or 768p with Text to Video, Image to Video or Reference to Video. Draft to Video makes it again at 1080p, 2k or 4k from the same prompt, media and settings: you do not send them again.
  • Send the draft's request_id (the one its submit returned) as draft_request_id, and the final resolution in resolution (2k when you leave it out).
  • Only your own draft can be finished: the draft must have been made with the same subscription key you send now. A request made with another key is answered as not found.
  • The draft must be COMPLETED, and made at 480p or 768p (a video made at 1080p or higher is refused).
  • A draft can be finished while its request exists: requests are kept for 90 days. It can be finished more than once.
  • Your own video: instead of a draft, send the URL of a video you made elsewhere as video. It must be a public https URL of a regular (not fragmented) MP4 or MOV file at 480p or 768p (short edge at most 768 pixels), at most 60 seconds, 1441 frames and 512 MiB. Its length is measured when you submit; a video that cannot be measured is refused.
  • Each refusal is a 400 sent before anything is charged; its message says what to fix.

Example: finish a draft at 4k

{
  "draft_request_id": "pika-h3-flex_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "resolution": "4k"
}

Example: finish your own video at 1080p

{
  "video": "https://your-server.com/my-768p-clip.mp4",
  "resolution": "1080p"
}

Example Request

{
  "draft_request_id": "pika-h3-flex_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "resolution": "2k"
}

Example Response

{
  "request_id": "pika-h3-flex-draft-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/pika-h3-flex-draft-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Request Headers

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

Response Handling

Status CodeMeaning
202Accepted — request queued; returns request_id and polling_url.
400Invalid request — a required field is missing, a value has the wrong type, is out of range or is not one of the allowed values, or a field this operation does not accept was sent. The message says what to fix.
401Unauthorized — missing or invalid subscription key.
402Insufficient balance for the hold this request needs.
429Too many requests.
503Service temporarily unavailable — the draft or its price could not be read right now; nothing was held. Retry later.
500Internal server error.

Parameter problems are caught when you submit and returned as a 400, before any hold is placed on your balance. Problems that need the model to run are reported through the status endpoint as status: "ERROR", with a message in error saying what went wrong. Failed requests are not billed — the hold is released in full.

ConditionHow it surfaces
Missing or invalid subscription keysynchronous 401
Balance too low for the holdsynchronous 402
Neither draft_request_id nor video, or both; draft_request_id empty, not a string, or longer than 128 characterssynchronous 400
resolution not one of the allowed values (written exactly as listed)synchronous 400
draft_job_id: send draft_request_id (your Pixazo request_id): Pika job ids are not acceptedsynchronous 400
video not a public https URL of at most 8192 characters; a video whose length cannot be measured (not a regular MP4 or MOV, or a slow host); longer than 60 seconds, more than 1441 frames, larger than 512 MiB, or a short edge over 768 pixelssynchronous 400
request_id: send the draft's id in draft_request_idsynchronous 400
prompt, duration, seed, aspect_ratio, image, references, output_mode, channel_mode, rewrite: draft-to-video takes only draft_request_id or video, and resolutionsynchronous 400
webhook_url, callback_url: send the webhook URL in the X-Webhook-URL headersynchronous 400
batch_size, num_images, number_of_images, n, count: one request makes one resultsynchronous 400
parameters: send the fields at the top level of the JSON bodysynchronous 400
A draft_request_id that is not one of your own Pika H3 Flex requests, or no longer kept (requests are kept for 90 days)synchronous 400
A draft that is not a Pika H3 Flex Text to Video, Image to Video or Reference to Video requestsynchronous 400
A draft made at 1080p or higher (only 480p and 768p drafts can be finished)synchronous 400
A draft that is not finished yet (its status is not COMPLETED)synchronous 400
The draft or its price could not be read right now (nothing is held; retry)synchronous 503
A draft the model cannot finish (nothing is charged)status: "ERROR"
A prompt or media the model refuses, for example under its content policy (nothing is charged)status: "ERROR"
A temporary problem on the provider side (nothing is charged; try again later)status: "ERROR"

Example error responses

A refused request returns error, a message that joins every problem found, and the same problems one by one in violations.

Neither draft_request_id nor video (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "draft_request_id or video is required: the request_id of your own finished Pika H3 Flex text-to-video, image-to-video or reference-to-video request made at 480p or 768p, or the https URL of a 480p or 768p video",
  "violations": [
    "draft_request_id or video is required: the request_id of your own finished Pika H3 Flex text-to-video, image-to-video or reference-to-video request made at 480p or 768p, or the https URL of a 480p or 768p video"
  ]
}

A value that is not allowed (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'resolution' must be one of: \"1080p\", \"2k\", \"4k\" (got \"4K\")",
  "violations": [
    "'resolution' must be one of: \"1080p\", \"2k\", \"4k\" (got \"4K\")"
  ]
}

prompt, which this operation does not take (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'prompt' must be one of:  (got \"A kite over a hill\"); 'prompt' is not accepted by Pika H3 Flex Draft to Video. Draft-to-video takes only draft_request_id or video, and resolution.",
  "violations": [
    "'prompt' must be one of:  (got \"A kite over a hill\")",
    "'prompt' is not accepted by Pika H3 Flex Draft to Video. Draft-to-video takes only draft_request_id or video, and resolution."
  ]
}

A draft that is not yours, or no longer kept (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "draft_request_id pika-h3-flex_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx was not found among your Pika H3 Flex requests (requests are kept for 90 days)",
  "violations": [
    "draft_request_id pika-h3-flex_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx was not found among your Pika H3 Flex requests (requests are kept for 90 days)"
  ]
}

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. Treat any status other than QUEUED, PROCESSING or COMPLETED as a failure.

Endpoint

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

cURL example

curl 'https://gateway.pixazo.ai/v2/requests/status/pika-h3-flex-draft-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY'

Completed response

{
  "request_id": "pika-h3-flex-draft-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "pika-h3-flex-draft-to-video",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/{request_id}/output.mp4"
    ],
    "media_type": "video/mp4"
  },
  "created_at": "2026-10-09T10:04:54.387Z",
  "completed_at": "2026-10-09 10:06:21"
}

Response Fields

FieldTypeDescription
request_idstringUnique request identifier.
statusstringQUEUED, PROCESSING, COMPLETED or ERROR.
model_idstringThe model that handled the request — pika-h3-flex-draft-to-video for this endpoint.
output.media_urlarray of stringsURL of the video (one MP4 file per request).
output.media_typestringvideo/mp4.
created_atstringRequest creation timestamp.
completed_atstringCompletion timestamp.
errorstringError message when status is ERROR.
polling_urlstringStatus URL for this request (submit response only).

Status Values & Flow

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

Typical workflow

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

How Billing Is Measured

Billing is the difference between the finished video and the draft: the price of the finished video at resolution (that resolution's per-second rate times the video's billed length, as for a Pika H3 Flex video made at that resolution) less what the draft cost (the draft resolution's per-second rate times the draft's length). The rates are those of the draft's operation: Text to Video and Image to Video drafts share one set of rates, Reference to Video drafts have their own. For your own video (video), billing is the same difference per second of your video: the price at resolution less the price at your video's own resolution (480p or 768p). The hold is measured from your video's length when you submit and assumes 480p; when the video is done you are billed the amount actually used, and the rest of the hold is released. The amount is placed as a hold when the request is submitted and released in full if the request fails. The current prices are shown in the pricing panel on this page.

Pika H3 Flex API Pricing

Billed as the final video's price less what the draft already cost: the per-second rate of the final resolution (1080p, 2K or 4K) for the rendered length, minus the draft's rate for its length. For your own video: the final resolution's rate less your video's own resolution rate, per second of your video.

ResolutionDurationPrice (USD)
1080p from a 480p text or image draft5s$0.13737
2k from a 480p text or image draft5s$0.1645
4k from a 480p text or image draft5s$0.3815
1080p from a 768p text or image draft5s$0.08488
2k from a 768p text or image draft5s$0.112
4k from a 768p text or image draft5s$0.329
1080p from a 480p reference draft5s$0.24938
2k from a 480p reference draft5s$0.2765
4k from a 480p reference draft5s$0.385
1080p from a 768p reference draft5s$0.09187
2k from a 768p reference draft5s$0.119
4k from a 768p reference draft5s$0.2275
Audio Stems

Pika H3 Flex API Documentation

Split the sound of an audio or video file into separate stems with Pika H3 Flex Audio Stems: send the file in input_url and get back one ZIP file of WAV files, one per stem. Asynchronous: submit returns a request_id; poll the status endpoint until the request is COMPLETED, then download the ZIP file of stems from output.media_url.

POST https://gateway.pixazo.ai/pika-h3-flex/v1/audio-stems

Authentication

All requests require an API key passed via header.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour API subscription key

Audio Stems - Pika H3 Flex Audio Stems

Request Code

POST https://gateway.pixazo.ai/pika-h3-flex/v1/audio-stems
Content-Type: application/json
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

{
  "input_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/audio/speech-6s.mp3"
}
import requests

url = "https://gateway.pixazo.ai/pika-h3-flex/v1/audio-stems"
headers = {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
  "input_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/audio/speech-6s.mp3"
}

resp = requests.post(url, json=data, headers=headers)
print(resp.json())
const res = await fetch("https://gateway.pixazo.ai/pika-h3-flex/v1/audio-stems", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
  },
  body: JSON.stringify({
  "input_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/audio/speech-6s.mp3"
})
});
console.log(await res.json());
curl -X POST 'https://gateway.pixazo.ai/pika-h3-flex/v1/audio-stems' \
  -H 'Content-Type: application/json' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
  --data-raw '{"input_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/audio/speech-6s.mp3"}'

Output

{
  "request_id": "pika-h3-flex-audio-stems_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/pika-h3-flex-audio-stems_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Webhook (Optional)

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

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

Example: enable Webhook

curl -X POST 'https://gateway.pixazo.ai/pika-h3-flex/v1/audio-stems' \
  -H 'Content-Type: application/json' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
  -H 'X-Webhook-URL: https://your-server.com/webhook' \
  --data-raw '{"input_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/audio/speech-6s.mp3"}'

Callback Payload (success)

{
  "request_id": "pika-h3-flex-audio-stems_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "pika-h3-flex-audio-stems",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/{request_id}/output.zip"
    ],
    "media_type": "application/zip"
  },
  "created_at": "2026-10-09T10:04:54.387Z",
  "completed_at": "2026-10-09 10:06:21"
}

Failure callback shape

{
  "request_id": "pika-h3-flex-audio-stems_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "pika-h3-flex-audio-stems",
  "error": "Description of the failure"
}

Delivery semantics

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

Request Parameters

ParameterRequiredTypeDefaultAllowed values / rangeDescription
input_urlYesstring—A publicly reachable http(s) URL, up to 4096 charactersThe audio or video file to split: an MP4, MOV, M4A, WAV or MP3 file with sound, at most 120 seconds of it (see Input File).
channel_modeNostring"mono"mono, stereomono or stereo stems. It does not change the amount billed.

Good to know

  • Each request returns one ZIP file of stems; send one request per ZIP file of stems.
  • The length is measured from the file itself: there is no duration to send.
  • Send every field at the top level of the JSON body, and omit a field instead of sending null.
  • Set a Webhook with the X-Webhook-URL header (see Webhook), not in the JSON body.
  • A field this operation does not take is refused with a 400 that says where it belongs (see Response Handling).
  • The result is returned as a URL in output.media_url: one ZIP file per request.

Input File

  • Send one audio or video file with sound in input_url: a publicly reachable URL of an MP4, MOV, M4A, WAV or MP3 file, up to 4096 characters.
  • The input needs an audio track, and its sound may be at most 120 seconds long. A file without sound, or one whose length cannot be measured, is refused with a 400; a longer one too (error: Input too long). Nothing is charged.
  • The result is one ZIP file of WAV files, one per stem. channel_mode picks mono (the default) or stereo stems.
  • Send the file itself: a Pika job id is refused. For a video you made with Pika H3 Flex, send its output.media_url.

Example: stereo stems of a short speech clip

{
  "input_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/audio/speech-6s.mp3",
  "channel_mode": "stereo"
}

Example Request

{
  "input_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/audio/speech-6s.mp3"
}

Example Response

{
  "request_id": "pika-h3-flex-audio-stems_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/pika-h3-flex-audio-stems_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Request Headers

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

Response Handling

Status CodeMeaning
202Accepted — request queued; returns request_id and polling_url.
400Invalid request — a required field is missing, a value has the wrong type, is out of range or is not one of the allowed values, a field this operation does not accept was sent, or an input file could not be downloaded (error: Asset proxy failed). The message says what to fix.
401Unauthorized — missing or invalid subscription key.
402Insufficient balance for the hold this request needs.
429Too many requests.
500Internal server error.

Parameter problems are caught when you submit and returned as a 400, before any hold is placed on your balance. Problems that need the model to run are reported through the status endpoint as status: "ERROR", with a message in error saying what went wrong. Failed requests are not billed — the hold is released in full.

ConditionHow it surfaces
Missing or invalid subscription keysynchronous 401
Balance too low for the holdsynchronous 402
Missing input_url, or input_url not a single publicly reachable http(s) URL of at most 4096 characterssynchronous 400
channel_mode not one of the allowed values (written exactly as listed)synchronous 400
request_id: send the file in input_url: Pika job ids are not acceptedsynchronous 400
audio_url, video_url, audio, video, url: send the file in input_urlsynchronous 400
seed: audio-stems takes no seedsynchronous 400
duration, num_frames, frames_per_second: the length is measured from input_urlsynchronous 400
output_mode: audio-stems takes input_url and channel_mode onlysynchronous 400
webhook_url, callback_url: send the webhook URL in the X-Webhook-URL headersynchronous 400
batch_size, num_images, number_of_images, n, count: one request makes one resultsynchronous 400
parameters: send the fields at the top level of the JSON bodysynchronous 400
An input_url without an audio tracksynchronous 400
An input_url whose length cannot be measured: not an MP4, MOV, M4A, WAV or MP3 file, or a link that cannot be read in timesynchronous 400
An input_url with more than 120 seconds of soundsynchronous 400 (error: Input too long)
An input_url that cannot be downloaded (nothing is charged)synchronous 400 (error: Asset proxy failed)
A file the model cannot split (nothing is charged)status: "ERROR"
A temporary problem on the provider side (nothing is charged; try again later)status: "ERROR"

Example error responses

A refused request returns error, a message that joins every problem found, and the same problems one by one in violations.

Missing input_url (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'input_url' is required",
  "violations": [
    "'input_url' is required"
  ]
}

A value that is not allowed (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'channel_mode' must be one of: \"mono\", \"stereo\" (got \"surround\")",
  "violations": [
    "'channel_mode' must be one of: \"mono\", \"stereo\" (got \"surround\")"
  ]
}

duration, which this operation does not take (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'duration' must be one of:  (got 10); 'duration' is not accepted by Pika H3 Flex Audio Stems. The length is measured from input_url.",
  "violations": [
    "'duration' must be one of:  (got 10)",
    "'duration' is not accepted by Pika H3 Flex Audio Stems. The length is measured from input_url."
  ]
}

A file without sound, for example a video with no audio track (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "input_url has no audio track: audio stems need a file with sound",
  "violations": [
    "input_url has no audio track: audio stems need a file with sound"
  ]
}

Retrieving Results

Poll the status endpoint with the request_id from the submit response until status is COMPLETED or ERROR, then download the ZIP file of stems from output.media_url. Treat any status other than QUEUED, PROCESSING or COMPLETED as a failure.

Endpoint

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

cURL example

curl 'https://gateway.pixazo.ai/v2/requests/status/pika-h3-flex-audio-stems_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY'

Completed response

{
  "request_id": "pika-h3-flex-audio-stems_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "pika-h3-flex-audio-stems",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/{request_id}/output.zip"
    ],
    "media_type": "application/zip"
  },
  "created_at": "2026-10-09T10:04:54.387Z",
  "completed_at": "2026-10-09 10:06:21"
}

Response Fields

FieldTypeDescription
request_idstringUnique request identifier.
statusstringQUEUED, PROCESSING, COMPLETED or ERROR.
model_idstringThe model that handled the request — pika-h3-flex-audio-stems for this endpoint.
output.media_urlarray of stringsURL of a ZIP file of the stems, one WAV file per stem (one ZIP file per request).
output.media_typestringapplication/zip.
created_atstringRequest creation timestamp.
completed_atstringCompletion timestamp.
errorstringError message when status is ERROR.
polling_urlstringStatus URL for this request (submit response only).

Status Values & Flow

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

Typical workflow

  1. Send the request to POST https://gateway.pixazo.ai/pika-h3-flex/v1/audio-stems.
  2. Save the request_id from the 202 response.
  3. Poll GET /v2/requests/status/{request_id} every 10 seconds or so, or use a Webhook instead.
  4. When status is COMPLETED, download the ZIP file of stems from output.media_url.

How Billing Is Measured

Billing is per second of the separated audio, about the length of the sound in your file, not rounded to whole seconds. When you submit, a hold is placed for the length of the audio track in input_url, measured from the file, plus 0.3 seconds. When the stems are ready, the amount is settled per second of the stems made, never more than the hold, and the rest of the hold is released. If the final amount is not available when the stems are ready, the hold is charged instead. channel_mode does not change the amount, and a refused file is not charged. If the request fails, the hold is released in full. The current rates are shown in the pricing panel on this page.

Pika H3 Flex API Pricing

Billed per second of the separated audio, about the length of the input's sound (up to 120 seconds), not rounded to whole seconds. The result is a ZIP of WAV files with Dialogue, Music and Effect stems; mono and stereo bill the same.

Billing unitPrice (USD)
Per second of the separated audio, about the length of the input's sound (not rounded to whole seconds)$0.00315
2. Pika 2.5

Pika 2.5 API Documentation

Generate a video from a text prompt with Pika 2.5. You choose the length (duration, 5 or 10 seconds), the resolution (resolution, 480p, 720p or 1080p) and the frame shape (aspect_ratio). 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/pika-2-5/v1/text-to-video

Authentication

All requests require an API key passed via header.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour API subscription key

Text to Video - Pika 2.5

Request Code

POST https://gateway.pixazo.ai/pika-2-5/v1/text-to-video
Content-Type: application/json
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

{
  "prompt": "A red kite flies over a green hill on a sunny day, its tail ribbons fluttering in a gentle wind.",
  "duration": 5,
  "resolution": "1080p",
  "aspect_ratio": "16:9"
}
import requests

url = "https://gateway.pixazo.ai/pika-2-5/v1/text-to-video"
headers = {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
  "prompt": "A red kite flies over a green hill on a sunny day, its tail ribbons fluttering in a gentle wind.",
  "duration": 5,
  "resolution": "1080p",
  "aspect_ratio": "16:9"
}

resp = requests.post(url, json=data, headers=headers)
print(resp.json())
const res = await fetch("https://gateway.pixazo.ai/pika-2-5/v1/text-to-video", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
  },
  body: JSON.stringify({
  "prompt": "A red kite flies over a green hill on a sunny day, its tail ribbons fluttering in a gentle wind.",
  "duration": 5,
  "resolution": "1080p",
  "aspect_ratio": "16:9"
})
});
console.log(await res.json());
curl -X POST 'https://gateway.pixazo.ai/pika-2-5/v1/text-to-video' \
  -H 'Content-Type: application/json' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
  --data-raw '{"prompt": "A red kite flies over a green hill on a sunny day, its tail ribbons fluttering in a gentle wind.", "duration": 5, "resolution": "1080p", "aspect_ratio": "16:9"}'

Output

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

Webhook (Optional)

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

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

Example: enable Webhook

curl -X POST 'https://gateway.pixazo.ai/pika-2-5/v1/text-to-video' \
  -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 red kite flies over a green hill on a sunny day, its tail ribbons fluttering in a gentle wind.", "duration": 5, "resolution": "1080p", "aspect_ratio": "16:9"}'

Callback Payload (success)

{
  "request_id": "pika-2-5_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "pika-2-5",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/{request_id}/output.mp4"
    ],
    "media_type": "video/mp4"
  },
  "created_at": "2026-10-09T10:04:54.387Z",
  "completed_at": "2026-10-09 10:06:21"
}

Failure callback shape

{
  "request_id": "pika-2-5_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "pika-2-5",
  "error": "Description of the failure"
}

Delivery semantics

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

Request Parameters

ParameterRequiredTypeDefaultAllowed values / rangeDescription
promptYesstring—Non-empty text, up to 4000 charactersWhat happens in the video: the scene, the action, the camera movement and the mood.
negative_promptNostring—Text, up to 4000 charactersWhat to keep out of the result, for example blurry, low quality.
durationNointeger55, 10Length of the video in seconds: 5 or 10. Each length and resolution has its own price.
resolutionNostring"1080p"480p, 720p, 1080pOutput resolution, written exactly as listed. Each resolution and length has its own price.
aspect_ratioNostringChosen by the model5:2, 16:9, 4:3, 1:1, 4:5, 9:16Frame shape of the video, written exactly as listed; leave it out and the model picks it. It does not change the amount billed.
seedNointegerRandom0–2147483647Seed for the random generator; leave it out for a random seed. It does not change the amount billed.

Good to know

  • Each request returns one video; send one request per video.
  • Set the length with duration: 5 or 10 seconds (5 when you leave it out), and the resolution with resolution: 480p, 720p or 1080p (1080p when you leave it out).
  • Send every field at the top level of the JSON body, and omit a field instead of sending null.
  • Use the JSON types shown: seed is a number (7, not "7").
  • Set a Webhook with the X-Webhook-URL header (see Webhook), not in the JSON body.
  • A field this operation does not take is refused with a 400 that says where it belongs (see Response Handling).
  • The result is returned as a URL in output.media_url: one MP4 file per request.

Length and Resolution

Set duration to 5 or 10 seconds; 5 applies when you leave it out. Set resolution to one of the values below; 1080p applies when you leave it out. Each combination of resolution and length has its own price: a higher resolution or the longer length costs more. The frame shape is set with aspect_ratio (see Aspect Ratio).

resolutionNote
480pThe lowest price
720pIn between
1080pThe default; the highest price

Example: a 10-second video at 720p

{
  "prompt": "A paper boat drifts down a rain-soaked street at dusk, reflections shimmering on the water.",
  "negative_prompt": "blurry, low quality",
  "duration": 10,
  "resolution": "720p"
}

Aspect Ratio

Set aspect_ratio to 5:2, 16:9, 4:3, 1:1, 4:5 or 9:16, written exactly as listed. When you leave it out, the model picks the frame shape. It does not change the amount billed.

Example: a vertical video at 480p with a fixed seed

{
  "prompt": "A dancer spins on a rooftop at sunset, her red scarf trailing in the wind.",
  "aspect_ratio": "9:16",
  "duration": 5,
  "resolution": "480p",
  "seed": 42
}

Example Request

{
  "prompt": "A red kite flies over a green hill on a sunny day, its tail ribbons fluttering in a gentle wind.",
  "duration": 5,
  "resolution": "1080p",
  "aspect_ratio": "16:9"
}

Example Response

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

Request Headers

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

Response Handling

Status CodeMeaning
202Accepted — request queued; returns request_id and polling_url.
400Invalid request — a required field is missing, a value has the wrong type, is out of range or is not one of the allowed values, or a field this operation does not accept was sent. The message says what to fix.
401Unauthorized — missing or invalid subscription key.
402Insufficient balance for the hold this request needs.
429Too many requests.
500Internal server error.

Parameter problems are caught when you submit and returned as a 400, before any hold is placed on your balance. Problems that need the model to run are reported through the status endpoint as status: "ERROR", with a message in error saying what went wrong. Failed requests are not billed — the hold is released in full.

ConditionHow it surfaces
Missing or invalid subscription keysynchronous 401
Balance too low for the holdsynchronous 402
Missing or empty prompt, prompt not a string, or longer than 4000 characterssynchronous 400
negative_prompt not a string, or longer than 4000 characterssynchronous 400
duration not 5 or 10 — for example 7synchronous 400
resolution not one of the allowed values (written exactly as listed)synchronous 400
aspect_ratio not one of the allowed values (written exactly as listed)synchronous 400
seed not a whole number from 0 to 2147483647 — for example -1 or the string "0"synchronous 400
duration_s, seconds, num_frames, frames_per_second: set the length with duration (5 or 10 seconds)synchronous 400
image, image_url, image_urls: to animate an image use POST https://gateway.pixazo.ai/pika-2-5/v1/image-to-videosynchronous 400
images: keyframes (1-5 images) go to POST https://gateway.pixazo.ai/pikaframes/v1/keyframes-to-videosynchronous 400
last_frame_image: a first and last frame are taken by Pika H3 Flex image-to-video (POST https://gateway.pixazo.ai/pika-h3-flex/v1/image-to-video)synchronous 400
references: references are taken by Pika H3 Flex reference-to-video (POST https://gateway.pixazo.ai/pika-h3-flex/v1/reference-to-video)synchronous 400
text, content: send the text in promptsynchronous 400
webhook_url, callback_url: send the webhook URL in the X-Webhook-URL headersynchronous 400
batch_size, num_images, number_of_images, n, count: one request makes one resultsynchronous 400
parameters: send the fields at the top level of the JSON bodysynchronous 400
A prompt or media the model refuses, for example under its content policy (nothing is charged)status: "ERROR"
A temporary problem on the provider side (nothing is charged; try again later)status: "ERROR"

Example error responses

A refused request returns error, a message that joins every problem found, and the same problems one by one in violations.

Missing prompt (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'prompt' is required",
  "violations": [
    "'prompt' is required"
  ]
}

A value that is not allowed (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'resolution' must be one of: \"480p\", \"720p\", \"1080p\" (got \"4K\")",
  "violations": [
    "'resolution' must be one of: \"480p\", \"720p\", \"1080p\" (got \"4K\")"
  ]
}

A length that is not offered (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'duration' must be one of: 5, 10 (got 7)",
  "violations": [
    "'duration' must be one of: 5, 10 (got 7)"
  ]
}

A seed out of range (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'seed' must be >= 0 (got -1)",
  "violations": [
    "'seed' must be >= 0 (got -1)"
  ]
}

A number sent as a string (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'seed' must be integer (got string)",
  "violations": [
    "'seed' must be integer (got string)"
  ]
}

image, which this operation does not take (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'image' is not accepted by Pika 2.5 text-to-video. To animate an image use POST https://gateway.pixazo.ai/pika-2-5/v1/image-to-video.",
  "violations": [
    "'image' is not accepted by Pika 2.5 text-to-video. To animate an image use POST https://gateway.pixazo.ai/pika-2-5/v1/image-to-video."
  ]
}

More than one video per request (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'num_images' must be one of:  (got 2); 'num_images' is not supported: Pika 2.5 returns one video per request. Send one request per video.",
  "violations": [
    "'num_images' must be one of:  (got 2)",
    "'num_images' is not supported: Pika 2.5 returns one video per request. Send one request per video."
  ]
}

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. Treat any status other than QUEUED, PROCESSING or COMPLETED as a failure.

Endpoint

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

cURL example

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

Completed response

{
  "request_id": "pika-2-5_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "pika-2-5",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/{request_id}/output.mp4"
    ],
    "media_type": "video/mp4"
  },
  "created_at": "2026-10-09T10:04:54.387Z",
  "completed_at": "2026-10-09 10:06:21"
}

Response Fields

FieldTypeDescription
request_idstringUnique request identifier.
statusstringQUEUED, PROCESSING, COMPLETED or ERROR.
model_idstringThe model that handled the request — pika-2-5 for this endpoint.
output.media_urlarray of stringsURL of the video (one MP4 file per request).
output.media_typestringvideo/mp4.
created_atstringRequest creation timestamp.
completed_atstringCompletion timestamp.
errorstringError message when status is ERROR.
polling_urlstringStatus URL for this request (submit response only).

Status Values & Flow

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

Typical workflow

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

How Billing Is Measured

Billing is per video, at the price for its resolution and length: each combination of resolution (480p, 720p or 1080p) and duration (5 or 10 seconds) has its own price, and 1080p at 5 seconds applies when you leave them out. A higher resolution or the longer length costs more. The prompt, negative prompt, aspect ratio and seed do not change the amount. The amount is placed as a hold when the request is submitted and released in full if the request fails. The current prices are shown in the pricing panel on this page.

Pika 2.5 API Pricing

Billed per video at the price for the requested resolution (480p, 720p or 1080p) and length (5 or 10 seconds). The prompt, negative prompt, aspect ratio and seed do not change the amount.

ResolutionDurationPrice (USD)
480p5s$0.105
480p10s$0.21
720p5s$0.21
720p10s$0.42
1080p5s$0.4725
1080p10s$0.63
Image to Video

Pika 2.5 API Documentation

Animate an image with Pika 2.5: send it in image, with an optional prompt describing how the video unfolds. You choose the length (duration, 5 or 10 seconds) and the resolution (resolution, 480p, 720p or 1080p); the frame shape follows the image. 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/pika-2-5/v1/image-to-video

Authentication

All requests require an API key passed via header.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour API subscription key

Image to Video - Pika 2.5

Request Code

POST https://gateway.pixazo.ai/pika-2-5/v1/image-to-video
Content-Type: application/json
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

{
  "image": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg",
  "prompt": "The person turns toward the camera and smiles as a light breeze moves her hair.",
  "duration": 5,
  "resolution": "1080p"
}
import requests

url = "https://gateway.pixazo.ai/pika-2-5/v1/image-to-video"
headers = {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
  "image": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg",
  "prompt": "The person turns toward the camera and smiles as a light breeze moves her hair.",
  "duration": 5,
  "resolution": "1080p"
}

resp = requests.post(url, json=data, headers=headers)
print(resp.json())
const res = await fetch("https://gateway.pixazo.ai/pika-2-5/v1/image-to-video", {
  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",
  "prompt": "The person turns toward the camera and smiles as a light breeze moves her hair.",
  "duration": 5,
  "resolution": "1080p"
})
});
console.log(await res.json());
curl -X POST 'https://gateway.pixazo.ai/pika-2-5/v1/image-to-video' \
  -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", "prompt": "The person turns toward the camera and smiles as a light breeze moves her hair.", "duration": 5, "resolution": "1080p"}'

Output

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

Webhook (Optional)

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

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

Example: enable Webhook

curl -X POST 'https://gateway.pixazo.ai/pika-2-5/v1/image-to-video' \
  -H 'Content-Type: application/json' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
  -H 'X-Webhook-URL: https://your-server.com/webhook' \
  --data-raw '{"image": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg", "prompt": "The person turns toward the camera and smiles as a light breeze moves her hair.", "duration": 5, "resolution": "1080p"}'

Callback Payload (success)

{
  "request_id": "pika-2-5_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "pika-2-5",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/{request_id}/output.mp4"
    ],
    "media_type": "video/mp4"
  },
  "created_at": "2026-10-09T10:04:54.387Z",
  "completed_at": "2026-10-09 10:06:21"
}

Failure callback shape

{
  "request_id": "pika-2-5_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "pika-2-5",
  "error": "Description of the failure"
}

Delivery semantics

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

Request Parameters

ParameterRequiredTypeDefaultAllowed values / rangeDescription
imageYesstring—A publicly reachable http(s) URLThe image to animate: a publicly reachable image (JPEG, PNG or WebP). The video takes its frame shape from it.
promptNostring—Text, up to 4000 charactersHow the video unfolds from your image: the motion, the camera movement and the mood. Optional.
negative_promptNostring—Text, up to 4000 charactersWhat to keep out of the result, for example blurry, low quality.
durationNointeger55, 10Length of the video in seconds: 5 or 10. Each length and resolution has its own price.
resolutionNostring"1080p"480p, 720p, 1080pOutput resolution, written exactly as listed. Each resolution and length has its own price.
seedNointegerRandom0–2147483647Seed for the random generator; leave it out for a random seed. It does not change the amount billed.

Good to know

  • Each request returns one video; send one request per video.
  • Set the length with duration: 5 or 10 seconds (5 when you leave it out), and the resolution with resolution: 480p, 720p or 1080p (1080p when you leave it out).
  • The frame shape follows your image: there is no aspect_ratio here.
  • Send every field at the top level of the JSON body, and omit a field instead of sending null.
  • Use the JSON types shown: seed is a number (7, not "7").
  • Set a Webhook with the X-Webhook-URL header (see Webhook), not in the JSON body.
  • A field this operation does not take is refused with a 400 that says where it belongs (see Response Handling).
  • The result is returned as a URL in output.media_url: one MP4 file per request.

Length and Resolution

Set duration to 5 or 10 seconds; 5 applies when you leave it out. Set resolution to one of the values below; 1080p applies when you leave it out. Each combination of resolution and length has its own price: a higher resolution or the longer length costs more. The video takes its frame shape from your image.

resolutionNote
480pThe lowest price
720pIn between
1080pThe default; the highest price

Example: a 10-second video at 720p

{
  "image": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg",
  "prompt": "The camera slowly pushes in while the person looks up and laughs.",
  "duration": 10,
  "resolution": "720p"
}

Input Image

  • Send one publicly reachable image URL in image; a list is refused. The video starts from it and takes its frame shape from it.
  • A URL that cannot be downloaded is refused when you submit (a 400 with error Asset proxy failed); an image the model cannot use ends the request with status: "ERROR". Either way nothing is charged.
  • prompt is optional here: leave it out and the model decides how the image moves.

Example: no prompt, a negative prompt and a fixed seed at 480p

{
  "image": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg",
  "negative_prompt": "blurry, distorted face",
  "duration": 5,
  "resolution": "480p",
  "seed": 42
}

Example Request

{
  "image": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg",
  "prompt": "The person turns toward the camera and smiles as a light breeze moves her hair.",
  "duration": 5,
  "resolution": "1080p"
}

Example Response

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

Request Headers

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

Response Handling

Status CodeMeaning
202Accepted — request queued; returns request_id and polling_url.
400Invalid request — a required field is missing, a value has the wrong type, is out of range or is not one of the allowed values, a field this operation does not accept was sent, or an input file could not be downloaded (error: Asset proxy failed). The message says what to fix.
401Unauthorized — missing or invalid subscription key.
402Insufficient balance for the hold this request needs.
429Too many requests.
500Internal server error.

Parameter problems are caught when you submit and returned as a 400, before any hold is placed on your balance. Problems that need the model to run are reported through the status endpoint as status: "ERROR", with a message in error saying what went wrong. Failed requests are not billed — the hold is released in full.

ConditionHow it surfaces
Missing or invalid subscription keysynchronous 401
Balance too low for the holdsynchronous 402
Missing image, or image not a single publicly reachable http(s) URLsynchronous 400
prompt not a string, or longer than 4000 characterssynchronous 400
negative_prompt not a string, or longer than 4000 characterssynchronous 400
duration not 5 or 10 — for example 7synchronous 400
resolution not one of the allowed values (written exactly as listed)synchronous 400
seed not a whole number from 0 to 2147483647 — for example -1 or the string "0"synchronous 400
aspect_ratio: Pika 2.5 image-to-video takes no aspect_ratio: the output follows the imagesynchronous 400
duration_s, seconds, num_frames, frames_per_second: set the length with duration (5 or 10 seconds)synchronous 400
last_frame_image: a first and last frame are taken by Pika H3 Flex image-to-video (POST https://gateway.pixazo.ai/pika-h3-flex/v1/image-to-video)synchronous 400
images: keyframes (1-5 images) go to POST https://gateway.pixazo.ai/pikaframes/v1/keyframes-to-videosynchronous 400
loop: keyframes and loops go to POST https://gateway.pixazo.ai/pikaframes/v1/keyframes-to-videosynchronous 400
image_url, image_urls: send the image in imagesynchronous 400
references: references are taken by Pika H3 Flex reference-to-video (POST https://gateway.pixazo.ai/pika-h3-flex/v1/reference-to-video)synchronous 400
text, content: send the text in promptsynchronous 400
webhook_url, callback_url: send the webhook URL in the X-Webhook-URL headersynchronous 400
batch_size, num_images, number_of_images, n, count: one request makes one resultsynchronous 400
parameters: send the fields at the top level of the JSON bodysynchronous 400
An image URL that cannot be downloaded (nothing is charged)synchronous 400 (error: Asset proxy failed)
An image or video the model cannot use, for example an unsupported format (nothing is charged)status: "ERROR"
A prompt or media the model refuses, for example under its content policy (nothing is charged)status: "ERROR"
A temporary problem on the provider side (nothing is charged; try again later)status: "ERROR"

Example error responses

A refused request returns error, a message that joins every problem found, and the same problems one by one in violations.

Missing image (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'image' is required",
  "violations": [
    "'image' is required"
  ]
}

A value that is not allowed (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'resolution' must be one of: \"480p\", \"720p\", \"1080p\" (got \"4K\")",
  "violations": [
    "'resolution' must be one of: \"480p\", \"720p\", \"1080p\" (got \"4K\")"
  ]
}

A length that is not offered (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'duration' must be one of: 5, 10 (got 7)",
  "violations": [
    "'duration' must be one of: 5, 10 (got 7)"
  ]
}

A seed out of range (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'seed' must be >= 0 (got -1)",
  "violations": [
    "'seed' must be >= 0 (got -1)"
  ]
}

A number sent as a string (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'seed' must be integer (got string)",
  "violations": [
    "'seed' must be integer (got string)"
  ]
}

aspect_ratio, which this operation does not take (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'aspect_ratio' is not accepted by Pika 2.5 image-to-video. Pika 2.5 image-to-video takes no aspect_ratio: the output follows the image.",
  "violations": [
    "'aspect_ratio' is not accepted by Pika 2.5 image-to-video. Pika 2.5 image-to-video takes no aspect_ratio: the output follows the image."
  ]
}

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. Treat any status other than QUEUED, PROCESSING or COMPLETED as a failure.

Endpoint

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

cURL example

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

Completed response

{
  "request_id": "pika-2-5_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "pika-2-5",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/{request_id}/output.mp4"
    ],
    "media_type": "video/mp4"
  },
  "created_at": "2026-10-09T10:04:54.387Z",
  "completed_at": "2026-10-09 10:06:21"
}

Response Fields

FieldTypeDescription
request_idstringUnique request identifier.
statusstringQUEUED, PROCESSING, COMPLETED or ERROR.
model_idstringThe model that handled the request — pika-2-5 for this endpoint.
output.media_urlarray of stringsURL of the video (one MP4 file per request).
output.media_typestringvideo/mp4.
created_atstringRequest creation timestamp.
completed_atstringCompletion timestamp.
errorstringError message when status is ERROR.
polling_urlstringStatus URL for this request (submit response only).

Status Values & Flow

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

Typical workflow

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

How Billing Is Measured

Billing is per video, at the price for its resolution and length: each combination of resolution (480p, 720p or 1080p) and duration (5 or 10 seconds) has its own price, and 1080p at 5 seconds applies when you leave them out. A higher resolution or the longer length costs more. The image, prompt, negative prompt and seed do not change the amount. The amount is placed as a hold when the request is submitted and released in full if the request fails. The current prices are shown in the pricing panel on this page.

Pika 2.5 API Pricing

Billed per video at the price for the requested resolution (480p, 720p or 1080p) and length (5 or 10 seconds). The image, prompt, negative prompt and seed do not change the amount.

ResolutionDurationPrice (USD)
480p5s$0.105
480p10s$0.21
720p5s$0.21
720p10s$0.42
1080p5s$0.4725
1080p10s$0.63
3. Pika 2.5 Keyframe

Pika 2.5 Keyframe API Documentation

Make a video that moves through your keyframes with Pika 2.5 Keyframe: send 1 to 5 images in images, in order, and the video transitions from each one to the next (and back to the first with loop). You choose the length of each transition and the resolution (resolution, 720p or 1080p). 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/pikaframes/v1/keyframes-to-video

Authentication

All requests require an API key passed via header.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour API subscription key

Keyframes to Video - Pika 2.5 Keyframe

Request Code

POST https://gateway.pixazo.ai/pikaframes/v1/keyframes-to-video
Content-Type: application/json
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

{
  "images": [
    "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"
  ],
  "loop": true,
  "prompt": "The camera slowly circles the person as the light shifts to golden hour.",
  "transition_duration_s": 5,
  "resolution": "1080p"
}
import requests

url = "https://gateway.pixazo.ai/pikaframes/v1/keyframes-to-video"
headers = {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
  "images": [
    "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"
  ],
  "loop": true,
  "prompt": "The camera slowly circles the person as the light shifts to golden hour.",
  "transition_duration_s": 5,
  "resolution": "1080p"
}

resp = requests.post(url, json=data, headers=headers)
print(resp.json())
const res = await fetch("https://gateway.pixazo.ai/pikaframes/v1/keyframes-to-video", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
  },
  body: JSON.stringify({
  "images": [
    "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"
  ],
  "loop": true,
  "prompt": "The camera slowly circles the person as the light shifts to golden hour.",
  "transition_duration_s": 5,
  "resolution": "1080p"
})
});
console.log(await res.json());
curl -X POST 'https://gateway.pixazo.ai/pikaframes/v1/keyframes-to-video' \
  -H 'Content-Type: application/json' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
  --data-raw '{"images": ["https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"], "loop": true, "prompt": "The camera slowly circles the person as the light shifts to golden hour.", "transition_duration_s": 5, "resolution": "1080p"}'

Output

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

Webhook (Optional)

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

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

Example: enable Webhook

curl -X POST 'https://gateway.pixazo.ai/pikaframes/v1/keyframes-to-video' \
  -H 'Content-Type: application/json' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
  -H 'X-Webhook-URL: https://your-server.com/webhook' \
  --data-raw '{"images": ["https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"], "loop": true, "prompt": "The camera slowly circles the person as the light shifts to golden hour.", "transition_duration_s": 5, "resolution": "1080p"}'

Callback Payload (success)

{
  "request_id": "pikaframes_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "pikaframes",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/{request_id}/output.mp4"
    ],
    "media_type": "video/mp4"
  },
  "created_at": "2026-10-09T10:04:54.387Z",
  "completed_at": "2026-10-09 10:06:21"
}

Failure callback shape

{
  "request_id": "pikaframes_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "pikaframes",
  "error": "Description of the failure"
}

Delivery semantics

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

Request Parameters

ParameterRequiredTypeDefaultAllowed values / rangeDescription
imagesYesarray—1–5 image URLsThe keyframes, in order: publicly reachable image URLs. The video moves from each keyframe to the next.
loopNobooleanfalsetrue, falsetrue adds a transition from the last keyframe back to the first, so the video loops. Needed with a single keyframe.
transition_duration_sNointeger51–10Length of every transition in whole seconds. With two or more transitions, at most 5.
transition_durations_sNoarray—1–5 whole numbers, each 1–10One length per transition, in whole seconds, in order (the loop's last); it replaces transition_duration_s.
transition_promptsNoarray—1–5 strings, up to 4000 characters eachOne prompt per transition, in order (the loop's last); an empty string is allowed.
promptNostring—Text, up to 4000 charactersThe motion and mood across the whole video.
negative_promptNostring—Text, up to 4000 charactersWhat to keep out of the result, for example blurry, low quality.
resolutionNostring"1080p"720p, 1080pOutput resolution, written exactly as listed. Four or more transitions need 720p.
seedNointegerRandom0–2147483647Seed for the random generator; leave it out for a random seed. It does not change the amount billed.

Good to know

  • Each request returns one video; send one request per video.
  • A video has one transition per pair of neighbouring keyframes, plus one with loop; see Keyframes and Transitions for the four rules on transitions.
  • Send every field at the top level of the JSON body, and omit a field instead of sending null.
  • Use the JSON types shown: transition_duration_s and seed are numbers (7, not "7").
  • Set a Webhook with the X-Webhook-URL header (see Webhook), not in the JSON body.
  • A field this operation does not take is refused with a 400 that says where it belongs (see Response Handling).
  • The result is returned as a URL in output.media_url: one MP4 file per request.

Keyframes and Transitions

  • Send 1 to 5 keyframes in images, in order. The video has one transition between each keyframe and the next; loop set to true adds one from the last keyframe back to the first. So the number of transitions is the number of keyframes minus one, plus one with loop.
  • Each transition lasts transition_duration_s seconds (1 to 10; 5 when you leave it out), or set each one with transition_durations_s, in order. transition_prompts gives each transition its own prompt, in order; prompt describes the whole video.
  • The video is as long as its transitions together, and that is the length billed.

Four rules on transitions are checked when you submit, before anything is charged; a request that breaks one is refused with a 400 and the sentence below as its message.

RuleMessage when broken
At least one transition: a single keyframe needs loop set to trueA single keyframe requires loop=true
transition_durations_s and transition_prompts, when sent, have one entry per transition (the loop counts as one)Per-transition settings must have one entry for each transition, including the loop
With two or more transitions, each one is at most 5 secondsDurations above 5 seconds are only supported for a single transition
Four or more transitions need resolution 720pFour or more transitions are only supported at 720p

Example: three keyframes (one sample image is used three times here: send your own), 2 transitions with their own length and prompt, 7 seconds at 720p

{
  "images": [
    "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg",
    "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg",
    "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"
  ],
  "transition_durations_s": [
    3,
    4
  ],
  "transition_prompts": [
    "The person turns to face the camera.",
    "The camera pulls back to show the street."
  ],
  "resolution": "720p",
  "seed": 7
}

Example: four keyframes with loop: 4 transitions of 4 seconds, 16 seconds, so 720p

{
  "images": [
    "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg",
    "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg",
    "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg",
    "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"
  ],
  "loop": true,
  "transition_duration_s": 4,
  "resolution": "720p"
}

Example Request

{
  "images": [
    "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"
  ],
  "loop": true,
  "prompt": "The camera slowly circles the person as the light shifts to golden hour.",
  "transition_duration_s": 5,
  "resolution": "1080p"
}

Example Response

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

Request Headers

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

Response Handling

Status CodeMeaning
202Accepted — request queued; returns request_id and polling_url.
400Invalid request — a required field is missing, a value has the wrong type, is out of range or is not one of the allowed values, a field this operation does not accept was sent, or an input file could not be downloaded (error: Asset proxy failed). The message says what to fix.
401Unauthorized — missing or invalid subscription key.
402Insufficient balance for the hold this request needs.
429Too many requests.
500Internal server error.

Parameter problems are caught when you submit and returned as a 400, before any hold is placed on your balance. Problems that need the model to run are reported through the status endpoint as status: "ERROR", with a message in error saying what went wrong. Failed requests are not billed — the hold is released in full.

ConditionHow it surfaces
Missing or invalid subscription keysynchronous 401
Balance too low for the holdsynchronous 402
loop not true or falsesynchronous 400
transition_duration_s not a whole number from 1 to 10 — for example 20 or the string "1"synchronous 400
prompt not a string, or longer than 4000 characterssynchronous 400
negative_prompt not a string, or longer than 4000 characterssynchronous 400
resolution not one of the allowed values (written exactly as listed)synchronous 400
seed not a whole number from 0 to 2147483647 — for example -1 or the string "0"synchronous 400
duration, duration_s, seconds, num_frames, frames_per_second: set the length with transition_duration_s (1-10 seconds per transition) or transition_durations_ssynchronous 400
image, image_url, image_urls: send the keyframes in images (1-5 URLs)synchronous 400
aspect_ratio: Pika 2.5 Keyframe takes no aspect_ratiosynchronous 400
text, content: send the text in prompt or transition_promptssynchronous 400
webhook_url, callback_url: send the webhook URL in the X-Webhook-URL headersynchronous 400
batch_size, num_images, number_of_images, n, count: one request makes one resultsynchronous 400
parameters: send the fields at the top level of the JSON bodysynchronous 400
Missing images, more than 5 keyframes, or a keyframe that is not an http(s) URLsynchronous 400
transition_durations_s or transition_prompts not a list of 1 to 5 entries, a length that is not a whole number from 1 to 10, or a prompt that is not a string or is too longsynchronous 400
A single keyframe without loop (message: A single keyframe requires loop=true)synchronous 400
A per-transition list with the wrong number of entries (message: Per-transition settings must have one entry for each transition, including the loop)synchronous 400
A transition over 5 seconds with two or more transitions (message: Durations above 5 seconds are only supported for a single transition)synchronous 400
Four or more transitions at 1080p (message: Four or more transitions are only supported at 720p)synchronous 400
A keyframe URL in images that cannot be downloaded (nothing is charged)synchronous 400 (error: Asset proxy failed)
An image or video the model cannot use, for example an unsupported format (nothing is charged)status: "ERROR"
A prompt or media the model refuses, for example under its content policy (nothing is charged)status: "ERROR"
A temporary problem on the provider side (nothing is charged; try again later)status: "ERROR"

Example error responses

A refused request returns error, a message that joins every problem found, and the same problems one by one in violations.

Missing images (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'images' is required",
  "violations": [
    "'images' is required"
  ]
}

A value that is not allowed (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'resolution' must be one of: \"720p\", \"1080p\" (got \"4K\")",
  "violations": [
    "'resolution' must be one of: \"720p\", \"1080p\" (got \"4K\")"
  ]
}

A value out of range (synchronous 400)

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

A seed out of range (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'seed' must be >= 0 (got -1)",
  "violations": [
    "'seed' must be >= 0 (got -1)"
  ]
}

A number sent as a string (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'transition_duration_s' must be integer (got string)",
  "violations": [
    "'transition_duration_s' must be integer (got string)"
  ]
}

duration, which this operation does not take (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'duration' must be one of:  (got 10); 'duration' is not accepted by Pika 2.5 Keyframe. Set the length with transition_duration_s (1-10 seconds per transition) or transition_durations_s.",
  "violations": [
    "'duration' must be one of:  (got 10)",
    "'duration' is not accepted by Pika 2.5 Keyframe. Set the length with transition_duration_s (1-10 seconds per transition) or transition_durations_s."
  ]
}

One keyframe without loop (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "A single keyframe requires loop=true",
  "violations": [
    "A single keyframe requires loop=true"
  ]
}

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. Treat any status other than QUEUED, PROCESSING or COMPLETED as a failure.

Endpoint

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

cURL example

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

Completed response

{
  "request_id": "pikaframes_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "pikaframes",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/{request_id}/output.mp4"
    ],
    "media_type": "video/mp4"
  },
  "created_at": "2026-10-09T10:04:54.387Z",
  "completed_at": "2026-10-09 10:06:21"
}

Response Fields

FieldTypeDescription
request_idstringUnique request identifier.
statusstringQUEUED, PROCESSING, COMPLETED or ERROR.
model_idstringThe model that handled the request — pikaframes for this endpoint.
output.media_urlarray of stringsURL of the video (one MP4 file per request).
output.media_typestringvideo/mp4.
created_atstringRequest creation timestamp.
completed_atstringCompletion timestamp.
errorstringError message when status is ERROR.
polling_urlstringStatus URL for this request (submit response only).

Status Values & Flow

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

Typical workflow

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

How Billing Is Measured

Billing is per second of video, at the rate for the resolution (720p or 1080p; 1080p when you leave it out). The billed length is the sum of transition_durations_s when you send it, otherwise the number of transitions times transition_duration_s (5 seconds when you leave it out). For example, three keyframes with loop make three transitions: 15 seconds at the default length. The keyframes, prompts and seed do not change the rate. The amount is placed as a hold when the request is submitted and released in full if the request fails. The current prices are shown in the pricing panel on this page.

Pika 2.5 Keyframe API Pricing — Per-Second Rates

Billed per second of output at the rate for the requested resolution (720p or 1080p). The length is the sum of the transitions: one between each pair of keyframes, plus one back to the first with loop on, each 1 to 5 seconds (up to 10 with a single transition; 5 by default). The prompts and the seed do not change the rate.

ResolutionPrice (USD)
720p$0.042/sec
1080p$0.063/sec
4. Pika SFX

Pika SFX API Documentation

Generate a sound effect from a text description with Pika SFX. You choose its length (duration, 1 to 20 seconds). Asynchronous: submit returns a request_id; poll the status endpoint until the request is COMPLETED, then download the audio file from output.media_url.

POST https://gateway.pixazo.ai/pika-sfx/v1/text-to-sound-effects

Authentication

All requests require an API key passed via header.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour API subscription key

Text to Sound Effects - Pika SFX

Request Code

POST https://gateway.pixazo.ai/pika-sfx/v1/text-to-sound-effects
Content-Type: application/json
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

{
  "prompt": "Thunder rolls in the distance, then heavy rain starts on a tin roof.",
  "duration": 10
}
import requests

url = "https://gateway.pixazo.ai/pika-sfx/v1/text-to-sound-effects"
headers = {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
  "prompt": "Thunder rolls in the distance, then heavy rain starts on a tin roof.",
  "duration": 10
}

resp = requests.post(url, json=data, headers=headers)
print(resp.json())
const res = await fetch("https://gateway.pixazo.ai/pika-sfx/v1/text-to-sound-effects", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
  },
  body: JSON.stringify({
  "prompt": "Thunder rolls in the distance, then heavy rain starts on a tin roof.",
  "duration": 10
})
});
console.log(await res.json());
curl -X POST 'https://gateway.pixazo.ai/pika-sfx/v1/text-to-sound-effects' \
  -H 'Content-Type: application/json' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
  --data-raw '{"prompt": "Thunder rolls in the distance, then heavy rain starts on a tin roof.", "duration": 10}'

Output

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

Webhook (Optional)

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

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

Example: enable Webhook

curl -X POST 'https://gateway.pixazo.ai/pika-sfx/v1/text-to-sound-effects' \
  -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": "Thunder rolls in the distance, then heavy rain starts on a tin roof.", "duration": 10}'

Callback Payload (success)

{
  "request_id": "pika-sfx_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "pika-sfx",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/{request_id}/output.wav"
    ],
    "media_type": "audio/wav"
  },
  "created_at": "2026-10-09T10:04:54.387Z",
  "completed_at": "2026-10-09 10:06:21"
}

Failure callback shape

{
  "request_id": "pika-sfx_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "pika-sfx",
  "error": "Description of the failure"
}

Delivery semantics

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

Request Parameters

ParameterRequiredTypeDefaultAllowed values / rangeDescription
promptYesstring—Non-empty text, up to 4000 charactersThe sound to make, for example a single knock on a wooden door.
durationNonumber101–20Length of the sound effect in seconds. Billing is per second of this length.
seedNointegerRandom-1–2147483647Seed for the random generator; leave it out for a random seed. It does not change the amount billed.

Good to know

  • Each request returns one sound effect; send one request per sound effect.
  • Send every field at the top level of the JSON body, and omit a field instead of sending null.
  • Use the JSON types shown: duration and seed are numbers (7, not "7").
  • Set a Webhook with the X-Webhook-URL header (see Webhook), not in the JSON body.
  • A field this operation does not take is refused with a 400 that says where it belongs (see Response Handling).
  • The result is returned as a URL in output.media_url: one WAV file per request.

Length

Set duration to the length you want in seconds, from 1 to 20; 10 applies when you leave it out. Billing is per second of this length, so a longer sound costs more.

Example: a 2-second sound with a fixed seed

{
  "prompt": "A single knock on a wooden door.",
  "duration": 2,
  "seed": 7
}

Example Request

{
  "prompt": "Thunder rolls in the distance, then heavy rain starts on a tin roof.",
  "duration": 10
}

Example Response

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

Request Headers

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

Response Handling

Status CodeMeaning
202Accepted — request queued; returns request_id and polling_url.
400Invalid request — a required field is missing, a value has the wrong type, is out of range or is not one of the allowed values, or a field this operation does not accept was sent. The message says what to fix.
401Unauthorized — missing or invalid subscription key.
402Insufficient balance for the hold this request needs.
429Too many requests.
500Internal server error.

Parameter problems are caught when you submit and returned as a 400, before any hold is placed on your balance. Problems that need the model to run are reported through the status endpoint as status: "ERROR", with a message in error saying what went wrong. Failed requests are not billed — the hold is released in full.

ConditionHow it surfaces
Missing or invalid subscription keysynchronous 401
Balance too low for the holdsynchronous 402
Missing or empty prompt, prompt not a string, or longer than 4000 characterssynchronous 400
duration not a number from 1 to 20 — for example 30 or the string "1"synchronous 400
seed not a whole number from -1 to 2147483647 — for example -2 or the string "0"synchronous 400
seconds, duration_seconds, length, music_length_ms, num_frames, frames_per_second: set the length with duration (1-20 seconds)synchronous 400
text, content: send the description in promptsynchronous 400
webhook_url, callback_url: send the webhook URL in the X-Webhook-URL headersynchronous 400
batch_size, num_images, number_of_images, n, count: one request makes one resultsynchronous 400
parameters: send the fields at the top level of the JSON bodysynchronous 400
A prompt or media the model refuses, for example under its content policy (nothing is charged)status: "ERROR"
A temporary problem on the provider side (nothing is charged; try again later)status: "ERROR"

Example error responses

A refused request returns error, a message that joins every problem found, and the same problems one by one in violations.

Missing prompt (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'prompt' is required",
  "violations": [
    "'prompt' is required"
  ]
}

A value out of range (synchronous 400)

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

A seed out of range (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'seed' must be >= -1 (got -2)",
  "violations": [
    "'seed' must be >= -1 (got -2)"
  ]
}

A number sent as a string (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'duration' must be number (got string)",
  "violations": [
    "'duration' must be number (got string)"
  ]
}

seconds, which this operation does not take (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'seconds' must be one of:  (got 5); 'seconds' is not accepted by Pika SFX. Set the length with duration (1-20 seconds).",
  "violations": [
    "'seconds' must be one of:  (got 5)",
    "'seconds' is not accepted by Pika SFX. Set the length with duration (1-20 seconds)."
  ]
}

More than one sound effect per request (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'num_images' must be one of:  (got 2); 'num_images' is not supported: Pika SFX returns one sound effect per request. Send one request per sound effect.",
  "violations": [
    "'num_images' must be one of:  (got 2)",
    "'num_images' is not supported: Pika SFX returns one sound effect per request. Send one request per sound effect."
  ]
}

Retrieving Results

Poll the status endpoint with the request_id from the submit response until status is COMPLETED or ERROR, then download the audio file from output.media_url. Treat any status other than QUEUED, PROCESSING or COMPLETED as a failure.

Endpoint

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

cURL example

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

Completed response

{
  "request_id": "pika-sfx_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "pika-sfx",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/{request_id}/output.wav"
    ],
    "media_type": "audio/wav"
  },
  "created_at": "2026-10-09T10:04:54.387Z",
  "completed_at": "2026-10-09 10:06:21"
}

Response Fields

FieldTypeDescription
request_idstringUnique request identifier.
statusstringQUEUED, PROCESSING, COMPLETED or ERROR.
model_idstringThe model that handled the request — pika-sfx for this endpoint.
output.media_urlarray of stringsURL of the audio file (one WAV file per request).
output.media_typestringaudio/wav.
created_atstringRequest creation timestamp.
completed_atstringCompletion timestamp.
errorstringError message when status is ERROR.
polling_urlstringStatus URL for this request (submit response only).

Status Values & Flow

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

Typical workflow

  1. Send the request to POST https://gateway.pixazo.ai/pika-sfx/v1/text-to-sound-effects.
  2. Save the request_id from the 202 response.
  3. Poll GET /v2/requests/status/{request_id} every 10 seconds or so, or use a Webhook instead.
  4. When status is COMPLETED, download the audio file from output.media_url.

How Billing Is Measured

Billing is per second of the requested length: the per-second rate times duration (10 seconds when you leave it out). The prompt and seed do not change the amount. The amount is placed as a hold when the request is submitted and released in full if the request fails. The current prices are shown in the pricing panel on this page.

Pika SFX API Pricing

Billed per second of the requested length (1 to 20 seconds, 10 by default).

Billing unitPrice (USD)
Per second of sound (10 seconds when no length is given)$0.00021
5. Pika Music

Pika Music API Documentation

Generate music from a text description with Pika Music, with your own lyrics if you like. You choose its length (duration, 10 to 360 seconds). Asynchronous: submit returns a request_id; poll the status endpoint until the request is COMPLETED, then download the audio file from output.media_url.

POST https://gateway.pixazo.ai/pika-music/v1/text-to-music

Authentication

All requests require an API key passed via header.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour API subscription key

Text to Music - Pika Music

Request Code

POST https://gateway.pixazo.ai/pika-music/v1/text-to-music
Content-Type: application/json
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

{
  "prompt": "Calm lo-fi piano loop with soft vinyl crackle, instrumental.",
  "duration": 30
}
import requests

url = "https://gateway.pixazo.ai/pika-music/v1/text-to-music"
headers = {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
  "prompt": "Calm lo-fi piano loop with soft vinyl crackle, instrumental.",
  "duration": 30
}

resp = requests.post(url, json=data, headers=headers)
print(resp.json())
const res = await fetch("https://gateway.pixazo.ai/pika-music/v1/text-to-music", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
  },
  body: JSON.stringify({
  "prompt": "Calm lo-fi piano loop with soft vinyl crackle, instrumental.",
  "duration": 30
})
});
console.log(await res.json());
curl -X POST 'https://gateway.pixazo.ai/pika-music/v1/text-to-music' \
  -H 'Content-Type: application/json' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
  --data-raw '{"prompt": "Calm lo-fi piano loop with soft vinyl crackle, instrumental.", "duration": 30}'

Output

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

Webhook (Optional)

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

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

Example: enable Webhook

curl -X POST 'https://gateway.pixazo.ai/pika-music/v1/text-to-music' \
  -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": "Calm lo-fi piano loop with soft vinyl crackle, instrumental.", "duration": 30}'

Callback Payload (success)

{
  "request_id": "pika-music_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "pika-music",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/{request_id}/output.wav"
    ],
    "media_type": "audio/wav"
  },
  "created_at": "2026-10-09T10:04:54.387Z",
  "completed_at": "2026-10-09 10:06:21"
}

Failure callback shape

{
  "request_id": "pika-music_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "pika-music",
  "error": "Description of the failure"
}

Delivery semantics

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

Request Parameters

ParameterRequiredTypeDefaultAllowed values / rangeDescription
promptYesstring—Non-empty text, up to 4000 charactersThe music to make: the genre, mood, instruments, tempo and voice.
lyricsNostring—Text, up to 8000 charactersWords to sing. Leave it out for music without your lyrics.
durationNointeger3010–360Length of the music in whole seconds. Billing is per second of this length.
rewrite_promptNobooleanfalsetrue, falsetrue lets the model rewrite your prompt before it makes the music. It does not change the amount billed.
seedNointegerRandom-1–2147483647Seed for the random generator; leave it out for a random seed. It does not change the amount billed.

Good to know

  • Each request returns one piece of music; send one request per piece of music.
  • Only text to music is offered: music covers and singing in a cloned voice are not.
  • Send every field at the top level of the JSON body, and omit a field instead of sending null.
  • Use the JSON types shown: duration and seed are numbers (7, not "7").
  • Set a Webhook with the X-Webhook-URL header (see Webhook), not in the JSON body.
  • A field this operation does not take is refused with a 400 that says where it belongs (see Response Handling).
  • The result is returned as a URL in output.media_url: one WAV file per request.

Length and Lyrics

  • Set duration to the length you want in whole seconds, from 10 to 360 (up to 6 minutes); 30 applies when you leave it out. Billing is per second of this length.
  • Send words to sing in lyrics (up to 8000 characters), and describe the music in prompt: the genre, mood, instruments and voice.
  • rewrite_prompt set to true lets the model rewrite your prompt first; false (the default) uses it as written. Neither changes the amount billed.

Example: one minute of pop with lyrics

{
  "prompt": "Upbeat indie pop with bright guitars and a warm female vocal.",
  "lyrics": "City lights are waking up, coffee in a paper cup. We run, we run, into the sun.",
  "duration": 60,
  "rewrite_prompt": true
}

Example Request

{
  "prompt": "Calm lo-fi piano loop with soft vinyl crackle, instrumental.",
  "duration": 30
}

Example Response

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

Request Headers

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

Response Handling

Status CodeMeaning
202Accepted — request queued; returns request_id and polling_url.
400Invalid request — a required field is missing, a value has the wrong type, is out of range or is not one of the allowed values, or a field this operation does not accept was sent. The message says what to fix.
401Unauthorized — missing or invalid subscription key.
402Insufficient balance for the hold this request needs.
429Too many requests.
500Internal server error.

Parameter problems are caught when you submit and returned as a 400, before any hold is placed on your balance. Problems that need the model to run are reported through the status endpoint as status: "ERROR", with a message in error saying what went wrong. Failed requests are not billed — the hold is released in full.

ConditionHow it surfaces
Missing or invalid subscription keysynchronous 401
Balance too low for the holdsynchronous 402
Missing or empty prompt, prompt not a string, or longer than 4000 characterssynchronous 400
lyrics not a string, or longer than 8000 characterssynchronous 400
duration not a whole number from 10 to 360 — for example 370 or the string "10"synchronous 400
rewrite_prompt not true or falsesynchronous 400
seed not a whole number from -1 to 2147483647 — for example -2 or the string "0"synchronous 400
mode: only text-to-music is offered: leave mode outsynchronous 400
source_audio: music covers are not offeredsynchronous 400
reference_audio, clean_reference_audio, voice_consent_attested: singing in a cloned voice (voice-conditioned music) is not offeredsynchronous 400
seconds, music_length_ms, length, num_frames, frames_per_second: set the length with duration (whole seconds, 10-360)synchronous 400
text, content: send the description in prompt and the words in lyricssynchronous 400
webhook_url, callback_url: send the webhook URL in the X-Webhook-URL headersynchronous 400
batch_size, num_images, number_of_images, n, count: one request makes one resultsynchronous 400
parameters: send the fields at the top level of the JSON bodysynchronous 400
A prompt or media the model refuses, for example under its content policy (nothing is charged)status: "ERROR"
A temporary problem on the provider side (nothing is charged; try again later)status: "ERROR"

Example error responses

A refused request returns error, a message that joins every problem found, and the same problems one by one in violations.

Missing prompt (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'prompt' is required",
  "violations": [
    "'prompt' is required"
  ]
}

A value out of range (synchronous 400)

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

A seed out of range (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'seed' must be >= -1 (got -2)",
  "violations": [
    "'seed' must be >= -1 (got -2)"
  ]
}

A number sent as a string (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'duration' must be integer (got string)",
  "violations": [
    "'duration' must be integer (got string)"
  ]
}

mode, which this operation does not take (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'mode' must be one of:  (got \"cover\"); 'mode' is not accepted by Pika Music. Only text-to-music is offered: leave mode out.",
  "violations": [
    "'mode' must be one of:  (got \"cover\")",
    "'mode' is not accepted by Pika Music. Only text-to-music is offered: leave mode out."
  ]
}

Retrieving Results

Poll the status endpoint with the request_id from the submit response until status is COMPLETED or ERROR, then download the audio file from output.media_url. Treat any status other than QUEUED, PROCESSING or COMPLETED as a failure.

Endpoint

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

cURL example

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

Completed response

{
  "request_id": "pika-music_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "pika-music",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/{request_id}/output.wav"
    ],
    "media_type": "audio/wav"
  },
  "created_at": "2026-10-09T10:04:54.387Z",
  "completed_at": "2026-10-09 10:06:21"
}

Response Fields

FieldTypeDescription
request_idstringUnique request identifier.
statusstringQUEUED, PROCESSING, COMPLETED or ERROR.
model_idstringThe model that handled the request — pika-music for this endpoint.
output.media_urlarray of stringsURL of the audio file (one WAV file per request).
output.media_typestringaudio/wav.
created_atstringRequest creation timestamp.
completed_atstringCompletion timestamp.
errorstringError message when status is ERROR.
polling_urlstringStatus URL for this request (submit response only).

Status Values & Flow

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

Typical workflow

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

How Billing Is Measured

Billing is per second of the requested length: the per-second rate times duration (30 seconds when you leave it out). The prompt, lyrics, prompt rewrite and seed do not change the amount. The amount is placed as a hold when the request is submitted and released in full if the request fails. The current prices are shown in the pricing panel on this page.

Pika Music API Pricing

Billed per second of the requested length, in whole seconds (10 to 360 seconds, 30 by default), at the per-minute rate. The lyrics, the prompt rewrite and the seed do not change the rate.

Billing unitPrice (USD)
Per minute of music, billed by the second of the length asked for (30 seconds when no length is given)$0.01575
6. Pika Speech

Pika Speech API Documentation

Turn text into speech with Pika Speech: send the words in text and pick one of 76 voices in voice_preset. Asynchronous: submit returns a request_id; poll the status endpoint until the request is COMPLETED, then download the audio file from output.media_url.

POST https://gateway.pixazo.ai/pika-speech/v1/text-to-speech

Authentication

All requests require an API key passed via header.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour API subscription key

Text to Speech - Pika Speech

Request Code

POST https://gateway.pixazo.ai/pika-speech/v1/text-to-speech
Content-Type: application/json
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

{
  "text": "Welcome to Pixazo. This voice was made from text in a few seconds.",
  "voice_preset": "calm_documentary_narrator"
}
import requests

url = "https://gateway.pixazo.ai/pika-speech/v1/text-to-speech"
headers = {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
  "text": "Welcome to Pixazo. This voice was made from text in a few seconds.",
  "voice_preset": "calm_documentary_narrator"
}

resp = requests.post(url, json=data, headers=headers)
print(resp.json())
const res = await fetch("https://gateway.pixazo.ai/pika-speech/v1/text-to-speech", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
  },
  body: JSON.stringify({
  "text": "Welcome to Pixazo. This voice was made from text in a few seconds.",
  "voice_preset": "calm_documentary_narrator"
})
});
console.log(await res.json());
curl -X POST 'https://gateway.pixazo.ai/pika-speech/v1/text-to-speech' \
  -H 'Content-Type: application/json' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
  --data-raw '{"text": "Welcome to Pixazo. This voice was made from text in a few seconds.", "voice_preset": "calm_documentary_narrator"}'

Output

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

Webhook (Optional)

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

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

Example: enable Webhook

curl -X POST 'https://gateway.pixazo.ai/pika-speech/v1/text-to-speech' \
  -H 'Content-Type: application/json' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
  -H 'X-Webhook-URL: https://your-server.com/webhook' \
  --data-raw '{"text": "Welcome to Pixazo. This voice was made from text in a few seconds.", "voice_preset": "calm_documentary_narrator"}'

Callback Payload (success)

{
  "request_id": "pika-speech_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "pika-speech",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/{request_id}/output.wav"
    ],
    "media_type": "audio/wav"
  },
  "created_at": "2026-10-09T10:04:54.387Z",
  "completed_at": "2026-10-09 10:06:21"
}

Failure callback shape

{
  "request_id": "pika-speech_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "pika-speech",
  "error": "Description of the failure"
}

Delivery semantics

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

Request Parameters

ParameterRequiredTypeDefaultAllowed values / rangeDescription
textYesstring—Non-empty text, up to 15000 charactersThe words to speak.
voice_presetYesstring—One of the 76 voices listed under VoicesThe voice, written exactly as listed under Voices.
seedNointegerRandom-1–2147483647Seed for the random generator; leave it out for a random seed. It does not change the amount billed.

Good to know

  • Each request returns one audio file; send one request per audio file.
  • Voice cloning is not offered: pick one of the voices listed under Voices.
  • Send every field at the top level of the JSON body, and omit a field instead of sending null.
  • Use the JSON types shown: seed is a number (7, not "7").
  • Set a Webhook with the X-Webhook-URL header (see Webhook), not in the JSON body.
  • A field this operation does not take is refused with a 400 that says where it belongs (see Response Handling).
  • The result is returned as a URL in output.media_url: one WAV file per request.

Voices

Set voice_preset to one of these 76 voices, written exactly as listed. Voice cloning is not offered.

deep_trailer_bass, warm_honey_drawl, fast_talking_wiseguy, graceful_elder_storyteller, chill_surfer_dude, bubbly_it_girl, roaring_locker_room_coach, calm_documentary_narrator, velvet_radio_alto, gruff_slow_drawl, brassy_sharp_wit, vintage_radio_showman, gentle_hushed_librarian, rapid_sports_caller, warm_playful_spark, folksy_porch_storyteller, crisp_founder_pitch, smoky_noir_monotone, sunny_morning_host, cozy_grandpa_storyteller, plummy_posh_gentleman, cheeky_bright_charmer, rapid_market_banter, stern_clipped_headmistress, hearty_fireside_rumble, soft_thoughtful_lilt, musical_poetic_lilt, melodic_quick_storyteller, gravelly_deadpan, imperious_grande_dame, dry_cheerful_joker, polished_news_anchor, warm_grounded_friend, commanding_safari_guide, rhythmic_radio_charmer, mellow_wise_elder, lilting_warm_hostess, articulate_tech_lead, booming_epic_showman, cool_minimal_designer, precise_stern_engineer, breathy_chic_charm, slow_heavy_brooder, fiery_passionate_cook, loving_loud_grandma, gentle_careful_sweetness, velvet_worldly_narrator, deep_night_storyteller, bright_peppy_vlogger, poised_documentary_calm, grumpy_soft_heart, zany_kid_inventor, hammy_pirate_captain, theatrical_scheming_villain, slow_goofy_giant, wheezy_batty_wizard, raspy_scrappy_kid, chatty_beauty_bestie, hyped_gym_motivator, soft_cozy_aesthetic, smooth_hype_unboxer, bored_chic_trendsetter, joyful_food_fanatic, deadpan_ironic_fry, mellow_road_tripper, breathy_luxe_diva, fast_nerdy_reviewer, unhinged_arena_hype, abyssal_doom_growl, airhorn_club_mc, barking_drill_fury, smoky_mystic_drama, booming_ring_announcer, feather_whisper_asmr, seismic_boss_god, thunderous_revival_preacher

Example: another voice, with a fixed seed

{
  "text": "Thanks for calling. Your order is on its way and should arrive tomorrow.",
  "voice_preset": "warm_grounded_friend",
  "seed": 7
}

Example Request

{
  "text": "Welcome to Pixazo. This voice was made from text in a few seconds.",
  "voice_preset": "calm_documentary_narrator"
}

Example Response

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

Request Headers

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

Response Handling

Status CodeMeaning
202Accepted — request queued; returns request_id and polling_url.
400Invalid request — a required field is missing, a value has the wrong type, is out of range or is not one of the allowed values, or a field this operation does not accept was sent. The message says what to fix.
401Unauthorized — missing or invalid subscription key.
402Insufficient balance for the hold this request needs.
429Too many requests.
500Internal server error.

Parameter problems are caught when you submit and returned as a 400, before any hold is placed on your balance. Problems that need the model to run are reported through the status endpoint as status: "ERROR", with a message in error saying what went wrong. Failed requests are not billed — the hold is released in full.

ConditionHow it surfaces
Missing or invalid subscription keysynchronous 401
Balance too low for the holdsynchronous 402
Missing or empty text, text not a string, or longer than 15000 characterssynchronous 400
Missing voice_preset, or not one of the 76 listed voices (written exactly as listed)synchronous 400
seed not a whole number from -1 to 2147483647 — for example -2 or the string "0"synchronous 400
script, prompt, content, input: send the words in textsynchronous 400
reference_audio, voice_consent_attested: voice cloning is not offered: pick one of the 76 voices in voice_presetsynchronous 400
voice, voice_id: pick the voice with voice_presetsynchronous 400
webhook_url, callback_url: send the webhook URL in the X-Webhook-URL headersynchronous 400
batch_size, num_images, number_of_images, n, count: one request makes one resultsynchronous 400
parameters: send the fields at the top level of the JSON bodysynchronous 400
A prompt or media the model refuses, for example under its content policy (nothing is charged)status: "ERROR"
A temporary problem on the provider side (nothing is charged; try again later)status: "ERROR"

Example error responses

A refused request returns error, a message that joins every problem found, and the same problems one by one in violations.

Missing text (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'text' is required",
  "violations": [
    "'text' is required"
  ]
}

A value that is not allowed (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'voice_preset' must be one of: \"deep_trailer_bass\", \"warm_honey_drawl\", \"fast_talking_wiseguy\", \"graceful_elder_storyteller\", \"chill_surfer_dude\", \"bubbly_it_girl\", \"roaring_locker_room_coach\", \"calm_documentary_narrator\", \"velvet_radio_alto\", \"gruff_slow_drawl\", \"brassy_sharp_wit\", \"vintage_radio_showman\", \"gentle_hushed_librarian\", \"rapid_sports_caller\", \"warm_playful_spark\", \"folksy_porch_storyteller\", \"crisp_founder_pitch\", \"smoky_noir_monotone\", \"sunny_morning_host\", \"cozy_grandpa_storyteller\", \"plummy_posh_gentleman\", \"cheeky_bright_charmer\", \"rapid_market_banter\", \"stern_clipped_headmistress\", \"hearty_fireside_rumble\", \"soft_thoughtful_lilt\", \"musical_poetic_lilt\", \"melodic_quick_storyteller\", \"gravelly_deadpan\", \"imperious_grande_dame\", \"dry_cheerful_joker\", \"polished_news_anchor\", \"warm_grounded_friend\", \"commanding_safari_guide\", \"rhythmic_radio_charmer\", \"mellow_wise_elder\", \"lilting_warm_hostess\", \"articulate_tech_lead\", \"booming_epic_showman\", \"cool_minimal_designer\", \"precise_stern_engineer\", \"breathy_chic_charm\", \"slow_heavy_brooder\", \"fiery_passionate_cook\", \"loving_loud_grandma\", \"gentle_careful_sweetness\", \"velvet_worldly_narrator\", \"deep_night_storyteller\", \"bright_peppy_vlogger\", \"poised_documentary_calm\", \"grumpy_soft_heart\", \"zany_kid_inventor\", \"hammy_pirate_captain\", \"theatrical_scheming_villain\", \"slow_goofy_giant\", \"wheezy_batty_wizard\", \"raspy_scrappy_kid\", \"chatty_beauty_bestie\", \"hyped_gym_motivator\", \"soft_cozy_aesthetic\", \"smooth_hype_unboxer\", \"bored_chic_trendsetter\", \"joyful_food_fanatic\", \"deadpan_ironic_fry\", \"mellow_road_tripper\", \"breathy_luxe_diva\", \"fast_nerdy_reviewer\", \"unhinged_arena_hype\", \"abyssal_doom_growl\", \"airhorn_club_mc\", \"barking_drill_fury\", \"smoky_mystic_drama\", \"booming_ring_announcer\", \"feather_whisper_asmr\", \"seismic_boss_god\", \"thunderous_revival_preacher\" (got \"narrator\")",
  "violations": [
    "'voice_preset' must be one of: \"deep_trailer_bass\", \"warm_honey_drawl\", \"fast_talking_wiseguy\", \"graceful_elder_storyteller\", \"chill_surfer_dude\", \"bubbly_it_girl\", \"roaring_locker_room_coach\", \"calm_documentary_narrator\", \"velvet_radio_alto\", \"gruff_slow_drawl\", \"brassy_sharp_wit\", \"vintage_radio_showman\", \"gentle_hushed_librarian\", \"rapid_sports_caller\", \"warm_playful_spark\", \"folksy_porch_storyteller\", \"crisp_founder_pitch\", \"smoky_noir_monotone\", \"sunny_morning_host\", \"cozy_grandpa_storyteller\", \"plummy_posh_gentleman\", \"cheeky_bright_charmer\", \"rapid_market_banter\", \"stern_clipped_headmistress\", \"hearty_fireside_rumble\", \"soft_thoughtful_lilt\", \"musical_poetic_lilt\", \"melodic_quick_storyteller\", \"gravelly_deadpan\", \"imperious_grande_dame\", \"dry_cheerful_joker\", \"polished_news_anchor\", \"warm_grounded_friend\", \"commanding_safari_guide\", \"rhythmic_radio_charmer\", \"mellow_wise_elder\", \"lilting_warm_hostess\", \"articulate_tech_lead\", \"booming_epic_showman\", \"cool_minimal_designer\", \"precise_stern_engineer\", \"breathy_chic_charm\", \"slow_heavy_brooder\", \"fiery_passionate_cook\", \"loving_loud_grandma\", \"gentle_careful_sweetness\", \"velvet_worldly_narrator\", \"deep_night_storyteller\", \"bright_peppy_vlogger\", \"poised_documentary_calm\", \"grumpy_soft_heart\", \"zany_kid_inventor\", \"hammy_pirate_captain\", \"theatrical_scheming_villain\", \"slow_goofy_giant\", \"wheezy_batty_wizard\", \"raspy_scrappy_kid\", \"chatty_beauty_bestie\", \"hyped_gym_motivator\", \"soft_cozy_aesthetic\", \"smooth_hype_unboxer\", \"bored_chic_trendsetter\", \"joyful_food_fanatic\", \"deadpan_ironic_fry\", \"mellow_road_tripper\", \"breathy_luxe_diva\", \"fast_nerdy_reviewer\", \"unhinged_arena_hype\", \"abyssal_doom_growl\", \"airhorn_club_mc\", \"barking_drill_fury\", \"smoky_mystic_drama\", \"booming_ring_announcer\", \"feather_whisper_asmr\", \"seismic_boss_god\", \"thunderous_revival_preacher\" (got \"narrator\")"
  ]
}

A seed out of range (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'seed' must be >= -1 (got -2)",
  "violations": [
    "'seed' must be >= -1 (got -2)"
  ]
}

A number sent as a string (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'seed' must be integer (got string)",
  "violations": [
    "'seed' must be integer (got string)"
  ]
}

voice_id, which this operation does not take (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'voice_id' must be one of:  (got \"narrator\"); 'voice_id' is not accepted by Pika Speech. Pick the voice with voice_preset.",
  "violations": [
    "'voice_id' must be one of:  (got \"narrator\")",
    "'voice_id' is not accepted by Pika Speech. Pick the voice with voice_preset."
  ]
}

Retrieving Results

Poll the status endpoint with the request_id from the submit response until status is COMPLETED or ERROR, then download the audio file from output.media_url. Treat any status other than QUEUED, PROCESSING or COMPLETED as a failure.

Endpoint

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

cURL example

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

Completed response

{
  "request_id": "pika-speech_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "pika-speech",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/{request_id}/output.wav"
    ],
    "media_type": "audio/wav"
  },
  "created_at": "2026-10-09T10:04:54.387Z",
  "completed_at": "2026-10-09 10:06:21"
}

Response Fields

FieldTypeDescription
request_idstringUnique request identifier.
statusstringQUEUED, PROCESSING, COMPLETED or ERROR.
model_idstringThe model that handled the request — pika-speech for this endpoint.
output.media_urlarray of stringsURL of the audio file (one WAV file per request).
output.media_typestringaudio/wav.
created_atstringRequest creation timestamp.
completed_atstringCompletion timestamp.
errorstringError message when status is ERROR.
polling_urlstringStatus URL for this request (submit response only).

Status Values & Flow

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

Typical workflow

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

How Billing Is Measured

Billing is per second of speech. When you submit, a hold is placed for each started block of 1000 characters of text (at least one block). When the audio is ready, the amount is settled for the length of the speech made, not rounded to whole seconds, and the rest of the hold is released; for a slow voice the settled amount can be more than the hold. If the final amount is not available when the audio is ready, the hold is charged instead. The voice and seed do not change the per-second rate. If the request fails, the hold is released in full. The current rates are shown in the pricing panel on this page.

Pika Speech API Pricing

Billed for the length of the speech returned, not rounded to whole seconds, at the per-minute rate. The voice and the seed do not change the rate.

Your request will cost $0.0105 per minute of generated audio.
7. Pikaffects

Pikaffects API Documentation

Turn a photo into a short video effect with Pikaffects: pick one of 62 effects in pikaffect and send the photo in image. 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/pikaffects/v1/image-to-video

Authentication

All requests require an API key passed via header.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour API subscription key

Image to Video - Pikaffects

Request Code

POST https://gateway.pixazo.ai/pikaffects/v1/image-to-video
Content-Type: application/json
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

{
  "pikaffect": "Levitate",
  "image": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"
}
import requests

url = "https://gateway.pixazo.ai/pikaffects/v1/image-to-video"
headers = {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
  "pikaffect": "Levitate",
  "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/pikaffects/v1/image-to-video", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
  },
  body: JSON.stringify({
  "pikaffect": "Levitate",
  "image": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"
})
});
console.log(await res.json());
curl -X POST 'https://gateway.pixazo.ai/pikaffects/v1/image-to-video' \
  -H 'Content-Type: application/json' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
  --data-raw '{"pikaffect": "Levitate", "image": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"}'

Output

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

Webhook (Optional)

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

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

Example: enable Webhook

curl -X POST 'https://gateway.pixazo.ai/pikaffects/v1/image-to-video' \
  -H 'Content-Type: application/json' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
  -H 'X-Webhook-URL: https://your-server.com/webhook' \
  --data-raw '{"pikaffect": "Levitate", "image": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"}'

Callback Payload (success)

{
  "request_id": "pikaffects_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "pikaffects",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/{request_id}/output.mp4"
    ],
    "media_type": "video/mp4"
  },
  "created_at": "2026-10-09T10:04:54.387Z",
  "completed_at": "2026-10-09 10:06:21"
}

Failure callback shape

{
  "request_id": "pikaffects_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "pikaffects",
  "error": "Description of the failure"
}

Delivery semantics

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

Request Parameters

ParameterRequiredTypeDefaultAllowed values / rangeDescription
pikaffectYesstring—One of the 62 effects listed under EffectsThe effect, written exactly as listed under Effects (spelling, spaces and capitals).
imageYesstring—A publicly reachable http(s) URLThe photo to apply the effect to: a publicly reachable image (JPEG, PNG or WebP).
prompt_overrideNostring—Text, up to 10000 charactersText that replaces the effect's own prompt. Optional.
seedNointegerRandom0–2147483647Seed for the random generator; leave it out for a random seed. It does not change the amount billed.

Good to know

  • Each request returns one video; send one request per video.
  • Effects for videos are a separate operation: Pikaffects Video to Video.
  • Send every field at the top level of the JSON body, and omit a field instead of sending null.
  • Use the JSON types shown: seed is a number (7, not "7").
  • Set a Webhook with the X-Webhook-URL header (see Webhook), not in the JSON body.
  • A field this operation does not take is refused with a 400 that says where it belongs (see Response Handling).
  • The result is returned as a URL in output.media_url: one MP4 file per request.

Effects

Set pikaffect to one of these 62 photo effects, written exactly as listed (spelling, spaces and capitals). Every effect is billed the same.

90s Me, Action Me, Arcade Winner, Baby Me, Bald Me, Balloonify it, CCTV Me, Cake-ify, Captain Me, Choco Me, Classy Me, Clown Fit, Crazy in Love, Crumble, Crush, Cupid Strike, Decapitate, Deflate, Dissolve, Doom Stroll, Eat a Rat, Epic Me, Everythings Bonsai, Explode, Eye-pop, Eyes Zoom in, Fairytale Me, Goth Dream, Hazmat Fit, Hearts Bouquet, Hero Me, Human Pet, Inflate, Jungle Me, Labubu Style, Leprechaun Me, Levitate, Lo-Fi Me, Looong Hair, Love Bomb, Magic Polaroid, Make it Real, Melt, Mona Me, Mrs Me, Museum Me, Peel, Pick Me, Poke, Princess Me, Proposal, Puppy Me, Rose, Royal Me, Squish, Ta-da, Tarot Transform, Tear, VIP Me, Warrior Me, Yarn Charm, Zen Me

Example: another effect, with a fixed seed

{
  "pikaffect": "Cake-ify",
  "image": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg",
  "seed": 42
}

Example Request

{
  "pikaffect": "Levitate",
  "image": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"
}

Example Response

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

Request Headers

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

Response Handling

Status CodeMeaning
202Accepted — request queued; returns request_id and polling_url.
400Invalid request — a required field is missing, a value has the wrong type, is out of range or is not one of the allowed values, a field this operation does not accept was sent, or an input file could not be downloaded (error: Asset proxy failed). The message says what to fix.
401Unauthorized — missing or invalid subscription key.
402Insufficient balance for the hold this request needs.
429Too many requests.
500Internal server error.

Parameter problems are caught when you submit and returned as a 400, before any hold is placed on your balance. Problems that need the model to run are reported through the status endpoint as status: "ERROR", with a message in error saying what went wrong. Failed requests are not billed — the hold is released in full.

ConditionHow it surfaces
Missing or invalid subscription keysynchronous 401
Balance too low for the holdsynchronous 402
Missing pikaffect, or not one of the 62 listed effects (written exactly as listed)synchronous 400
Missing image, or image not a single publicly reachable http(s) URLsynchronous 400
prompt_override not a string, or longer than 10000 characterssynchronous 400
seed not a whole number from 0 to 2147483647 — for example -1 or the string "0"synchronous 400
video, video_url: video effects go to POST https://gateway.pixazo.ai/pikaffects/v1/video-to-videosynchronous 400
prompt: use prompt_override (it replaces the effect's own recipe prompt)synchronous 400
resolution, duration, duration_s, aspect_ratio: Pikaffects has no resolution, length or aspect settingsynchronous 400
image_url, image_urls: send the image in imagesynchronous 400
webhook_url, callback_url: send the webhook URL in the X-Webhook-URL headersynchronous 400
batch_size, num_images, number_of_images, n, count: one request makes one resultsynchronous 400
parameters: send the fields at the top level of the JSON bodysynchronous 400
An image URL that cannot be downloaded (nothing is charged)synchronous 400 (error: Asset proxy failed)
An image or video the model cannot use, for example an unsupported format (nothing is charged)status: "ERROR"
A prompt or media the model refuses, for example under its content policy (nothing is charged)status: "ERROR"
A temporary problem on the provider side (nothing is charged; try again later)status: "ERROR"

Example error responses

A refused request returns error, a message that joins every problem found, and the same problems one by one in violations.

Missing pikaffect (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'pikaffect' is required",
  "violations": [
    "'pikaffect' is required"
  ]
}

A value that is not allowed (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'pikaffect' must be one of: \"90s Me\", \"Action Me\", \"Arcade Winner\", \"Baby Me\", \"Bald Me\", \"Balloonify it\", \"CCTV Me\", \"Cake-ify\", \"Captain Me\", \"Choco Me\", \"Classy Me\", \"Clown Fit\", \"Crazy in Love\", \"Crumble\", \"Crush\", \"Cupid Strike\", \"Decapitate\", \"Deflate\", \"Dissolve\", \"Doom Stroll\", \"Eat a Rat\", \"Epic Me\", \"Everythings Bonsai\", \"Explode\", \"Eye-pop\", \"Eyes Zoom in\", \"Fairytale Me\", \"Goth Dream\", \"Hazmat Fit\", \"Hearts Bouquet\", \"Hero Me\", \"Human Pet\", \"Inflate\", \"Jungle Me\", \"Labubu Style\", \"Leprechaun Me\", \"Levitate\", \"Lo-Fi Me\", \"Looong Hair\", \"Love Bomb\", \"Magic Polaroid\", \"Make it Real\", \"Melt\", \"Mona Me\", \"Mrs Me\", \"Museum Me\", \"Peel\", \"Pick Me\", \"Poke\", \"Princess Me\", \"Proposal\", \"Puppy Me\", \"Rose\", \"Royal Me\", \"Squish\", \"Ta-da\", \"Tarot Transform\", \"Tear\", \"VIP Me\", \"Warrior Me\", \"Yarn Charm\", \"Zen Me\" (got \"90s me\")",
  "violations": [
    "'pikaffect' must be one of: \"90s Me\", \"Action Me\", \"Arcade Winner\", \"Baby Me\", \"Bald Me\", \"Balloonify it\", \"CCTV Me\", \"Cake-ify\", \"Captain Me\", \"Choco Me\", \"Classy Me\", \"Clown Fit\", \"Crazy in Love\", \"Crumble\", \"Crush\", \"Cupid Strike\", \"Decapitate\", \"Deflate\", \"Dissolve\", \"Doom Stroll\", \"Eat a Rat\", \"Epic Me\", \"Everythings Bonsai\", \"Explode\", \"Eye-pop\", \"Eyes Zoom in\", \"Fairytale Me\", \"Goth Dream\", \"Hazmat Fit\", \"Hearts Bouquet\", \"Hero Me\", \"Human Pet\", \"Inflate\", \"Jungle Me\", \"Labubu Style\", \"Leprechaun Me\", \"Levitate\", \"Lo-Fi Me\", \"Looong Hair\", \"Love Bomb\", \"Magic Polaroid\", \"Make it Real\", \"Melt\", \"Mona Me\", \"Mrs Me\", \"Museum Me\", \"Peel\", \"Pick Me\", \"Poke\", \"Princess Me\", \"Proposal\", \"Puppy Me\", \"Rose\", \"Royal Me\", \"Squish\", \"Ta-da\", \"Tarot Transform\", \"Tear\", \"VIP Me\", \"Warrior Me\", \"Yarn Charm\", \"Zen Me\" (got \"90s me\")"
  ]
}

A seed out of range (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'seed' must be >= 0 (got -1)",
  "violations": [
    "'seed' must be >= 0 (got -1)"
  ]
}

A number sent as a string (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'seed' must be integer (got string)",
  "violations": [
    "'seed' must be integer (got string)"
  ]
}

prompt, which this operation does not take (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'prompt' is not accepted by Pikaffects image-to-video. Use prompt_override (it replaces the effect's own recipe prompt).",
  "violations": [
    "'prompt' is not accepted by Pikaffects image-to-video. Use prompt_override (it replaces the effect's own recipe prompt)."
  ]
}

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. Treat any status other than QUEUED, PROCESSING or COMPLETED as a failure.

Endpoint

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

cURL example

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

Completed response

{
  "request_id": "pikaffects_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "pikaffects",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/{request_id}/output.mp4"
    ],
    "media_type": "video/mp4"
  },
  "created_at": "2026-10-09T10:04:54.387Z",
  "completed_at": "2026-10-09 10:06:21"
}

Response Fields

FieldTypeDescription
request_idstringUnique request identifier.
statusstringQUEUED, PROCESSING, COMPLETED or ERROR.
model_idstringThe model that handled the request — pikaffects for this endpoint.
output.media_urlarray of stringsURL of the video (one MP4 file per request).
output.media_typestringvideo/mp4.
created_atstringRequest creation timestamp.
completed_atstringCompletion timestamp.
errorstringError message when status is ERROR.
polling_urlstringStatus URL for this request (submit response only).

Status Values & Flow

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

Typical workflow

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

How Billing Is Measured

Billing is per request: one flat amount for each video, whichever effect you pick. The image, prompt override and seed do not change the amount. The amount is placed as a hold when the request is submitted and released in full if the request fails. The current prices are shown in the pricing panel on this page.

Pikaffects API Pricing

One price per video, whichever of the 62 effects you pick.

Your request will cost $0.0525 per video.
Video to Video

Pikaffects API Documentation

Apply a video effect to your video with Pikaffects: pick one of 9 effects in pikaffect and send the video in video. 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/pikaffects/v1/video-to-video

Authentication

All requests require an API key passed via header.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour API subscription key

Video to Video - Pikaffects

Request Code

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

{
  "pikaffect": "Its Alive",
  "video": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/video/input-5s.mp4"
}
import requests

url = "https://gateway.pixazo.ai/pikaffects/v1/video-to-video"
headers = {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
  "pikaffect": "Its Alive",
  "video": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/video/input-5s.mp4"
}

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

Output

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

Webhook (Optional)

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

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

Example: enable Webhook

curl -X POST 'https://gateway.pixazo.ai/pikaffects/v1/video-to-video' \
  -H 'Content-Type: application/json' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
  -H 'X-Webhook-URL: https://your-server.com/webhook' \
  --data-raw '{"pikaffect": "Its Alive", "video": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/video/input-5s.mp4"}'

Callback Payload (success)

{
  "request_id": "pikaffects_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "pikaffects",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/{request_id}/output.mp4"
    ],
    "media_type": "video/mp4"
  },
  "created_at": "2026-10-09T10:04:54.387Z",
  "completed_at": "2026-10-09 10:06:21"
}

Failure callback shape

{
  "request_id": "pikaffects_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "pikaffects",
  "error": "Description of the failure"
}

Delivery semantics

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

Request Parameters

ParameterRequiredTypeDefaultAllowed values / rangeDescription
pikaffectYesstring—One of the 9 effects listed under EffectsThe effect, written exactly as listed under Effects (spelling, spaces and capitals).
videoYesstring—A publicly reachable http(s) URLThe video to apply the effect to: a publicly reachable video file (for example MP4).
seedNointegerRandom0–2147483647Seed for the random generator; leave it out for a random seed. It does not change the amount billed.

Good to know

  • Each request returns one video; send one request per video.
  • Effects for photos are a separate operation: Pikaffects Image to Video.
  • Send every field at the top level of the JSON body, and omit a field instead of sending null.
  • Use the JSON types shown: seed is a number (7, not "7").
  • Set a Webhook with the X-Webhook-URL header (see Webhook), not in the JSON body.
  • A field this operation does not take is refused with a 400 that says where it belongs (see Response Handling).
  • The result is returned as a URL in output.media_url: one MP4 file per request.

Effects

Set pikaffect to one of these 9 video effects, written exactly as listed (spelling, spaces and capitals). Every effect is billed the same.

Anime Cat, Cute Shroom, Duplicate it, Happy Asteroid, Its Alive, Its Computer, Pink Hair, Swan Head, Wizard Cat

Example: another effect, with a fixed seed

{
  "pikaffect": "Duplicate it",
  "video": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/video/input-5s.mp4",
  "seed": 42
}

Example Request

{
  "pikaffect": "Its Alive",
  "video": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/video/input-5s.mp4"
}

Example Response

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

Request Headers

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

Response Handling

Status CodeMeaning
202Accepted — request queued; returns request_id and polling_url.
400Invalid request — a required field is missing, a value has the wrong type, is out of range or is not one of the allowed values, a field this operation does not accept was sent, or an input file could not be downloaded (error: Asset proxy failed). The message says what to fix.
401Unauthorized — missing or invalid subscription key.
402Insufficient balance for the hold this request needs.
429Too many requests.
500Internal server error.

Parameter problems are caught when you submit and returned as a 400, before any hold is placed on your balance. Problems that need the model to run are reported through the status endpoint as status: "ERROR", with a message in error saying what went wrong. Failed requests are not billed — the hold is released in full.

ConditionHow it surfaces
Missing or invalid subscription keysynchronous 401
Balance too low for the holdsynchronous 402
Missing pikaffect, or not one of the 9 listed effects (written exactly as listed)synchronous 400
Missing video, or video not a single publicly reachable http(s) URLsynchronous 400
seed not a whole number from 0 to 2147483647 — for example -1 or the string "0"synchronous 400
image, image_url, image_urls: image effects go to POST https://gateway.pixazo.ai/pikaffects/v1/image-to-videosynchronous 400
prompt, prompt_override: video effects take no promptsynchronous 400
resolution, duration, duration_s, aspect_ratio: Pikaffects has no resolution, length or aspect settingsynchronous 400
video_url: send the video in videosynchronous 400
webhook_url, callback_url: send the webhook URL in the X-Webhook-URL headersynchronous 400
batch_size, num_images, number_of_images, n, count: one request makes one resultsynchronous 400
parameters: send the fields at the top level of the JSON bodysynchronous 400
A video URL that cannot be downloaded (nothing is charged)synchronous 400 (error: Asset proxy failed)
An image or video the model cannot use, for example an unsupported format (nothing is charged)status: "ERROR"
A prompt or media the model refuses, for example under its content policy (nothing is charged)status: "ERROR"
A temporary problem on the provider side (nothing is charged; try again later)status: "ERROR"

Example error responses

A refused request returns error, a message that joins every problem found, and the same problems one by one in violations.

Missing pikaffect (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'pikaffect' is required",
  "violations": [
    "'pikaffect' is required"
  ]
}

A value that is not allowed (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'pikaffect' must be one of: \"Anime Cat\", \"Cute Shroom\", \"Duplicate it\", \"Happy Asteroid\", \"Its Alive\", \"Its Computer\", \"Pink Hair\", \"Swan Head\", \"Wizard Cat\" (got \"anime cat\")",
  "violations": [
    "'pikaffect' must be one of: \"Anime Cat\", \"Cute Shroom\", \"Duplicate it\", \"Happy Asteroid\", \"Its Alive\", \"Its Computer\", \"Pink Hair\", \"Swan Head\", \"Wizard Cat\" (got \"anime cat\")"
  ]
}

A seed out of range (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'seed' must be >= 0 (got -1)",
  "violations": [
    "'seed' must be >= 0 (got -1)"
  ]
}

A number sent as a string (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'seed' must be integer (got string)",
  "violations": [
    "'seed' must be integer (got string)"
  ]
}

prompt, which this operation does not take (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'prompt' is not accepted by Pikaffects video-to-video. Video effects take no prompt.",
  "violations": [
    "'prompt' is not accepted by Pikaffects video-to-video. Video effects take no prompt."
  ]
}

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. Treat any status other than QUEUED, PROCESSING or COMPLETED as a failure.

Endpoint

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

cURL example

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

Completed response

{
  "request_id": "pikaffects_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "pikaffects",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/{request_id}/output.mp4"
    ],
    "media_type": "video/mp4"
  },
  "created_at": "2026-10-09T10:04:54.387Z",
  "completed_at": "2026-10-09 10:06:21"
}

Response Fields

FieldTypeDescription
request_idstringUnique request identifier.
statusstringQUEUED, PROCESSING, COMPLETED or ERROR.
model_idstringThe model that handled the request — pikaffects for this endpoint.
output.media_urlarray of stringsURL of the video (one MP4 file per request).
output.media_typestringvideo/mp4.
created_atstringRequest creation timestamp.
completed_atstringCompletion timestamp.
errorstringError message when status is ERROR.
polling_urlstringStatus URL for this request (submit response only).

Status Values & Flow

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

Typical workflow

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

How Billing Is Measured

Billing is per request: one flat amount for each video, whichever effect you pick. The video and seed do not change the amount. The amount is placed as a hold when the request is submitted and released in full if the request fails. The current prices are shown in the pricing panel on this page.

Pikaffects API Pricing

One price per video, whichever of the 9 effects you pick.

Your request will cost $0.0525 per video.
8. Pikadditions

Pikadditions API Documentation

Add something new to your video with Pikadditions: send the video in video and describe what to add in prompt, with an optional reference image. 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/pikadditions/v1/video-to-video

Authentication

All requests require an API key passed via header.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour API subscription key

Video to Video - Pikadditions

Request Code

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

{
  "video": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/video/input-5s.mp4",
  "prompt": "Add a small red balloon floating in the air.",
  "duration": 5,
  "resolution": "1080p"
}
import requests

url = "https://gateway.pixazo.ai/pikadditions/v1/video-to-video"
headers = {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
  "video": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/video/input-5s.mp4",
  "prompt": "Add a small red balloon floating in the air.",
  "duration": 5,
  "resolution": "1080p"
}

resp = requests.post(url, json=data, headers=headers)
print(resp.json())
const res = await fetch("https://gateway.pixazo.ai/pikadditions/v1/video-to-video", {
  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-5s.mp4",
  "prompt": "Add a small red balloon floating in the air.",
  "duration": 5,
  "resolution": "1080p"
})
});
console.log(await res.json());
curl -X POST 'https://gateway.pixazo.ai/pikadditions/v1/video-to-video' \
  -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-5s.mp4", "prompt": "Add a small red balloon floating in the air.", "duration": 5, "resolution": "1080p"}'

Output

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

Webhook (Optional)

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

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

Example: enable Webhook

curl -X POST 'https://gateway.pixazo.ai/pikadditions/v1/video-to-video' \
  -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-5s.mp4", "prompt": "Add a small red balloon floating in the air.", "duration": 5, "resolution": "1080p"}'

Callback Payload (success)

{
  "request_id": "pikadditions_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "pikadditions",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/{request_id}/output.mp4"
    ],
    "media_type": "video/mp4"
  },
  "created_at": "2026-10-09T10:04:54.387Z",
  "completed_at": "2026-10-09 10:06:21"
}

Failure callback shape

{
  "request_id": "pikadditions_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "pikadditions",
  "error": "Description of the failure"
}

Delivery semantics

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

Request Parameters

ParameterRequiredTypeDefaultAllowed values / rangeDescription
videoYesstring—A publicly reachable http(s) URLThe video to add to: a publicly reachable video file (for example MP4).
promptYesstring—Non-empty text, up to 8000 charactersWhat to add to the video, and how it moves.
negative_promptNostring—Text, up to 4000 charactersWhat to keep out of the result, for example blurry, low quality.
imageNostring—A publicly reachable http(s) URLAn optional reference image of what to add.
resolutionNostring"1080p"720p, 1080pOutput resolution, written exactly as listed. It does not change the amount billed.
durationNointeger55, 10Length of the result in seconds: 5 or 10. It does not change the amount billed.
seedNointegerRandom0–2147483647Seed for the random generator; leave it out for a random seed. It does not change the amount billed.

Good to know

  • Each request returns one video; send one request per video.
  • Send every field at the top level of the JSON body, and omit a field instead of sending null.
  • Use the JSON types shown: seed is a number (7, not "7").
  • Set a Webhook with the X-Webhook-URL header (see Webhook), not in the JSON body.
  • A field this operation does not take is refused with a 400 that says where it belongs (see Response Handling).
  • The result is returned as a URL in output.media_url: one MP4 file per request.

Adding to a Video

  • Send the video in video and describe what to add, and how it moves, in prompt. image can show what to add.
  • resolution (720p or 1080p) and duration (5 or 10 seconds) set the result; neither changes the amount billed.
  • To replace something in the video instead, use Pikaswaps; for effects, Pikaffects.

Example: a 10-second result at 720p, with a negative prompt

{
  "video": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/video/input-5s.mp4",
  "prompt": "Add a golden retriever puppy running across the frame.",
  "negative_prompt": "blurry, distorted",
  "duration": 10,
  "resolution": "720p",
  "seed": 42
}

Example Request

{
  "video": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/video/input-5s.mp4",
  "prompt": "Add a small red balloon floating in the air.",
  "duration": 5,
  "resolution": "1080p"
}

Example Response

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

Request Headers

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

Response Handling

Status CodeMeaning
202Accepted — request queued; returns request_id and polling_url.
400Invalid request — a required field is missing, a value has the wrong type, is out of range or is not one of the allowed values, a field this operation does not accept was sent, or an input file could not be downloaded (error: Asset proxy failed). The message says what to fix.
401Unauthorized — missing or invalid subscription key.
402Insufficient balance for the hold this request needs.
429Too many requests.
500Internal server error.

Parameter problems are caught when you submit and returned as a 400, before any hold is placed on your balance. Problems that need the model to run are reported through the status endpoint as status: "ERROR", with a message in error saying what went wrong. Failed requests are not billed — the hold is released in full.

ConditionHow it surfaces
Missing or invalid subscription keysynchronous 401
Balance too low for the holdsynchronous 402
Missing video, or video not a single publicly reachable http(s) URLsynchronous 400
Missing or empty prompt, prompt not a string, or longer than 8000 characterssynchronous 400
negative_prompt not a string, or longer than 4000 characterssynchronous 400
image not a single publicly reachable http(s) URLsynchronous 400
resolution not one of the allowed values (written exactly as listed)synchronous 400
duration not 5 or 10 — for example 7synchronous 400
seed not a whole number from 0 to 2147483647 — for example -1 or the string "0"synchronous 400
duration_s, seconds: set the length with duration (5 or 10 seconds)synchronous 400
pikaffect: effects go to POST https://gateway.pixazo.ai/pikaffects/v1/video-to-videosynchronous 400
modify_region_roi, modify_region_mask: replacing a region is Pikaswaps: POST https://gateway.pixazo.ai/pikaswaps/v1/video-to-videosynchronous 400
video_url: send the video in videosynchronous 400
image_url, image_urls: send the reference image in imagesynchronous 400
webhook_url, callback_url: send the webhook URL in the X-Webhook-URL headersynchronous 400
batch_size, num_images, number_of_images, n, count: one request makes one resultsynchronous 400
parameters: send the fields at the top level of the JSON bodysynchronous 400
A video or image URL that cannot be downloaded (nothing is charged)synchronous 400 (error: Asset proxy failed)
An image or video the model cannot use, for example an unsupported format (nothing is charged)status: "ERROR"
A prompt or media the model refuses, for example under its content policy (nothing is charged)status: "ERROR"
A temporary problem on the provider side (nothing is charged; try again later)status: "ERROR"

Example error responses

A refused request returns error, a message that joins every problem found, and the same problems one by one in violations.

Missing video (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'video' is required",
  "violations": [
    "'video' is required"
  ]
}

A value that is not allowed (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'resolution' must be one of: \"720p\", \"1080p\" (got \"4K\")",
  "violations": [
    "'resolution' must be one of: \"720p\", \"1080p\" (got \"4K\")"
  ]
}

A length that is not offered (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'duration' must be one of: 5, 10 (got 7)",
  "violations": [
    "'duration' must be one of: 5, 10 (got 7)"
  ]
}

A seed out of range (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'seed' must be >= 0 (got -1)",
  "violations": [
    "'seed' must be >= 0 (got -1)"
  ]
}

A number sent as a string (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'seed' must be integer (got string)",
  "violations": [
    "'seed' must be integer (got string)"
  ]
}

modify_region_roi, which this operation does not take (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'modify_region_roi' must be one of:  (got \"the sky\"); 'modify_region_roi' is not accepted by Pikadditions. Replacing a region is Pikaswaps: POST https://gateway.pixazo.ai/pikaswaps/v1/video-to-video.",
  "violations": [
    "'modify_region_roi' must be one of:  (got \"the sky\")",
    "'modify_region_roi' is not accepted by Pikadditions. Replacing a region is Pikaswaps: POST https://gateway.pixazo.ai/pikaswaps/v1/video-to-video."
  ]
}

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. Treat any status other than QUEUED, PROCESSING or COMPLETED as a failure.

Endpoint

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

cURL example

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

Completed response

{
  "request_id": "pikadditions_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "pikadditions",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/{request_id}/output.mp4"
    ],
    "media_type": "video/mp4"
  },
  "created_at": "2026-10-09T10:04:54.387Z",
  "completed_at": "2026-10-09 10:06:21"
}

Response Fields

FieldTypeDescription
request_idstringUnique request identifier.
statusstringQUEUED, PROCESSING, COMPLETED or ERROR.
model_idstringThe model that handled the request — pikadditions for this endpoint.
output.media_urlarray of stringsURL of the video (one MP4 file per request).
output.media_typestringvideo/mp4.
created_atstringRequest creation timestamp.
completed_atstringCompletion timestamp.
errorstringError message when status is ERROR.
polling_urlstringStatus URL for this request (submit response only).

Status Values & Flow

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

Typical workflow

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

How Billing Is Measured

Billing is per request: one flat amount for each video. The resolution, length, prompt, negative prompt, image and seed do not change the amount. The amount is placed as a hold when the request is submitted and released in full if the request fails. The current prices are shown in the pricing panel on this page.

Pikadditions API Pricing

One price per video: the resolution, length, prompt, image and seed do not change the amount.

Your request will cost $0.0315 per video.
9. Pikaswaps

Pikaswaps API Documentation

Replace part of your video with Pikaswaps: send the video in video, name the region to replace in modify_region_roi (or mark it with a mask image), and describe what it becomes in prompt. 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/pikaswaps/v1/video-to-video

Authentication

All requests require an API key passed via header.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour API subscription key

Video to Video - Pikaswaps

Request Code

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

{
  "video": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/video/input-5s.mp4",
  "prompt": "a friendly silver robot",
  "modify_region_roi": "the man",
  "duration": 5,
  "resolution": "1080p"
}
import requests

url = "https://gateway.pixazo.ai/pikaswaps/v1/video-to-video"
headers = {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
  "video": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/video/input-5s.mp4",
  "prompt": "a friendly silver robot",
  "modify_region_roi": "the man",
  "duration": 5,
  "resolution": "1080p"
}

resp = requests.post(url, json=data, headers=headers)
print(resp.json())
const res = await fetch("https://gateway.pixazo.ai/pikaswaps/v1/video-to-video", {
  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-5s.mp4",
  "prompt": "a friendly silver robot",
  "modify_region_roi": "the man",
  "duration": 5,
  "resolution": "1080p"
})
});
console.log(await res.json());
curl -X POST 'https://gateway.pixazo.ai/pikaswaps/v1/video-to-video' \
  -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-5s.mp4", "prompt": "a friendly silver robot", "modify_region_roi": "the man", "duration": 5, "resolution": "1080p"}'

Output

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

Webhook (Optional)

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

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

Example: enable Webhook

curl -X POST 'https://gateway.pixazo.ai/pikaswaps/v1/video-to-video' \
  -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-5s.mp4", "prompt": "a friendly silver robot", "modify_region_roi": "the man", "duration": 5, "resolution": "1080p"}'

Callback Payload (success)

{
  "request_id": "pikaswaps_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "pikaswaps",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/{request_id}/output.mp4"
    ],
    "media_type": "video/mp4"
  },
  "created_at": "2026-10-09T10:04:54.387Z",
  "completed_at": "2026-10-09 10:06:21"
}

Failure callback shape

{
  "request_id": "pikaswaps_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "pikaswaps",
  "error": "Description of the failure"
}

Delivery semantics

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

Request Parameters

ParameterRequiredTypeDefaultAllowed values / rangeDescription
videoYesstring—A publicly reachable http(s) URLThe video to change: a publicly reachable video file (for example MP4).
promptYesstring—Non-empty text, up to 8000 charactersWhat the region becomes, for example a friendly silver robot.
negative_promptNostring—Text, up to 4000 charactersWhat to keep out of the result, for example blurry, low quality.
imageNostring—A publicly reachable http(s) URLAn optional reference image of what the region becomes.
resolutionNostring"1080p"720p, 1080pOutput resolution, written exactly as listed. It does not change the amount billed.
durationNointeger55, 10Length of the result in seconds: 5 or 10. It does not change the amount billed.
seedNointegerRandom0–2147483647Seed for the random generator; leave it out for a random seed. It does not change the amount billed.
modify_region_roiYes, unless modify_region_mask is sentstring—Text, up to 4000 charactersText naming the region to replace, for example the man.
modify_region_maskYes, unless modify_region_roi is sentstring—A publicly reachable http(s) URLA mask image marking the region to replace (see Choosing What to Replace).

Good to know

  • Each request returns one video; send one request per video.
  • Send modify_region_roi, modify_region_mask or both: a request with neither is refused.
  • Send every field at the top level of the JSON body, and omit a field instead of sending null.
  • Use the JSON types shown: seed is a number (7, not "7").
  • Set a Webhook with the X-Webhook-URL header (see Webhook), not in the JSON body.
  • A field this operation does not take is refused with a 400 that says where it belongs (see Response Handling).
  • The result is returned as a URL in output.media_url: one MP4 file per request.

Choosing What to Replace

  • Name the region in modify_region_roi, in words: for example the man or the sky. This is the way most requests choose it.
  • Or send a mask image in modify_region_mask that marks the region (a publicly reachable image URL). The mask format is not documented by the model's provider; describing the region in modify_region_roi is the documented way.
  • Send one of the two, or both. A request with neither is refused with a 400.
  • Describe what the region becomes in prompt; image can show it.

Example: replace the background at 720p

{
  "video": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/video/input-5s.mp4",
  "prompt": "a busy night market street with glowing lanterns",
  "modify_region_roi": "the background behind the man",
  "negative_prompt": "blurry",
  "resolution": "720p",
  "seed": 42
}

Example Request

{
  "video": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/video/input-5s.mp4",
  "prompt": "a friendly silver robot",
  "modify_region_roi": "the man",
  "duration": 5,
  "resolution": "1080p"
}

Example Response

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

Request Headers

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

Response Handling

Status CodeMeaning
202Accepted — request queued; returns request_id and polling_url.
400Invalid request — a required field is missing, a value has the wrong type, is out of range or is not one of the allowed values, a field this operation does not accept was sent, or an input file could not be downloaded (error: Asset proxy failed). The message says what to fix.
401Unauthorized — missing or invalid subscription key.
402Insufficient balance for the hold this request needs.
429Too many requests.
500Internal server error.

Parameter problems are caught when you submit and returned as a 400, before any hold is placed on your balance. Problems that need the model to run are reported through the status endpoint as status: "ERROR", with a message in error saying what went wrong. Failed requests are not billed — the hold is released in full.

ConditionHow it surfaces
Missing or invalid subscription keysynchronous 401
Balance too low for the holdsynchronous 402
Missing video, or video not a single publicly reachable http(s) URLsynchronous 400
Missing or empty prompt, prompt not a string, or longer than 8000 characterssynchronous 400
negative_prompt not a string, or longer than 4000 characterssynchronous 400
image not a single publicly reachable http(s) URLsynchronous 400
resolution not one of the allowed values (written exactly as listed)synchronous 400
duration not 5 or 10 — for example 7synchronous 400
seed not a whole number from 0 to 2147483647 — for example -1 or the string "0"synchronous 400
modify_region_roi not a string, or longer than 4000 characterssynchronous 400
modify_region_mask not a single publicly reachable http(s) URLsynchronous 400
duration_s, seconds: set the length with duration (5 or 10 seconds)synchronous 400
pikaffect: effects go to POST https://gateway.pixazo.ai/pikaffects/v1/video-to-videosynchronous 400
video_url: send the video in videosynchronous 400
image_url, image_urls: send the reference image in imagesynchronous 400
webhook_url, callback_url: send the webhook URL in the X-Webhook-URL headersynchronous 400
batch_size, num_images, number_of_images, n, count: one request makes one resultsynchronous 400
parameters: send the fields at the top level of the JSON bodysynchronous 400
Neither modify_region_roi nor modify_region_masksynchronous 400
A video, image or modify_region_mask URL that cannot be downloaded (nothing is charged)synchronous 400 (error: Asset proxy failed)
An image or video the model cannot use, for example an unsupported format (nothing is charged)status: "ERROR"
A prompt or media the model refuses, for example under its content policy (nothing is charged)status: "ERROR"
A temporary problem on the provider side (nothing is charged; try again later)status: "ERROR"

Example error responses

A refused request returns error, a message that joins every problem found, and the same problems one by one in violations.

Missing video (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'video' is required",
  "violations": [
    "'video' is required"
  ]
}

A value that is not allowed (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'resolution' must be one of: \"720p\", \"1080p\" (got \"4K\")",
  "violations": [
    "'resolution' must be one of: \"720p\", \"1080p\" (got \"4K\")"
  ]
}

A length that is not offered (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'duration' must be one of: 5, 10 (got 7)",
  "violations": [
    "'duration' must be one of: 5, 10 (got 7)"
  ]
}

A seed out of range (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'seed' must be >= 0 (got -1)",
  "violations": [
    "'seed' must be >= 0 (got -1)"
  ]
}

A number sent as a string (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'seed' must be integer (got string)",
  "violations": [
    "'seed' must be integer (got string)"
  ]
}

pikaffect, which this operation does not take (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'pikaffect' must be one of:  (got \"Melt\"); 'pikaffect' is not accepted by Pikaswaps. Effects go to POST https://gateway.pixazo.ai/pikaffects/v1/video-to-video.",
  "violations": [
    "'pikaffect' must be one of:  (got \"Melt\")",
    "'pikaffect' is not accepted by Pikaswaps. Effects go to POST https://gateway.pixazo.ai/pikaffects/v1/video-to-video."
  ]
}

Neither modify_region_roi nor modify_region_mask (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'modify_region_roi' is required unless 'modify_region_mask' is provided",
  "violations": [
    "'modify_region_roi' is required unless 'modify_region_mask' is provided"
  ]
}

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. Treat any status other than QUEUED, PROCESSING or COMPLETED as a failure.

Endpoint

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

cURL example

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

Completed response

{
  "request_id": "pikaswaps_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "pikaswaps",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/{request_id}/output.mp4"
    ],
    "media_type": "video/mp4"
  },
  "created_at": "2026-10-09T10:04:54.387Z",
  "completed_at": "2026-10-09 10:06:21"
}

Response Fields

FieldTypeDescription
request_idstringUnique request identifier.
statusstringQUEUED, PROCESSING, COMPLETED or ERROR.
model_idstringThe model that handled the request — pikaswaps for this endpoint.
output.media_urlarray of stringsURL of the video (one MP4 file per request).
output.media_typestringvideo/mp4.
created_atstringRequest creation timestamp.
completed_atstringCompletion timestamp.
errorstringError message when status is ERROR.
polling_urlstringStatus URL for this request (submit response only).

Status Values & Flow

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

Typical workflow

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

How Billing Is Measured

Billing is per request: one flat amount for each video. The resolution, length, prompt, region, mask, image and seed do not change the amount. The amount is placed as a hold when the request is submitted and released in full if the request fails. The current prices are shown in the pricing panel on this page.

Pikaswaps API Pricing

One price per video: the resolution, length, prompt, image, region and seed do not change the amount.

Your request will cost $0.0315 per video.

⚡ Performance

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

Show data for the last
Generations
4,700last 30d
~157 per day
Success rate
97.9%
of completed generations
Generation time
103.6savg
p95 2.5min
Requests
Oct 10max 1,800Nov 8
Pika H3 FlexAvg 120/day
Pika 2.5Avg 7/day
Pika SFXAvg 7/day
PikaffectsAvg 7/day
OtherAvg 17/day
Generation Time
Oct 10max 5.7minNov 8
Pika H3 FlexAvg 99.0s
Pika 2.5Avg 2.0min
Pika SFXAvg 11.4s
PikaffectsAvg 5.7min
OtherAvg 69.2s
Error Rate
Oct 10max 20.0%Nov 8
Pika H3 FlexAvg 2.8%
Pika 2.5Avg 0.0%
Pika SFXAvg 0.0%
PikaffectsAvg 0.0%
OtherAvg 0.0%

〰 Uptime

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

Avg. Success Rate (30d)
97.87%
across all generations of this model family
Uptime
Oct 10max 100%Nov 8
Pika H3 FlexAvg 97.22%
Pika 2.5Avg 100.00%
Pika SFXAvg 100.00%
PikaffectsAvg 100.00%
OtherAvg 100.00%