You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/ai-foundry/model-inference/how-to/use-image-to-text.md
+13-41Lines changed: 13 additions & 41 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,60 +4,33 @@ titleSuffix: Azure AI Foundry
4
4
description: Learn how to generate images with image models with Azure AI model inference
5
5
manager: scottpolly
6
6
author: msakande
7
-
reviewer: Frogglew
7
+
reviewer: frogglew
8
8
ms.service: azure-ai-model-inference
9
9
ms.topic: how-to
10
10
ms.date: 04/29/2025
11
11
ms.author: mopeakande
12
-
ms.reviewer: saoh
12
+
ms.reviewer: frogglew
13
13
ms.custom: references_regions, tool_generated
14
14
zone_pivot_groups: azure-ai-inference-samples
15
15
---
16
16
17
-
# How to generate images with Azure AI model inference
18
-
19
-
::: zone pivot="programming-language-python"
20
-
21
-
Azure AI model inference Python API does not support image models.
22
-
23
-
::: zone-end
24
-
25
-
::: zone pivot="programming-language-javascript"
26
-
27
-
Azure AI model inference Javascript API does not support image models.
28
-
29
-
::: zone-end
30
-
31
-
32
-
::: zone pivot="programming-language-java"
33
-
34
-
Azure AI model inference Java API does not support image models.
35
-
36
-
::: zone-end
37
-
38
-
39
-
::: zone pivot="programming-language-csharp"
40
-
41
-
Azure AI model inference C Sharp API does not support image models.
42
-
43
-
::: zone-end
44
-
17
+
# How to use image models on AI Foundry Models
45
18
46
19
::: zone pivot="programming-language-rest"
47
20
48
-
This article explains how to generate images with _image_ models deployed to Azure AI model inference in Azure AI services. Some models have unique parameters or data format requirements.
21
+
This article explains how to use _image_ models on AI Foundry. Some models have unique parameters or data format requirements.
49
22
50
23
## Prerequisites
51
24
52
25
To use image models in your application, you need:
* An image model deployment. If you don't have one, see [Add and configure models to Azure AI model inference](create-model-deployments.md) to add an image model to your resource. This article uses the Mistral OCR model.
29
+
* An image model deployment on Azure AI Foundry. This article uses an Mistral OCR model deployment.
57
30
58
31
## Use image model
59
32
60
-
1. Authenticate using API key. For serverless API endpoints, deploy the model to generate the endpoint URL and an API key to authenticate against the service. In this example, the endpoint and key are strings holding the endpoint URL and the API key. The API endpoint URL and API key can be found on the **Deployments + Endpoint** page once the model is deployed.
33
+
1. Authenticate using API key. First, deploy the model to generate the endpoint URL and an API key to authenticate against the service. In this example, the endpoint and key are strings holding the endpoint URL and the API key. The API endpoint URL and API key can be found on the **Deployments + Endpoint** page once the model is deployed.
61
34
62
35
If you're using bash:
63
36
@@ -77,7 +50,7 @@ To use image models in your application, you need:
77
50
export AZURE_API_KEY = "<your-api-key>"
78
51
```
79
52
80
-
1. Run a basic code sample. Different image models accept different data formats. In this example, `Mistral OCR 25.03` supports only base64 data; document url or image url isn't supported. Paste the following code into a shell.
53
+
1. Run a basic code sample. Different image models accept different data formats. In this example, `Mistral OCR 25.03` supports only base64 encoded data; document url or image url isn't supported. Paste the following code into a shell.
81
54
82
55
```http
83
56
curl --request POST \
@@ -94,21 +67,20 @@ To use image models in your application, you need:
94
67
}'
95
68
```
96
69
97
-
## Model specific requirements
70
+
## Model specific parameters
98
71
99
-
Some models only support specific data format. The following table list the supported and unsupported data formats for models.
72
+
Some image models only support specific data format. Mistral OCR 25.03 for example requires `base64 encoded image data` for their `document_url` parameter. The following table list the supported and unsupported data formats for image models on Azure AI Foundry Models.
100
73
101
74
| Model | Supported | Not supported |
102
75
| :---- | ----- | ----- |
103
-
| Mistral OCR 25.03 | base64 only | document url or image url |
104
-
| dall-e-3 | Must be one of url or b64_json | base64 |
105
-
| gpt-image-1 | base64 only | document url or image url |
0 commit comments