# Pika H3 Flex Reference to Video

> Run Pika H3 Flex Reference to Video by pika online or via API. $0.06/sec 480p, $0.12/sec 768p, $0.15/sec 1080p, $0.16/sec 2k, $0.20/sec 4k (output+input video sec). Stems: $0.001/sec, no setup.

**URL:** https://inference.sh/apps/pika/pika-h3-flex-reference
**Last updated:** 2026-11-08

---

Pika H3 Flex reference-to-video with synchronized audio. Guide the video with up to 9 images, 3 videos and 3 audio clips cited as @Image1, @Video1, @Audio1. 3-15s, 480p to 4K.

- app: `pika/pika-h3-flex-reference`
- maker: [pika](https://inference.sh/apps/pika.md)
- category: [video](https://inference.sh/apps/category/video.md)
- input → output: reference → video, image → video, video → video
- tasks: [reference to video](https://inference.sh/apps/tag/reference-to-video.md), [image to video](https://inference.sh/apps/tag/image-to-video.md), [video to video](https://inference.sh/apps/tag/video-to-video.md), [native audio](https://inference.sh/apps/tag/native-audio.md)
- price: $0.06/sec 480p, $0.12/sec 768p, $0.15/sec 1080p, $0.16/sec 2k, $0.20/sec 4k (output+input video sec). Stems: $0.001/sec
- runs via: api, javascript and python sdk, belt cli, mcp

## pika-h3-flex-reference API Guide

### About
pika h3 flex reference-to-video with synchronized audio. guide the video with up to 9 images, 3 videos and 3 audio clips cited as @image1, @video1, @audio1. 3-15s, 480p to 4k.

### Get an API Key
Create one in [settings → api keys](https://app.inference.sh/settings/keys). The examples read it from `INFERENCE_API_KEY`.

```bash
export INFERENCE_API_KEY="inf_your_key"
```

### 1. Calling the API

#### Install the Client

```bash
pip install inferencesh
```

#### Run and Get Result
Submit a request and wait for the final result.

```python
import os
from inferencesh import inference

client = inference(api_key=os.environ["INFERENCE_API_KEY"])

## version @0z3fy4ws pinned
result = client.run({
        "app": "pika/pika-h3-flex-reference@0z3fy4ws",
        "input": {
            "prompt": "@Image1 walks through the rainy street from @Video1, wearing the jacket in @Image2. The voice from @Audio1 says 'we made it'. Sound: rain, footsteps, no music."
        }
    })

print(result["output"])
```

#### Stream Live Updates
Get real-time progress updates as the task runs.

```python
import os
from inferencesh import inference

client = inference(api_key=os.environ["INFERENCE_API_KEY"])

## version @0z3fy4ws pinned
## stream=True yields updates as they arrive
for update in client.run({
        "app": "pika/pika-h3-flex-reference@0z3fy4ws",
        "input": {
            "prompt": "@Image1 walks through the rainy street from @Video1, wearing the jacket in @Image2. The voice from @Audio1 says 'we made it'. Sound: rain, footsteps, no music."
        }
    }, stream=True):
    if update.get("progress"):
        print(f"progress: {update['progress']}%")
    if update.get("output"):
        print(f"output: {update['output']}")
```

#### Run in the Background
Start the task and get its id back right away, then check on it with `GET /tasks/{id}`. It is done when `status` is 10 (completed), 11 (failed) or 12 (cancelled).

```python
import os
from inferencesh import inference, TaskStatus

client = inference(api_key=os.environ["INFERENCE_API_KEY"])

## returns as soon as the task is created
task = client.run({
        "app": "pika/pika-h3-flex-reference@0z3fy4ws",
        "input": {
            "prompt": "@Image1 walks through the rainy street from @Video1, wearing the jacket in @Image2. The voice from @Audio1 says 'we made it'. Sound: rain, footsteps, no music."
        }
    }, wait=False)

## later: read its current state
state = client.tasks.get(task["id"]).data
if state["status"] == TaskStatus.COMPLETED:
    print(state["output"])
```

### 2. Files

#### Automatic Upload

```python
## local file paths are automatically uploaded
result = client.run({
    "app": "pika/pika-h3-flex-reference@0z3fy4ws",
    "input": {
        "image": "/path/to/local/image.png",  # detected & uploaded
        "audio": "https://example.com/audio.mp3",  # url passed through
    }
})
```

#### Manual Upload

```python
## upload and get a hosted URL
file = client.files.upload("/path/to/file.png")
print(file.uri)  # https://cloud.inference.sh/...
```

### 3. Schema

#### Input
- **prompt** (string) *required*: What happens in the video. Cite references in order as @Image1, @Image2, @Video1, @Audio1. Describe shots, camera, lighting and sound.
- **reference_images** (array): Up to 9 reference images (PNG, JPEG or WebP, up to 50 MiB each, aspect between 1:4 and 4:1). Cite as @Image1..@Image9.
- **reference_videos** (array): Up to 3 reference videos, 2-15s each and 15s combined. Input video seconds are billed at the output rate. Cite as @Video1..@Video3.
- **reference_audios** (array): Up to 3 reference audio clips, 2-15s each and 15s combined. Free. Cite as @Audio1..@Audio3.
- **duration** (integer): Video length in whole seconds, 3 to 15. Billed per output second.
- **aspect_ratio** (string): Output aspect ratio. auto follows the prompt and reference video.
- **resolution** (string): 480p and 768p are native. 1080p, 2k and 4k generate at 768p and upscale once, keeping audio and frame rate.
- **rewrite** (boolean): Let Pika expand the prompt before generation. Turn off to use the prompt verbatim.
- **seed** (integer): Seed. 0 lets Pika choose.
- **audio_stems** (boolean): Also return the soundtrack split into Dialogue, Music and Effect WAV stems. Billed per stem second on top of the video.
- **stems_channel_mode** (string): Audio stems only. mono downmixes before separation; stereo keeps both channels.

#### Output
- **seed** (integer): Seed Pika used for this video.
- **stems** (array): Dialogue, Music and Effect WAV stems when audio_stems is on.
- **video** (string): Generated MP4 (H.264 + AAC, 24 fps).

## other video apps

- [Pika H3 Flex (self-hosted)](https://inference.sh/apps/pika/pika-h3-flex-oss.md): GPU time, billed per millisecond
- [Pika H3 Flex Upscale](https://inference.sh/apps/pika/pika-h3-flex-upscale.md): $0.05-$0.14/sec (480p src), $0.03-$0.12/sec (768p src); 1080p/2K/4K targets
- [Pika H3 Flex](https://inference.sh/apps/pika/pika-h3-flex.md): $0.02/sec 480p, $0.04/sec 768p, $0.07/sec 1080p, $0.08/sec 2K, $0.16/sec 4K; stems +$0.001/stem-sec
- [Gemini Omni 1.2 Flash](https://inference.sh/apps/google/gemini-omni-1-2-flash.md): $0.0232/sec 360p, $0.0695/sec 720p, $0.1043/sec 1080p, $0.2085/sec 4K, plus $1.50/M input and $9.00/M thinking tokens
- [VACE](https://inference.sh/apps/pruna/vace.md): $0.40/video

## faq

### how much does Pika H3 Flex Reference to Video cost?

$0.06/sec 480p, $0.12/sec 768p, $0.15/sec 1080p, $0.16/sec 2k, $0.20/sec 4k (output+input video sec). Stems: $0.001/sec. you pay per run from your inference shell credits. no subscription is required.

### how do I run Pika H3 Flex Reference to Video via api?

call pika/pika-h3-flex-reference with the javascript or python sdk, the rest api, or `belt app run pika/pika-h3-flex-reference` from a terminal. the api reference on this page lists every input.

### who makes Pika H3 Flex Reference to Video?

Pika H3 Flex Reference to Video is made by pika and runs on inference shell. every pika app is listed at https://inference.sh/apps/pika.

### can my agent use Pika H3 Flex Reference to Video?

yes. agents call it as a tool through the inference shell mcp server (https://api.inference.sh/mcp), the belt cli or the sdk, and pay per run like you do.

### what are the alternatives to Pika H3 Flex Reference to Video?

other video apps on inference shell include Pika H3 Flex (self-hosted), Pika H3 Flex Upscale, Pika H3 Flex, Gemini Omni 1.2 Flash. they run through the same api, so switching is a one-line change.
