Skip to content

Commit 46db9eb

Browse files
authored
Merge pull request #2 from msakande/frogglew-image-model-doc
Update use-image-to-text.md
2 parents 42b58b5 + 10c927f commit 46db9eb

File tree

1 file changed

+13
-41
lines changed

1 file changed

+13
-41
lines changed

articles/ai-foundry/model-inference/how-to/use-image-to-text.md

Lines changed: 13 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -4,60 +4,33 @@ titleSuffix: Azure AI Foundry
44
description: Learn how to generate images with image models with Azure AI model inference
55
manager: scottpolly
66
author: msakande
7-
reviewer: Frogglew
7+
reviewer: frogglew
88
ms.service: azure-ai-model-inference
99
ms.topic: how-to
1010
ms.date: 04/29/2025
1111
ms.author: mopeakande
12-
ms.reviewer: saoh
12+
ms.reviewer: frogglew
1313
ms.custom: references_regions, tool_generated
1414
zone_pivot_groups: azure-ai-inference-samples
1515
---
1616

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
4518

4619
::: zone pivot="programming-language-rest"
4720

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.
4922

5023
## Prerequisites
5124

5225
To use image models in your application, you need:
5326

5427
[!INCLUDE [how-to-prerequisites](../includes/how-to-prerequisites.md)]
5528

56-
* 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.
5730

5831
## Use image model
5932

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.
6134

6235
If you're using bash:
6336

@@ -77,7 +50,7 @@ To use image models in your application, you need:
7750
export AZURE_API_KEY = "<your-api-key>"
7851
```
7952
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.
8154
8255
```http
8356
curl --request POST \
@@ -94,21 +67,20 @@ To use image models in your application, you need:
9467
}'
9568
```
9669
97-
## Model specific requirements
70+
## Model specific parameters
9871
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.
10073
10174
| Model | Supported | Not supported |
10275
| :---- | ----- | ----- |
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 |
76+
| Mistral OCR 25.03 | base64 encoded image data | document url, image url |
77+
| dall-e-3 | document url, image url, b64_json | base64 encoded image data |
78+
| gpt-image-1 | base64 encoded image data, image url | document url |
10679
10780
10881
## Related content
10982
110-
* [Use embeddings models](use-embeddings.md)
111-
* [Azure AI Model Inference API](.././reference/reference-model-inference-api.md)
83+
* [How to use Image Generation Models on Azure OpenAI](.././how-to/dall-e?tabs=gpt-image-1.md)
11284
11385
::: zone-end
11486

0 commit comments

Comments
 (0)