# wan2gp-i2v

> Run wan2gp-i2v by infsh online or via API. Pay per run, no setup.

**URL:** https://inference.sh/apps/infsh/wan2gp-i2v
**Last updated:** 2025-08-28

---

Turns static images into dynamic, realistic videos, often including tools for advanced control over motion and video style.

- app: `infsh/wan2gp-i2v`
- maker: [infsh](https://inference.sh/apps/infsh.md)
- category: [video](https://inference.sh/apps/category/video.md)
- runs via: api, javascript and python sdk, belt cli, mcp

## wan2gp-i2v API Guide

### About
turns static images into dynamic, realistic videos, often including tools for advanced control over motion and video style.

### 1. Calling the API

#### Install the Client

```bash
pip install inferencesh
```

#### Setup Your API Key
Set `INFERENCE_API_KEY` as an environment variable. Get your key from settings → api keys.

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

#### Run and Get Result

```python
import os
from inferencesh import inference

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


result = client.run({
        "app": "infsh/wan2gp-i2v@2sd2ezff",
        "input": {
            "prompt": "prompt",
            "input_image": {}
        }
    })

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

#### Stream Live Updates

```python
import os
from inferencesh import inference

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


## stream=True yields updates as they arrive
for update in client.run({
        "app": "infsh/wan2gp-i2v@2sd2ezff",
        "input": {
            "prompt": "prompt",
            "input_image": {}
        }
    }, stream=True):
    if update.get("progress"):
        print(f"progress: {update['progress']}%")
    if update.get("output"):
        print(f"output: {update['output']}")
```

### 2. Authentication
The API uses API keys for authentication. See the authentication docs for detailed setup instructions.

### 3. Files

#### Automatic Upload

```python
## local file paths are automatically uploaded
result = client.run({
    "app": "infsh/wan2gp-i2v@2sd2ezff",
    "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/...
```

### 4. Schema

#### Input
- **prompt** (string) *required*: Text prompt for video generation
- **input_image** (object) *required*: Input image for image-to-video generation
- **end_frame** (object): Optional end frame image for video generation
- **size** (string): Size of the generated video (width*height)
- **num_frames** (integer): Number of frames to generate (should be 4n+1)
- **fps** (integer): Frames per second for the output video
- **guidance_scale** (number): Classifier-free guidance scale
- **num_inference_steps** (integer): Number of denoising steps
- **seed** (integer): Random seed for reproducibility (-1 for random)
- **negative_prompt** (string): Negative prompt to guide generation
- **sample_solver** (string): Solver to use for sampling (unipc or dpm++)
- **shift** (number): Noise schedule shift parameter
- **tea_cache** (number): TeaCache multiplier (0 to disable, 1.5-2.5 recommended for speed)
- **tea_cache_start_step_perc** (integer): TeaCache starting step percentage
- **lora_file** (string): URL to Lora file in safetensors format
- **lora_multiplier** (number): Multiplier for the Lora effect
- **vae_tile_size** (integer): VAE tile size for lower VRAM usage (0, 128, or 256)
- **enable_RIFLEx** (boolean): Enable RIFLEx positional embedding for longer videos
- **joint_pass** (boolean): Enable joint pass for 10% speed boost
- **attention** (string): Attention mechanism to use for generation
- **cfg_star_switch** (boolean): Enable CFG* guidance
- **cfg_zero_step** (integer): Step at which to switch to CFG* guidance
- **add_frames_for_end_image** (boolean): Add frames for end image in image-to-video
- **temporal_upsampling** (string): Temporal upsampling method
- **spatial_upsampling** (string): Spatial upsampling method

#### Output
- **video** (object): Generated video file

## other video apps

- [VACE](https://inference.sh/apps/pruna/vace.md): $0.40/video
- [P-Video-Animate](https://inference.sh/apps/pruna/p-video-animate.md): $0.03/sec 720p, $0.06/sec 1080p
- [P-Video-Upscale](https://inference.sh/apps/pruna/p-video-upscale.md): Std: $0.01/sec 720p, $0.02 1080p, $0.04 2k, $0.08 4k; high fps 2x
- [P-Video-2-Pro-Avatar](https://inference.sh/apps/pruna/p-video-2-pro-avatar.md): $0.02/sec 480p, $0.04/sec 768p, $0.06/sec 1080p, $0.08/sec 2k, $0.12/sec 4k
- [P-Video-2-Pro-Reference](https://inference.sh/apps/pruna/p-video-2-pro-reference.md): Output: cost $0.015-$0.105/sec, speed $0.02-$0.115/sec. Ref video: $0.03-$0.06/sec. Ref img: $0.005/img. Ref audio: $0.0015-$0.0025/sec

## faq

### how much does wan2gp-i2v cost?

you pay per run from your inference shell credits, and the app shows its cost before each run. no subscription is required.

### how do I run wan2gp-i2v via api?

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

### who makes wan2gp-i2v?

wan2gp-i2v is made by infsh and runs on inference shell. every infsh app is listed at https://inference.sh/apps/infsh.

### can my agent use wan2gp-i2v?

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 wan2gp-i2v?

other video apps on inference shell include VACE, P-Video-Animate, P-Video-Upscale, P-Video-2-Pro-Avatar. they run through the same api, so switching is a one-line change.
