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 AiProcessingSettingsConstruction
AiProcessingSettings is accessed through a Document instance for per-document overrides, or via SdkSettings for SDK-wide defaults.
# Per-document overridewith 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_valueSettings 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
@propertydef api_key(self) -> str
@api_key.setterdef api_key(self, value: str) -> NoneAPI key for the configured provider.
Type: str
endpoint
@propertydef endpoint(self) -> str
@endpoint.setterdef endpoint(self, value: str) -> NoneEndpoint URL for Azure or local providers. Ignored for the public OpenAI provider.
Type: str
include_composite_confidence
@propertydef include_composite_confidence(self) -> bool
@include_composite_confidence.setterdef include_composite_confidence(self, value: bool) -> NoneDaemon-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
@propertydef include_confidence(self) -> bool
@include_confidence.setterdef include_confidence(self, value: bool) -> NoneDaemon-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
@propertydef include_source_locations(self) -> bool
@include_source_locations.setterdef include_source_locations(self, value: bool) -> NoneWhether 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
@propertydef max_attempts(self) -> Optional[int]
@max_attempts.setterdef max_attempts(self, value: Optional[int]) -> NoneMaximum retry attempts on structured-output failure. uses the capacity default of 1.
Type: Optional[int]
model
@propertydef model(self) -> str
@model.setterdef model(self, value: str) -> NoneModel identifier (e.g. “gpt-4o”, an Azure deployment name, or a local model id).
Type: str
provider
@propertydef provider(self) -> str
@provider.setterdef provider(self, value: str) -> NoneProvider discriminator. One of “openai”, “azure”, or “local”.
Type: str
strict_structured_output
@propertydef strict_structured_output(self) -> bool
@strict_structured_output.setterdef strict_structured_output(self, value: bool) -> NoneOpt-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
@propertydef temperature(self) -> Optional[float]
@temperature.setterdef temperature(self, value: Optional[float]) -> NoneSampling temperature passed to the model. uses the provider default.
Type: Optional[float]