# 视频视频

Canonical URL: https://developers.iagenify.com/zh/sdk/ref/tools/video/
Language: zh

`tools: { video: api.tools.video }, model: { main, video }`

运行后生成一个短视频, 从图像开始, 即当有视频时已经运行过的图像。 声明反对一个名为视频的会议 。

Status: declaration only · needs a video session · declared cost 85

剪辑由 [模拟会议](/zh/sdk/ref/models/create) 以名称下移 `video`.

## 声明 {#declaring}

```javascript
const writer = await api.models.create({ model: "gemini-3.5-flash" });
const filmer = await api.models.create({
  model: "veo-3.1",
  settings: { duration: 4, resolution: "720p", audio: true },
});

const agent = api.agents.create({
  model: { main: writer, video: filmer },
  tools: { video: api.tools.video },
  budget: 400,
});
```

## 模型发送的内容 {#arguments}

| Name | Type | Requirement | Description |
| --- | --- | --- | --- |
| `prompt` | string | 必填 | 创造什么——现场,在一个论点中。 |

会期、分辨率和音频是届会的设置,而不是模型的选择:它们决定价格,因此决定在哪里看得到。

## 它会接收运行的最后图像 {#starting-image}

> **No argument carries it, and none has to**
>
> 如果运行产生了图像, 最新一个图像作为剪辑的第一个框架通过。 所以“ 绘制标志, 然后用所宣布的工具来动画它 ” , 而不是用其他的工具来操作 —— 模型不需要通过自己的背景来携带图像 。

```javascript
tools: {
  image: api.tools.image,
  video: api.tools.video,         // starts from whatever image came before
}
```

## 弹夹的去向 {#result}

```javascript
const [clip] = run.artifacts.filter((a) => a.type === "video");
await pc.files.write("Assets/intro.mp4", Buffer.from(clip.content, "base64"));
```

## 申报成本为85 {#cost}

视频是人们可以做的最昂贵的事情, 警卫在拨打前拒绝拨打已宣布的号码。 85个是有意高估的:一个剪辑可以比要求的长, 仅与预期长度相符的数字, 就能让一个跑步通过预算。

| 设置设置设置设置设置设置设置 | 由谁决定由谁决定 | 原因 |
| --- | --- | --- |
| 寿命期限 | 一、排 排 排会议排 届会的排 届会排 | 价格是按这个价格计算的。 |
| 决议解决了解决 | 一、排 排 排会议排 届会的排 届会排 | 它改变了价格。 |
| 音频 | 一、排 排 排会议排 届会的排 届会排 | 只有一些模特儿有这种能力 |
| 迅速 | 模型模型 | 这是唯一的创造性决定。 |

## 需要几分钟,不是秒 {#time}

代代是一个很长的操作, 被授粉完成。 `video` 宣布的需要a `maxSteps` 以及能配合的耐心——而且这个召唤没有客户间的任何超时,因为放弃它将支付一个你从未收到的剪报。

## 设置您指的预算 {#budget}

```javascript
const agent = api.agents.create({
  model: { main: writer, video: filmer },
  tools: { video: { run: api.tools.video, cost: 120 } },
  budget: 400,                  // three clips at most, whatever the model intends
});
```

- [图像图像图像图像](/zh/sdk/ref/tools/image): 静态,它可以成为第一个框架。
- [create_video](/zh/sdk/agent/tools/create-video): 本地引擎的版本
- [api.tools](/zh/sdk/ref/tools): 十五个,用它们的两个方法

```python
writer = api.models.create(model="gemini-3.5-flash")
filmer = api.models.create(
    model="veo-3.1",
    settings={"duration": 4, "resolution": "720p", "audio": True},
)

agent = api.agents.create(
    model={"main": writer, "video": filmer},
    tools={"video": api.tools.video},
    budget=400,
)
```

```python
tools = {
    "image": api.tools.image,
    "video": api.tools.video,      # starts from whatever image came before
}
```

```python
import base64

clip = next(a for a in run["artifacts"] if a["type"] == "video")
pc.files.write("Assets/intro.mp4", base64.b64decode(clip["content"]))
```

```python
agent = api.agents.create(
    model={"main": writer, "video": filmer},
    tools={"video": {"run": api.tools.video, "cost": 120}},
    budget=400,                    # three clips at most, whatever the model intends
)
```
