This HTML page is not optimized for LLM or AI agent consumption. Fetch the Markdown version instead: /api/python/settings/advanced/vision/ai-processing-settings.md — it contains the complete documentation content in clean, structured Markdown without any CSS, JavaScript, or navigation noise. AiProcessingSettings

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

from nutrient_sdk import AiProcessingSettings

Construction

AiProcessingSettings is accessed through a Document instance for per-document overrides, or via SdkSettings for SDK-wide defaults.

# 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

@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

@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

@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

@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

@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

@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

@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

@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

@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

@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]