# Upsampler โ€” Zapi reference > Generate video dari teks (text-to-video) pakai model Wan 2.2 โ€” output MP4 tanpa watermark/login. Catatan: rate-limited (kuota GPU), URL video ephemeral. **Base URL:** `https://api.zpi.web.id` **Auth:** Send `x-api-key: YOUR_KEY` header on every request. Get a free key at https://zpi.web.id/dashboard/keys. **Response envelope:** `{ status, message, content }` **Rate limit:** 60 req/min on free tier. **Related:** - Detail page: https://zpi.web.id/api/ai/upsampler - Endpoint catalog: https://zpi.web.id/category/ai - Concise index: https://zpi.web.id/llms.txt - Full reference: https://zpi.web.id/llms-full.txt --- ## Upsampler **Category:** ai ยท **Slug:** `upsampler` **Detail page:** https://zpi.web.id/api/ai/upsampler Generate video dari teks (text-to-video) pakai model Wan 2.2 โ€” output MP4 tanpa watermark/login. Catatan: rate-limited (kuota GPU), URL video ephemeral. **Tags:** upsampler, wan, video, text-to-video, ai, generator ### Generate Video Generate video pendek dari prompt teks (Wan 2.2). - **Method:** `POST` - **Endpoint:** `https://api.zpi.web.id/v1/ai:upsampler/generate` **Parameters:** | Name | Type | Location | Required | Description | |------|------|----------|----------|-------------| | `prompt` | string | body | yes | Text prompt describing the video to generate | | `image` | string | body | no | Optional source image URL to animate (image-to-video). When provided, the model animates this image guided by `prompt`; output dimensions auto-fit the image. Omit for pure text-to-video | | `model` | enum(wan) | body | no | Model. Only wan (Wan 2.2 5B, fast 4-step) is available. Default wan | | `duration` | number | body | no | Video length in seconds (1-8). Default 2 | | `width` | number | body | no | Output width px, multiple of 32 (256-1024). Default 704 | | `height` | number | body | no | Output height px, multiple of 32 (256-1024). Default 704 | | `seed` | number | body | no | Seed for reproducibility. Default random | | `negativePrompt` | string | body | no | Things to avoid in the video. Has a sensible default | | `steps` | number | body | no | Inference steps (1-8). More steps = higher quality but slower. Default 4 | | `guidance` | number | body | no | Guidance scale (0-5). Higher = follow prompt more strictly. Default 0 (recommended for the fast model) | **cURL:** ```bash curl -X POST "https://api.zpi.web.id/v1/ai:upsampler/generate" \ -H "x-api-key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "prompt": "a red sports car driving on a coastal road at sunset, cinematic motion", "image": "https://example.com/cat.jpg", "model": "wan", "duration": 1, "width": 1, "height": 1, "seed": 1, "negativePrompt": "VALUE", "steps": 1, "guidance": 1 }' ``` **JavaScript / TypeScript:** ```javascript const res = await fetch("https://api.zpi.web.id/v1/ai:upsampler/generate", { method: "POST", headers: { "x-api-key": process.env.ZAPI_KEY, "Content-Type": "application/json" }, body: JSON.stringify({ "prompt": "a red sports car driving on a coastal road at sunset, cinematic motion", "image": "https://example.com/cat.jpg", "model": "wan", "duration": 1, "width": 1, "height": 1, "seed": 1, "negativePrompt": "VALUE", "steps": 1, "guidance": 1 }) }); const data = await res.json(); ``` **Python:** ```python import requests r = requests.post("https://api.zpi.web.id/v1/ai:upsampler/generate", headers={"x-api-key": "YOUR_API_KEY"}, json={ "prompt": "a red sports car driving on a coastal road at sunset, cinematic motion", "image": "https://example.com/cat.jpg", "model": "wan", "duration": 1, "width": 1, "height": 1, "seed": 1, "negativePrompt": "VALUE", "steps": 1, "guidance": 1 }) data = r.json() ``` **Example response:** ```json { "mode": "text-to-video", "seed": 1234567, "model": "wan", "steps": 4, "width": 704, "height": 704, "prompt": "a red sports car driving on a coastal road at sunset, cinematic motion", "status": "completed", "videos": [ { "url": "https:///file/tmp/abc123/output.mp4", "width": 704, "height": 704, "durationSeconds": 2 } ], "duration": 2, "guidance": 0, "provider": "upsampler", "elapsedMs": 41230 } ``` --- _Generated: 2026-08-02T14:23:01.426Z_