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

# Sora2 VVIP 動画生成

> Generate high-quality videos using the sora-2-vvip model

> [!NOTE]
>
> **中国本土のユーザー向け：** 中国本土のユーザーは `https://toapis.cn` を API エンドポイント（Base URL）としてご利用ください。本ドキュメント内の例では `https://toapis.com` を `https://toapis.cn` に置き換えてください。

* `sora-2-vvip` video generation model
* Supports text-to-video, image-to-video, and character reference
* Async task management, query results by task ID

> [!WARNING]
>
> **Important Change**: For better performance and cost control, we no longer support passing base64 image data directly in `image_urls`. Please use the [Upload 画像API](https://docs.toapis.com/docs/ja/api-reference/uploads/images.md) first to upload images and get URLs, then call this endpoint.

## Authorizations

**Authorization** `string` *required*

All endpoints require Bearer Token authentication

Get your API Key from the [API Key Management Page](https://toapis.com/console/token)

Add to request header:

```
Authorization: Bearer YOUR_API_KEY
```

## Body

**model** `string` *required* (default: sora-2-vvip)

Video generation model name

Supported model: `sora-2-vvip` - VVIP version with fixed duration tiers

Example: `"sora-2-vvip"`

**prompt** `string` *required*

Text description for video generation

**💡 @Character Reference Feature:**

You can use `@username` format in the prompt to reference previously created characters and include them in the generated video.

* The character's `username` can be obtained via the [Query Character API](https://docs.toapis.com/docs/ja/api-reference/videos/sora2/get-personas.md)
* Supports referencing multiple characters at once

Example: `"A cat and a dog driving a car together @duksvfkf.cruisingki @zdqwahgj.baronbarki"`

**duration** `integer`

Video duration in seconds

Supports only `4`, `8`, or `12` seconds

Example: `4`

**aspect\_ratio** `string`

Video aspect ratio

Supported formats:

* `16:9` (Landscape)
* `9:16` (Portrait)

**image\_urls** `string[]`

Array of reference image URLs for image-to-video generation

**⚠️ URL format only (base64 no longer supported)**

* Publicly accessible image URL (http\:// or https\://)
* You can use the [Upload 画像API](https://docs.toapis.com/docs/ja/api-reference/uploads/images.md) to upload local images and get URLs

**thumbnail** `boolean`

Whether to generate a video thumbnail

* `true` - Generate a video thumbnail for preview and display

If you don't need a thumbnail, you can omit this parameter

**metadata.n** `integer` (default: 1)

Number of different variants to generate

Range: 1-4

Default: `1`

**metadata.watermark** `boolean` (default: false)

Whether to add a watermark to the generated video

* `false` - No watermark
* `true` - Add Sora official watermark to the video

Default: `false`

**metadata.private** `boolean` (default: false)

Whether to enable privacy mode

* `true` - Video will not be published and cannot be remixed (re-edited)
* `false` - Video can be published and remixed

Default: `false`

**metadata.style** `string`

Video style

Supported values:

* `thanksgiving` - Thanksgiving style
* `comic` - Comic style
* `news` - News style
* `selfie` - Selfie style
* `nostalgic` - Nostalgic/Retro style
* `anime` - Anime style

Example: `"anime"`

**metadata.storyboard** `boolean`

Whether to use storyboard for finer control over video generation details

* `true` - Enable storyboard feature
* `false` - Do not use storyboard

Example: `true`

**metadata.character\_url** `string`

Reference video URL for character extraction

Used to reuse characters from a reference video in the generated video

Example: `"https://filesystem.site/cdn/20251030/javYrU4etHVFDqg8by7mViTWHlMOZy.mp4"`

**⚠️ Note:** When using this parameter, the generated video duration will be reduced by 1 second

**metadata.character\_timestamps** `string`

Character appearance timestamps

Specifies the time range in the reference video where the character appears, only supports 2-second segments

Format: `"start_second,end_second"`

Example: `"1,3"` means the character from second 1 to second 3 in the reference video

**⚠️ Note:** When using this parameter, the generated video duration will be reduced by 1 second

**metadata.character\_create** `boolean` (default: false)

Automatically create a character from the generated video after completion

* `true` - Automatically create character
* `false` - Do not create character

Default: `false`

**metadata.character\_from\_task** `string`

Create a character from an already generated task ID

Reference a previously generated video task ID to extract characters from that video

Example: `"video_01K8SGYNNNVBQTXNR4MM964S7K"`

## レスポンス

**id** `string`

Unique task identifier for status queries

**object** `string`

Object type, always `generation.task`

**model** `string`

モデル name used

**status** `string`

Task status

* `queued` - Queued for processing
* `in_progress` - Processing
* `completed` - Successfully completed
* `failed` - Failed

**progress** `integer`

Task progress percentage (0-100)

**created\_at** `integer`

Task creation timestamp (Unix timestamp)

**metadata** `object`

Task metadata

```bash cURL (Text-to-Video) theme={null}
curl --request POST \
  --url https://toapis.com/v1/videos/generations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "sora-2-vvip",
    "prompt": "A golden retriever running on grass, sunny day",
    "duration": 4,
    "aspect_ratio": "16:9"
  }'
```

```bash cURL (Image-to-Video) theme={null}
curl --request POST \
  --url https://toapis.com/v1/videos/generations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "sora-2-vvip",
    "prompt": "Make this dog come alive, running on grass",
    "image_urls": ["https://example.com/dog.jpg"],
    "duration": 4,
    "aspect_ratio": "16:9"
  }'
```

```bash cURL (With Style) theme={null}
curl --request POST \
  --url https://toapis.com/v1/videos/generations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "sora-2-vvip",
    "prompt": "A cute cartoon elephant",
    "aspect_ratio": "16:9",
    "duration": 4,
    "metadata": {
      "style": "anime",
      "watermark": false
    }
  }'
```

```bash cURL (sora-2-vvip fixed duration) theme={null}
curl --request POST \
  --url https://toapis.com/v1/videos/generations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "sora-2-vvip",
    "prompt": "A small frog dancing on a bright stage",
    "duration": 4,
    "aspect_ratio": "16:9"
  }'
```

```bash cURL (With Character Reference) theme={null}
curl --request POST \
  --url https://toapis.com/v1/videos/generations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "sora-2-vvip",
    "prompt": "A cat and a dog driving a car together @duksvfkf.cruisingki @zdqwahgj.baronbarki",
    "duration": 4,
    "aspect_ratio": "16:9"
  }'
```

```python Python (with metadata) theme={null}
import requests

response = requests.post(
    "https://toapis.com/v1/videos/generations",
    headers={
        "Authorization": "Bearer your-ToAPIs-key",
        "Content-Type": "application/json"
    },
    json={
        "model": "sora-2-vvip",
        "prompt": "A golden retriever running on grass, sunny day",
        "duration": 4,
        "aspect_ratio": "16:9",
        "metadata": {
            "style": "anime",
            "watermark": False,
            "n": 2
        }
    }
)

task = response.json()
print(f"Task ID: {task['id']}")
print(f"Status: {task['status']}")
```

```javascript JavaScript (with metadata) theme={null}
const response = await fetch('https://toapis.com/v1/videos/generations', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer your-ToAPIs-key',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    model: 'sora-2-vvip',
    prompt: 'A golden retriever running on grass, sunny day',
    duration: 4,
    aspect_ratio: '16:9',
    metadata: {
      style: 'anime',
      watermark: false,
      n: 2
    }
  })
});

const task = await response.json();
console.log(`Task ID: ${task.id}`);
console.log(`Status: ${task.status}`);
```

```json 200 theme={null}
{
  "id": "video_01K8SGYNNNVBQTXNR4MM964S7K",
  "object": "generation.task",
  "model": "sora-2-vvip",
  "status": "queued",
  "progress": 0,
  "created_at": 1768380224,
  "metadata": {
    "size": "720x720"
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.