# model.generate

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

`type: "model.generate"`

Un'appella maqueta. Il cavallìo di la maggior parte delle catene: classifica, sintetiza, brou, extract.

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

| Name | Type | Requirement | Description |
| --- | --- | --- | --- |
| `model` | string | obrigatório | Un nome di model. Disparèn è negat a salva. |
| `inputs` | array |  | `[{ type: "text", content }]`, immagini incluse. |
| `outputs` | array |  | Que produciu. Text per default. |
| `schema` | object |  | Un schema JSON. La risposta ritorna come un objete in lugar de prosa. |
| `settings` | object |  | Temperatura, caputura di output, pensiere. |
| `storage` | string |  | Un stoccaggio di cui i documenti lo contextu. |

## Saída {#output}

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

Con un `schema`, i campi dell'ogget sono legibili direttamente — che è ciò che rende la risposta del model safe a ramificare.

## Usar un schema sempre che un passo posterior lo leg {#schema}

> **Ramiando la prosa ramificando la sorte**
>
> Un test di condizione se il testo contine «urgente» rompe la prima volta che il modele scrie «non è urgente». Un schema da un boolean, e la condizione lee un boolean.

```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}}" }],
} }
```

## E' un appello modello {#cost}

Facturat come ogni altro, e la step informa i suoi credits. In un trigger agendat o inbound, che costo è pagat per ogni licenziment - mettere i checks baratos per ante di esso.

- [agent.run](/pt/sdk/workflows/steps/agent-run): Quando un appello non basta.
- [estado](/pt/sdk/workflows/steps/condition): S'impulsant su quello che dice.
- [Etapas do fluxo de trabalho](/pt/sdk/workflows/steps): Os 23 tipos.

```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}}"}],
}}
```
