| Name | Type | Description |
|---|---|---|
endpoint | Optional[str] | Default: NoneCU resource endpoint URL. |
credential | Optional[Union[str, AzureKeyCredential, TokenCredential]] | Default: None |
project_endpoint | Optional[str] | Default: None |
analyzer_id | Optional[str] | Default: None |
file_path | Optional[str] | Default: None |
url | Optional[str] | Default: None |
bytes_source | Optional[bytes] | Default: None |
source | Optional[str] | Default: None |
output_mode | OutputMode | Default: 'markdown' |
content_range | Optional[str] | Default: None |
metadata_selection | Optional[List[str]] | Default: None |
model_deployments | Optional[Dict[str, str]] | Default: None |
analyze_kwargs | Optional[Dict[str, Any]] | Default: None |
api_version | Optional[str] | Default: None |
| Name | Type |
|---|---|
| endpoint | Optional[str] |
| credential | Optional[Union[str, AzureKeyCredential, TokenCredential]] |
| project_endpoint | Optional[str] |
| analyzer_id | Optional[str] |
| file_path | Optional[str] |
| url | Optional[str] |
| bytes_source | Optional[bytes] |
| source | Optional[str] |
| output_mode | OutputMode |
| content_range | Optional[str] |
| metadata_selection | Optional[List[str]] |
| model_deployments | Optional[Dict[str, str]] |
| analyze_kwargs | Optional[Dict[str, Any]] |
| api_version | Optional[str] |
Load documents, images, audio, and video using Azure Content Understanding.
Produces LangChain Document objects with extracted markdown content and rich metadata (fields, confidence scores, source info).
Exactly one of file_path, url, or bytes_source must be provided.
Example:
.. code-block:: python
from azure.identity import DefaultAzureCredential from langchain_azure_ai.document_loaders import ( AzureAIContentUnderstandingLoader, )
loader = AzureAIContentUnderstandingLoader( endpoint="https://my-resource.services.ai.azure.com", credential=DefaultAzureCredential(), file_path="report.pdf", )
loader = AzureAIContentUnderstandingLoader( project_endpoint="https://my-resource.services.ai.azure.com/api/projects/my-project", credential=DefaultAzureCredential(), file_path="report.pdf", ) docs = loader.load()
Azure credential — API key string,
AzureKeyCredential, or TokenCredential.
Azure AI Foundry project endpoint URL
(e.g. https://<resource>.services.ai.azure.com/api/projects/<project>).
Mutually exclusive with endpoint. Falls back to the
AZURE_AI_PROJECT_ENDPOINT environment variable.
Analyzer to use. Defaults by input MIME type if omitted.
Path to a local file (mutually exclusive with
url and bytes_source).
Publicly accessible URL pointing to the content
(mutually exclusive with file_path and
bytes_source).
Raw bytes of the content, e.g. from an
in-memory download, database blob, or Azure Blob
Storage response (mutually exclusive with file_path
and url).
Label for metadata["source"]. Defaults to file_path
or url when provided.
How to split results into Documents —
"markdown" (default), "page",
or "segment". Segment mode requires a custom
analyzer with enableSegment=true and
contentCategories. Supported for document and video
analyzers only — audio-based analyzers do not support
segmentation.
Subset of input to analyze. Pages use 1-based
page numbers, e.g. "1-3,5,9-" (page 1 through 3,
page 5, and page 9 onward); audio/video uses
milliseconds "0-60000".
What to include in metadata, e.g.
["fields", "tables"]. Defaults to include fields.
Optional mapping of model names to deployment names. Use this to override default model deployments for custom analyzers.
Extra keyword arguments forwarded to
begin_analyze (e.g., processing_location).
Content Understanding API version to use
(e.g. "2025-11-01"). Defaults to the latest version
supported by the installed SDK.