Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,8 @@ markitdown path-to-file.pdf -o document.md -d -e "<document_intelligence_endpoin

More information about how to set up an Azure Document Intelligence Resource can be found [here](https://learn.microsoft.com/en-us/azure/ai-services/document-intelligence/how-to-guides/create-document-intelligence-resource?view=doc-intel-4.0.0)

When authenticating with an API key instead of Azure AD, pass an `AzureKeyCredential` through the `docintel_credential` argument.

### Python API

Basic usage in Python:
Expand All @@ -189,9 +191,14 @@ print(result.text_content)
Document Intelligence conversion in Python:

```python
from azure.core.credentials import AzureKeyCredential
from markitdown import MarkItDown

md = MarkItDown(docintel_endpoint="<document_intelligence_endpoint>")
md = MarkItDown(
docintel_endpoint="<document_intelligence_endpoint>",
docintel_credential=AzureKeyCredential("<document_intelligence_api_key>"),
docintel_file_types=["pdf"],
)
result = md.convert("test.pdf")
print(result.text_content)
```
Expand Down