---
title: "AiProcessingSettings"
canonical_url: "https://www.nutrient.io/api/python/settings/advanced/vision/ai-processing-settings/"
md_url: "https://www.nutrient.io/api/python/settings/advanced/vision/ai-processing-settings.md"
last_updated: "2026-06-12T15:43:20.744Z"
description: "Settings for AiProcessing. Values fall back through three levels: document → SDK → built-in default."
---

Settings for AiProcessing. Values fall back through three levels: document → SDK → built-in default. Writes target the document only when set on a document's settings, otherwise the SDK globally when set on SdkSettings.

**Tags:** `Advanced`, `Vision`

```python

from nutrient_sdk import AiProcessingSettings

```

## Construction

`AiProcessingSettings` is accessed through a [`Document`](/api/python/document/) instance for per-document overrides, or via [`SdkSettings`](/api/python/settings/document/sdk-settings/) for SDK-wide defaults.

```python

# Per-document override

with Document.open("input.pdf") as doc:
    settings = doc.settings.ai_processing_settings
    settings.some_field = new_value          # mutate fields directly

# SDK-wide default (applies to all documents)

SdkSettings.ai_processing_settings.some_field = new_value

```

Settings are configured by writing to fields on the returned object. The settings property itself cannot be reassigned — `doc.settings.ai_processing_settings = other_settings` is rejected.

## Properties

### api_key

```python

@property
def api_key(self) -> str

@api_key.setter
def api_key(self, value: str) -> None

```

API key for the configured provider.

**Type:** `str`

---

### endpoint

```python

@property
def endpoint(self) -> str

@endpoint.setter
def endpoint(self, value: str) -> None

```

Endpoint URL for Azure or local providers. Ignored for the public OpenAI provider.

**Type:** `str`

---

### include_composite_confidence

```python

@property
def include_composite_confidence(self) -> bool

@include_composite_confidence.setter
def include_composite_confidence(self, value: bool) -> None

```

Daemon-level default for whether the single rolled-up composite confidence number is attached to result.json metadata leaves (the individual signals are surfaced whenever is on; this controls only the composite). Defaults to (off); a per-request includeCompositeConfidence action parameter overrides it.

**Type:** `bool`

**Default:** `false`

---

### include_confidence

```python

@property
def include_confidence(self) -> bool

@include_confidence.setter
def include_confidence(self, value: bool) -> None

```

Daemon-level default for whether AI processing capacities emit confidence output - the confidence.json sidecar and the per-field confidence signals on result.json metadata. Defaults to (off); a per-request includeConfidence action parameter overrides it.

**Type:** `bool`

**Default:** `false`

---

### include_source_locations

```python

@property
def include_source_locations(self) -> bool

@include_source_locations.setter
def include_source_locations(self, value: bool) -> None

```

Whether extraction grounds each extracted field back to its source location in the document — the metadata node of result.json with per-field match labels and source bounding boxes. Defaults to. Turn off to cut model token usage when only the extracted values matter: grounding mirrors the schema in the structured-output request so the model also returns per-field source ids. A per-request includeSourceLocations action parameter overrides it.

**Type:** `bool`

**Default:** `true`

---

### max_attempts

```python

@property
def max_attempts(self) -> Optional[int]

@max_attempts.setter
def max_attempts(self, value: Optional[int]) -> None

```

Maximum retry attempts on structured-output failure. uses the capacity default of 1.

**Type:** `Optional[int]`

---

### model

```python

@property
def model(self) -> str

@model.setter
def model(self, value: str) -> None

```

Model identifier (e.g. "gpt-4o", an Azure deployment name, or a local model id).

**Type:** `str`

---

### provider

```python

@property
def provider(self) -> str

@provider.setter
def provider(self, value: str) -> None

```

Provider discriminator. One of "openai", "azure", or "local".

**Type:** `str`

---

### strict_structured_output

```python

@property
def strict_structured_output(self) -> bool

@strict_structured_output.setter
def strict_structured_output(self, value: bool) -> None

```

Opt-in (default ): when true, structured output runs in the provider's strict mode — the response is grammar-constrained to the schema, which is normalized automatically (additionalProperties: false, all properties required, unsupported keywords moved into descriptions). Note that under strict mode the model must emit every schema property — absence can't be expressed by omission unless the schema allows null. A per-request strictStructuredOutput action parameter overrides it.

**Type:** `bool`

**Default:** `false`

---

### temperature

```python

@property
def temperature(self) -> Optional[float]

@temperature.setter
def temperature(self, value: Optional[float]) -> None

```

Sampling temperature passed to the model. uses the provider default.

**Type:** `Optional[float]`

---

---

## Related pages

- [Per-document override](/api/python/settings/advanced/vision/custom-vlm-api-settings.md)
- [Per-document override](/api/python/settings/advanced/vision/form-labeling-settings.md)
- [Per-document override](/api/python/settings/advanced/vision/finalizer-settings.md)
- [Per-document override](/api/python/settings/advanced/vision/form-recognition-settings.md)
- [Vision](/api/python/settings/advanced/vision.md)
- [Per-document override](/api/python/settings/advanced/vision/ocr-settings.md)
- [Per-document override](/api/python/settings/advanced/vision/inference-layout-settings.md)
- [Per-document override](/api/python/settings/advanced/vision/open-ai-languages-detection-settings.md)
- [Per-document override](/api/python/settings/advanced/vision/open-ai-picture-alt-settings.md)
- [Per-document override](/api/python/settings/advanced/vision/reading-order-settings.md)
- [Per-document override](/api/python/settings/advanced/vision/segmenter-settings.md)
- [Per-document override](/api/python/settings/advanced/vision/words-detection-settings.md)

