# model.generate

Canonical URL: https://developers.iagenify.com/zh/sdk/workflows/steps/model-generate/
Language: zh

`type: "model.generate"`

多数链条的工马:分类、总结、草稿、提取。

Status: model required · schema for JSON · billed per call

| Name | Type | Requirement | Description |
| --- | --- | --- | --- |
| `model` | string | 必填 | 模型名 保存时拒绝 失踪 。 |
| `inputs` | array |  | `[{ type: "text", content }]`,包含图像。 |
| `outputs` | array |  | 生成什么。 默认情况下文本 。 |
| `schema` | object |  | A A A JSON 答案是作为物体 而不是作为书状 |
| `settings` | object |  | 温度 输出上限 思考 |
| `storage` | string |  | 储存文件提供背景材料。 |

## 输出 {#output}

```javascript
{{steps.classify.output.text}}            // the prose
{{steps.classify.output.usage.credits}}   // what it cost
```

带 `schema`,对象的字段可以直接读取——这就是模型对分支的回答安全性所在。

## 使用一个计划,每当稍后一步读到它时使用 {#schema}

> **传言的分行是靠运气的分行**
>
> 测试文本是否包含“ 紧急” 的状态, 第一次打破模式写道 ” 这不是紧急 。 计划给出了布林, 条件读出布林。

```javascript
{ id: "classify", type: "model.generate", config: {
    model: "gemini-3.5-flash",
    schema: { type: "object", properties: { urgent: { type: "boolean" }, reason: { type: "string" } } },
    inputs: [{ type: "text", content: "Is this urgent? {{input.text}}" }],
} }
```

## 是个示范电话 {#cost}

以其他任何方式开出账单,而该步骤报告其信用。 在一个预定或即将到来的触发点,每发枪都付出成本 — — 将廉价的支票放在面前。

- [agent.run](/zh/sdk/workflows/steps/agent-run): 单打一次是不够的。
- [条件条件条件](/zh/sdk/workflows/steps/condition): 说到做到
- [工作流步骤](/zh/sdk/workflows/steps): 全部 23 种类型。

```python
"{{steps.classify.output.text}}"            # the prose
"{{steps.classify.output.usage.credits}}"   # what it cost
```

```python
{"id": "classify", "type": "model.generate", "config": {
    "model": "gemini-3.5-flash",
    "schema": {"type": "object", "properties": {"urgent": {"type": "boolean"}, "reason": {"type": "string"}}},
    "inputs": [{"type": "text", "content": "Is this urgent? {{input.text}}"}],
}}
```
