---
title: "OpenAILanguagesDetectionSettings"
canonical_url: "https://www.nutrient.io/api/python/settings/vision/advanced/open-ai-languages-detection-settings/"
md_url: "https://www.nutrient.io/api/python/settings/vision/advanced/open-ai-languages-detection-settings.md"
last_updated: "2026-06-19T15:34:06.210Z"
description: "Settings for OpenAILanguagesDetection. Values fall back through three levels: document → SDK → built-in default."
---

Settings for OpenAILanguagesDetection. 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`, `Advanced`

```python

from nutrient_sdk import OpenAILanguagesDetectionSettings

```

## Construction

`OpenAILanguagesDetectionSettings` 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.open_ai_languages_detection_settings
    settings.some_field = new_value          # mutate fields directly

# SDK-wide default (applies to all documents)

SdkSettings.open_ai_languages_detection_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.open_ai_languages_detection_settings = other_settings` is rejected.

## Properties

### api_endpoint

```python

@property
def api_endpoint(self) -> str

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

```

OpenAI API endpoint URL.

**Type:** `str`

**Default:** `"https://api.openai.com/v1"`

---

### api_key

```python

@property
def api_key(self) -> str

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

```

OpenAI API key for authentication.

**Type:** `str`

**Default:** `string.Empty`

---

### detail

```python

@property
def detail(self) -> str

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

```

Detail level for image analysis (low, high, auto).

**Type:** `str`

**Default:** `"low"`

---

### max_tokens

```python

@property
def max_tokens(self) -> int

@max_tokens.setter
def max_tokens(self, value: int) -> None

```

Maximum number of tokens in the response.

**Type:** `int`

**Default:** `500`

---

### model

```python

@property
def model(self) -> str

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

```

Model to use for language detection (e.g., "gpt-4o-mini").

**Type:** `str`

**Default:** `"gpt-4o-mini"`

---

### temperature

```python

@property
def temperature(self) -> float

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

```

Temperature for response generation (0.0 to 1.0). Lower values produce more deterministic outputs.

**Type:** `float`

**Default:** `0.0`

---

---

## Related pages

- [Per-document override](/api/python/settings/vision/advanced/ai-augmenter-settings.md)
- [Per-document override](/api/python/settings/vision/advanced/ai-processing-settings.md)
- [Per-document override](/api/python/settings/vision/advanced/claude-api-settings.md)
- [Per-document override](/api/python/settings/vision/advanced/content-extraction-settings.md)
- [Per-document override](/api/python/settings/vision/advanced/deskew-settings.md)
- [Per-document override](/api/python/settings/vision/advanced/custom-vlm-api-settings.md)
- [Per-document override](/api/python/settings/vision/advanced/document-layout-json-export-settings.md)
- [Per-document override](/api/python/settings/vision/advanced/finalizer-settings.md)
- [Per-document override](/api/python/settings/vision/advanced/form-recognition-settings.md)
- [Per-document override](/api/python/settings/vision/advanced/handwriting-settings.md)
- [Per-document override](/api/python/settings/vision/advanced/inference-layout-settings.md)
- [Advanced](/api/python/settings/vision/advanced.md)
- [Per-document override](/api/python/settings/vision/advanced/ocr-settings.md)
- [Per-document override](/api/python/settings/vision/advanced/form-labeling-settings.md)
- [Per-document override](/api/python/settings/vision/advanced/open-ai-api-endpoint-settings.md)
- [Per-document override](/api/python/settings/vision/advanced/reading-order-settings.md)
- [Per-document override](/api/python/settings/vision/advanced/open-ai-picture-alt-settings.md)
- [Per-document override](/api/python/settings/vision/advanced/segmenter-settings.md)
- [Per-document override](/api/python/settings/vision/advanced/vision-descriptor-settings.md)
- [Per-document override](/api/python/settings/vision/advanced/words-detection-settings.md)
- [Per-document override](/api/python/settings/vision/advanced/table-recognition-settings.md)

