# PixVerse V6

> Generate 720p frame transitions or new scenes from reference images, with optional native audio.

- Model page: https://yir.ai/models/pixverse-v6
- Model ID: `pixverse/pixverse-v6`
- Billing: by the channel that ran the job; attempts the upstream did not bill are free.

## Pricing

Current public prices by channel for the same output specification; official prices are a reference. You are billed by the channel that actually runs the job, which may change on failover.

| Output specification | Channel | Public price |
|---|---|---|
| no audio | PixVerse (official) | $0.04 / second |
| no audio | APIMart | $0.032 / second |
| audio | PixVerse (official) | $0.0533 / second |
| audio | APIMart | $0.04 / second |

## Parameters

- Operation: `generate_video`

| Parameter | Values | Default |
|---|---|---|
| `input` | image / reference | image |
| `resolution` | 720p | 720p |
| `aspect_ratio` | auto | auto |
| `duration` | 5 / 8 | 5 |
| `generate_audio` | true / false | false |

## Integration

Pick either: the official SDK for new code, or swap the Base URL in projects already using the OpenAI protocol.

### Official SDK (TypeScript)

The SDK calls the Standard API (https://gateway.yir.ai) to submit, wait for and collect jobs; a Go SDK is also available. https://yir.ai/docs/integrations/sdk

```bash
pnpm add @yir-ai/sdk
```

```ts
// Replace https://example.com/your-reference-image.png with your publicly accessible HTTPS image URL.
import { createNodeYirClient } from "@yir-ai/sdk/server";

// Reads YIR_API_KEY from the environment by default: process.env.YIR_API_KEY
const client = createNodeYirClient();

// 1. Submit a video generation job
const job = await client.submitVideo({
  model: "pixverse/pixverse-v6",
  input: {
    type: "image",
    prompt: "A sea turtle swims slowly over a coral reef. The camera tracks smoothly from the side as sunlight filters through clear water, casting moving patterns across its shell",
    references: [{ role: "first_frame", ...{ url: "https://example.com/your-reference-image.png" } }],
  },
  parameters: {
    duration: 5,
    resolution: "720p",
    aspect_ratio: "auto",
    generate_audio: false,
    n: 1,
  },
});

// 2. Wait for the job to finish and deliver its result
const result = await client.waitForJob(job.id);
console.log("Delivered files:", result.result);
if (result.result && "files" in result.result) {
  for (const file of result.result.files) {
    console.log("->", file.url);
  }
}
```

### OpenAI-compatible API

OpenAI Images and Sora Videos protocols for OpenAI SDKs and gateways such as new-api; no chat. https://yir.ai/docs/integrations/openai-compatibility

- OpenAI SDK base_url: `https://gateway.yir.ai/openai/v1`
- new-api channel Base URL (channel type OpenAI): `https://gateway.yir.ai/openai`
- Model ID: `pixverse/pixverse-v6`

```bash
# Replace https://example.com/your-reference-image.png with your publicly accessible HTTPS image URL.
curl https://gateway.yir.ai/openai/v1/videos \
  -H "Authorization: Bearer $YIR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "pixverse/pixverse-v6",
    "prompt": "A sea turtle swims slowly over a coral reef. The camera tracks smoothly from the side as sunlight filters through clear water, casting moving patterns across its shell",
    "resolution": "720p",
    "aspect_ratio": "auto",
    "input_reference": {
      "image_url": "https://example.com/your-reference-image.png"
    },
    "seconds": "5"
  }'
```

## FAQ

### Does PixVerse V6 have an official API?

Yes. PixVerse sells PixVerse V6 through its own official API. At the same specification, third-party providers on Yir list it for up to 25% less (see the table above), and you call them all with one Yir API key.

## Rules

- Authenticate with Authorization: Bearer $YIR_API_KEY; keep the key in a server environment variable, never in browser code, source control, prompts or logs.
- Jobs are asynchronous: keep the Job ID, wait for a terminal state, then read the result; handle failure and cancellation.
- For safe retries, reuse the same idempotency key and request; do not blindly resubmit when the result is unknown.
- Result URLs are temporary; copy files elsewhere if you need to keep them.

## Links

- [Quickstart](https://yir.ai/docs/getting-started/quickstart)
- [API reference](https://yir.ai/docs/reference)
- [llms.txt](https://yir.ai/llms.txt)
