dpo check this conversation on GitHub (nevermind the project this conversation is in). The comment left by user 'lfelder' has valuable info on how to at least getting OCR working on base64 encoded images. I can confirm this works.
url = url_to_azure_endpoint
headers = {
"Content-Type": "application/json",
"Authorization": "Bearer your_bearer_token"
}
base64_image = your_base_64_encoded_image
data = {
"model": "mistral-ocr",
"document": {
"image_url": f"data:image/png;base64,{base64_image}"
},
# Optional parameters:
"include_image_base64": True,
"image_limit": 5,
"image_min_size": 100
}
response = requests.post(url, headers=headers, json=data)
Microsoft still has to provide documentation on how to process documents via 'document_url' though as this seems to require some preprocessing we don't know about yet.