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: 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


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


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]