# Inference specification

> Generated field reference from the AQVEN Python package.

[Read in the browser](https://aqvenstudio.com/reference/inference/)

<!-- Generated by tools/generate_reference.py. Do not edit this file by hand. -->

This reference is generated from the package's Pydantic models. Fields use their YAML aliases. Unknown fields are rejected. Cross-field rules implemented by validators may not appear in JSON Schema; run `aqven check` on a complete project.

## AllowedSetSpec

| YAML field | Type | Required | Default | Constraints |
| --- | --- | --- | --- | --- |
| `type` | `string` | Yes | `—` | — |
| `from` | `string` | Yes | `—` | — |
| `labels_from` | `string \| null` | No | `None` | — |

[JSON Schema](/reference/schemas/AllowedSetSpec.json)

## CheckSpec

| YAML field | Type | Required | Default | Constraints |
| --- | --- | --- | --- | --- |
| `use` | `string \| null` | No | `None` | — |
| `run` | `string \| null` | No | `None` | — |
| `inference` | `string \| null` | No | `None` | — |
| `agent` | `string \| null` | No | `None` | — |
| `with` | `map<string, JsonValue> \| null` | No | `None` | — |
| `on_fail` | `'retry' \| 'fail' \| 'flag'` | Yes | `—` | — |
| `threshold` | `number \| null` | No | `None` | — |

[JSON Schema](/reference/schemas/CheckSpec.json)

## DisplayFormatterSpec

| YAML field | Type | Required | Default | Constraints |
| --- | --- | --- | --- | --- |
| `run` | `string \| null` | No | `None` | — |
| `template` | `string \| null` | No | `None` | — |
| `variables` | `map<string, DisplayVariableRef>` | No | `{}` | — |

[JSON Schema](/reference/schemas/DisplayFormatterSpec.json)

## ExampleSpec

| YAML field | Type | Required | Default | Constraints |
| --- | --- | --- | --- | --- |
| `name` | `string` | Yes | `—` | — |
| `in` | `map<string, JsonValue>` | Yes | `—` | — |
| `out` | `map<string, JsonValue>` | Yes | `—` | — |

[JSON Schema](/reference/schemas/ExampleSpec.json)

## InferenceDisplaySpec

| YAML field | Type | Required | Default | Constraints |
| --- | --- | --- | --- | --- |
| `input` | `DisplayFormatterSpec \| null` | No | `None` | — |
| `output` | `DisplayFormatterSpec \| null` | No | `None` | — |

[JSON Schema](/reference/schemas/InferenceDisplaySpec.json)

## InferenceSpec

| YAML field | Type | Required | Default | Constraints |
| --- | --- | --- | --- | --- |
| `apiVersion` | `'aqven/v1'` | Yes | `—` | — |
| `kind` | `'Inference'` | Yes | `—` | — |
| `description` | `string` | Yes | `—` | minLength=1 |
| `in` | `FieldDecl[]` | No | `[]` | — |
| `out` | `OutputField[]` | Yes | `—` | minItems=1 |
| `enum_definitions` | `'auto' \| 'manual'` | No | `'auto'` | — |
| `prompt` | `string \| null` | No | `None` | — |
| `variants` | `map<string, VariantSlot> \| null` | No | `None` | — |
| `allowed_sets` | `AllowedSetSpec[] \| null` | No | `None` | — |
| `examples` | `ExampleSpec[] \| null` | No | `None` | — |
| `checks` | `CheckSpec[] \| null` | No | `None` | — |
| `display` | `InferenceDisplaySpec \| null` | No | `None` | — |

[JSON Schema](/reference/schemas/InferenceSpec.json)

## VariantSlot

| YAML field | Type | Required | Default | Constraints |
| --- | --- | --- | --- | --- |
| `on` | `string` | Yes | `—` | — |
| `cases` | `map<string, VariantRef>` | Yes | `—` | — |
| `default` | `VariantRef \| null` | No | `None` | — |

[JSON Schema](/reference/schemas/VariantSlot.json)
