# 选项 · 媒体

Canonical URL: https://developers.iagenify.com/zh/sdk/ref/agents/options/media/
Language: zh

`media: { image, video, voice, music }`

四个生成器的默认值。 它们属于默认值, 而不是指示 : 它们只在模型没有表示任何的情况下才适用 。

Status: defaults, not rules · an unknown key is refused · the model still wins

```javascript
api.agents.create({
  runtime: "local", machine: pc, model,
  media: {
    image: { resolution: "2K", aspect: "16:9" },
    video: { model: "veo-3.1-lite", duration: 4, resolution: "720p" },
    voice: { voice: "Kore" },
    music: { duration: 30, style: "lo-fi" },
  },
});
```

## 四把四把钥匙 {#keys}

| 键键键键键键 | 工具 | Settings |
| --- | --- | --- |
| `image` | `create_image` | `model` · `resolution` · `aspect` · `avoid` |
| `video` | `create_video` | `model` · `duration` · `resolution` · `audio` · `aspect` |
| `voice` | `create_voice` | `voice` |
| `music` | `create_music` | `duration` · `tempo` · `style` |

关键是工具的简称 `create_video` 是 `video`。在创建时拒绝其他任何内容 `invalid_media` 命名四。

> **拒绝而不是忽略未知的密钥**
>
> 拼错设置, 无法做任何事情, 这正是您不希望配置面板提供的: 它看起来是应用过的, 而不是应用过的。 无法创建是找到的唯一方法 。

## 模型的选择胜出 {#defaults}

默认应用于模型没有说什么的地方。 ” ” 让它在对话中肖像 ” 。 `aspect` 设置在这里——这就是为什么使这个图纸是默认的,而不是一套制约。

## 默认默认会通过同一个守卫 {#guards}

合并的论据是所检查的,所以选择的模式无法兑现的默认,即没有这种模式的音频,在拨打之前就被抓住,而不是在已经获得信贷的提供者失败。

## 改变运行成本 {#cost}

> **决议和期限是价格**
>
> 默认图像 4K 默认是 图片 3 8 个分数 , 而不是 1K 的 17 个分数 。 视频 默认 8 秒 , 最高模型 的 音效是 数百 。 将这些与预算设置在一起 。

- [create_image](/zh/sdk/agent/tools/create-image): 这些默认参数 。
- [create_video](/zh/sdk/agent/tools/create-video): 和昂贵的。
- [预算预算预算预算](/zh/sdk/ref/agents/options/budget): 和天花板配对

```python
from iagenify import MEDIA_OPTIONS

# The Python engine has no media option: the model passes these in each
# create_image / create_video / create_voice / create_music call.
MEDIA_OPTIONS["image"]["params"]   # resolution, aspect, …
MEDIA_OPTIONS["video"]["model"]    # the default video model

agent = api.agents.create(
    runtime="local", machine=pc, model=model,
    system="Images in 2K at 16:9; videos with veo-3.1-lite, 4 seconds at 720p; voice Kore; music 30 s lo-fi.",
)
```
