OpenAIApiEndpointSettings
Settings for OpenAIApiEndpoint. 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 OpenAIApiEndpointSettingsConstruction
OpenAIApiEndpointSettings 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.open_ai_api_endpoint_settings settings.some_field = new_value # mutate fields directly
# SDK-wide default (applies to all documents)SdkSettings.open_ai_api_endpoint_settings.some_field = new_valueSettings are configured by writing to fields on the returned object. The settings property itself cannot be reassigned — doc.settings.open_ai_api_endpoint_settings = other_settings is rejected.
Properties
api_endpoint
@propertydef api_endpoint(self) -> str
@api_endpoint.setterdef api_endpoint(self, value: str) -> NoneAPI endpoint URL for OpenAI-compatible chat completions
Type: str
Default: "https://api.openai.com/v1"
api_key
@propertydef api_key(self) -> str
@api_key.setterdef api_key(self, value: str) -> NoneOpenAI API key for authentication.
Type: str
Default: string.Empty
batch_size
@propertydef batch_size(self) -> int
@batch_size.setterdef batch_size(self, value: int) -> NoneNumber of zone images to include per VLM API call.
Type: int
Default: 8
classification_strategy
@propertydef classification_strategy(self) -> VlmClassificationStrategy
@classification_strategy.setterdef classification_strategy(self, value: VlmClassificationStrategy) -> NoneStrategy for how zones are sent to the VLM for classification.
Type: VlmClassificationStrategy
Default: VlmClassificationStrategy.MultiZone
max_concurrency
@propertydef max_concurrency(self) -> int
@max_concurrency.setterdef max_concurrency(self, value: int) -> NoneMaximum number of concurrent VLM API calls.
Type: int
Default: 4
max_tokens
@propertydef max_tokens(self) -> int
@max_tokens.setterdef max_tokens(self, value: int) -> NoneMaximum tokens in response (-1 = unlimited)
Type: int
Default: -1
model
@propertydef model(self) -> str
@model.setterdef model(self, value: str) -> NoneModel identifier to use for classification
Type: str
Default: "gpt-5.1"
send_full_page_reference
@propertydef send_full_page_reference(self) -> bool
@send_full_page_reference.setterdef send_full_page_reference(self, value: bool) -> NoneWhether to send the full page image as reference context alongside cropped zones. Only used when UseZoneCropping is true.
Type: bool
Default: false
stream
@propertydef stream(self) -> bool
@stream.setterdef stream(self, value: bool) -> NoneWhether to stream responses from the API
Type: bool
Default: false
system_prompt
@propertydef system_prompt(self) -> str
@system_prompt.setterdef system_prompt(self, value: str) -> NoneOptional custom system prompt for zone classification. When empty, the module uses a default prompt based on the ClassificationStrategy.
Type: str
Default: string.Empty
temperature
@propertydef temperature(self) -> float
@temperature.setterdef temperature(self, value: float) -> NoneTemperature for response generation (0.0 = deterministic, 1.0 = creative)
Type: float
Default: 0.7