# Execute structured model job

Execute bounded model calls with durable single-attempt receipts.

## When to use it

Execute a structured model job with a versioned prompt and output schema. Completed answers have saved receipts that recovery can reuse. An outcome whose completion cannot be established requires inspection; it is not automatically submitted again.

## Add and configure

1. Add **Execute structured model job** from the workflow step picker.
2. Give the step a recognisable name and connect its required inputs.
3. Set the options below. Nested names identify fields within an object or a list item.
4. Validate the recipe, inspect the test result, then run it on the intended data.

The step identifier used in the editor’s code view is `model_execute`.

## Settings

| Setting | Accepted value | Required | Default | What it controls |
| --- | --- | --- | --- | --- |
| Allowed Models (`allowed_models`) | list of string | No | ["openai:gpt-6-luna","openai:qwen3.8-27b"] | Permitted model identifiers for this structured-model call. |
| definition (`definition`) | object or null | No | null | Versioned definition of the model call or reusable workflow member. Nested settings describe its content. |
| Allowed Models (`definition.allowed_models`) | list of string | No | ["openai:gpt-6-luna","openai:qwen3.8-27b"] | Permitted model identifiers declared by this model definition. |
| Input Mapping (`definition.input_mapping`) | object of string | Yes | Not specified | Map prompt input names to values selected from the task input. |
| Max Output Tokens (`definition.max_output_tokens`) | integer; minimum 1; maximum 32000 | No | 16000 | Maximum model output tokens declared by the definition. |
| Model (`definition.model`) | string | No | "openai:gpt-6-luna" | Model identifier declared by the definition. |
| Name (`definition.name`) | string; pattern `^[a-z][a-z0-9_-]{0,63}$` | Yes | Not specified | Stable name of the versioned definition. |
| Output Schema (`definition.output_schema`) | object | Yes | Not specified | JSON Schema that the structured model result must satisfy. |
| PromptDefinition (`definition.prompt`) | object | Yes | Not specified | Named, versioned prompt used by the model definition. |
| Name (`definition.prompt.name`) | string; minimum characters 1; maximum characters 64 | Yes | Not specified | Stable prompt name. |
| Text (`definition.prompt.text`) | string; minimum characters 1; maximum characters 1200000 | Yes | Not specified | Prompt instructions and supported input placeholders. |
| Version (`definition.prompt.version`) | string; pattern `^(0\|[1-9]\d*)\.(0\|[1-9]\d*)\.(0\|[1-9]\d*)(-[0-9A-Za-z.-]+)?(\+[0-9A-Za-z.-]+)?$` | Yes | Not specified | Semantic version of this prompt. |
| Timeout Seconds (`definition.timeout_seconds`) | integer; minimum 1; maximum 600 | No | 120 | Model-call timeout declared by the definition. |
| Version (`definition.version`) | string; pattern `^(0\|[1-9]\d*)\.(0\|[1-9]\d*)\.(0\|[1-9]\d*)(-[0-9A-Za-z.-]+)?(\+[0-9A-Za-z.-]+)?$` | Yes | Not specified | Semantic version identifying the immutable definition. |
| Max Output Tokens (`max_output_tokens`) | integer; minimum 1; maximum 32000 | No | 16000 | Maximum output tokens for the structured-model operation. |
| Model (`model`) | string | No | "openai:gpt-6-luna" | Provider-qualified model identifier for the operation. |
| Timeout Seconds (`timeout_seconds`) | integer; minimum 1; maximum 600 | No | 120 | Time limit in seconds for the configured processing operation. Inspect its saved outcome before retrying after a timeout. |

## Inputs and outputs

| Direction | Port | Content | Required | Multiple records |
| --- | --- | --- | --- | --- |
| Inputs | `in` | records | Yes | Yes |
| Outputs | `out` | records | Yes | Yes |

## Effects, testing, and recovery

Calls a model and can consume model budget.

The declared preview behaviour is to execute this step. Reads, processing, or model usage can therefore be real. Read [dry runs](/docs/workflows/dry-runs) before using a preview with live connections.

Duplicate prevention uses the configured or operation-bound key; an external receiver must recognise it. The step declares safe replay for its supported recovery path.

### Execution bounds

| Limit | Declared bound |
| --- | --- |
| max input bytes | 6291456 |
| max output bytes | 6291456 |
| max records | 100 |
| memory mb | 256 |
| timeout seconds | 600 |

Recovery policy: ambiguous outcome: manual_resolution; cancellation: cooperative; errors: invalid_input, invalid_config, quota_exhausted, timeout, recovery_unsafe, upstream_rejected; max attempts: 1.

## Example: Empty branch

Step settings:

```json
{}
```

Expected output for this example:

```json
[]
```

## Check the result

Inspect the selected run’s status, counts, errors, and output records. An empty collection can be a valid result, and a completed step can contain per-record failures where the step defines that behaviour. Check the next step’s expected record shape before publishing or delivering the result.
