> ## Documentation Index
> Fetch the complete documentation index at: https://developer.pixelbyte.app/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Veo 3.1 — Reference to Video

> Generate videos using reference images for style and character consistency with Google's Veo 3.1 model

Generate videos using reference images for style and character consistency with Google's Veo 3.1 model. Supports multiple resolutions, durations, and optional audio generation.

| Property            | Value                                   |
| ------------------- | --------------------------------------- |
| **Provider**        | Google                                  |
| **Model**           | Veo 3.1                                 |
| **Capability**      | Reference to Video                      |
| **Base Cost**       | 200,000 micro-cents/second (\$0.20/sec) |
| **Processing Time** | \~240 seconds                           |

## Request Body

<ParamField body="model" type="string" required placeholder="google/veo-3.1/reference-to-video">
  Model slug. Use `google/veo-3.1/reference-to-video` for reference-to-video generation.
</ParamField>

<ParamField body="input" type="object" required>
  Input parameters for reference-to-video generation.

  <Expandable title="properties" defaultOpen>
    <ParamField body="prompt" type="string" required>
      Text description of the video to generate (max 4000 characters).
    </ParamField>

    <ParamField body="image_urls" type="array" required>
      Array of reference image URLs for style and character consistency.
    </ParamField>

    <ParamField body="aspect_ratio" type="string">
      Video aspect ratio. Default: `16:9`. Options: `16:9`, `9:16`.
    </ParamField>

    <ParamField body="resolution" type="string">
      Output resolution. Default: `720p`. Options: `720p`, `1080p`, `4k`.
    </ParamField>

    <ParamField body="duration" type="string">
      Video duration in seconds. Default: `8`. Options: `4`, `6`, `8`.
    </ParamField>

    <ParamField body="has_sound" type="string">
      Enable audio generation. Default: `false`. Options: `true`, `false`.
    </ParamField>

    <ParamField body="seed" type="integer">
      Seed for reproducible results.
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="webhookUrl" type="string">
  HTTPS URL to receive a webhook notification when the job completes or fails.
</ParamField>

## Pricing

**Base cost:** 200,000 micro-cents per second (\$0.20/sec)

```
finalCost = baseCost × duration × resolution × has_sound
```

| Factor         | Option  | Multiplier |
| -------------- | ------- | ---------- |
| **Duration**   | `4`     | 4x         |
|                | `6`     | 6x         |
|                | `8`     | 8x         |
| **Resolution** | `720p`  | 1x         |
|                | `1080p` | 1x         |
|                | `4k`    | 1.5x       |
| **Sound**      | `false` | 1x         |
|                | `true`  | 1.5x       |

<Tip>
  **Default cost:** 8 seconds, 720p, no sound = 200,000 × 8 × 1 × 1 = **1,600,000 micro-cents (\$1.60)**
</Tip>

## Response

<ResponseField name="jobId" type="string">
  Unique identifier for the submitted job.
</ResponseField>

<ResponseField name="status" type="string">
  Initial job status. Always `"pending"` on successful submission.
</ResponseField>

<ResponseField name="estimatedCompletionTime" type="string">
  ISO 8601 timestamp of the estimated completion time.
</ResponseField>

<ResponseField name="costMicroCents" type="number">
  The cost of the job in micro-cents.
</ResponseField>

## Code Examples

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST https://api.muvi.video/v1/jobs/submit \
    -H "Authorization: Bearer $PIXELBYTE_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "model": "google/veo-3.1/reference-to-video",
      "input": {
        "prompt": "The character walks through a futuristic city at night",
        "image_urls": ["https://example.com/character-ref.jpg", "https://example.com/style-ref.jpg"],
        "aspect_ratio": "16:9",
        "resolution": "1080p",
        "duration": "8",
        "has_sound": "false"
      }
    }'
  ```

  ```python Python theme={null}
  import requests

  response = requests.post(
      "https://api.muvi.video/v1/jobs/submit",
      headers={
          "Authorization": "Bearer YOUR_API_KEY",
          "Content-Type": "application/json"
      },
      json={
          "model": "google/veo-3.1/reference-to-video",
          "input": {
              "prompt": "The character walks through a futuristic city at night",
              "image_urls": ["https://example.com/character-ref.jpg", "https://example.com/style-ref.jpg"],
              "aspect_ratio": "16:9",
              "resolution": "1080p",
              "duration": "8",
              "has_sound": "false"
          }
      }
  )

  data = response.json()
  print(data)
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch("https://api.muvi.video/v1/jobs/submit", {
    method: "POST",
    headers: {
      "Authorization": "Bearer YOUR_API_KEY",
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      model: "google/veo-3.1/reference-to-video",
      input: {
        prompt: "The character walks through a futuristic city at night",
        image_urls: ["https://example.com/character-ref.jpg", "https://example.com/style-ref.jpg"],
        aspect_ratio: "16:9",
        resolution: "1080p",
        duration: "8",
        has_sound: "false"
      }
    })
  });

  const data = await response.json();
  console.log(data);
  ```
</CodeGroup>
