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
# How to generate images with Azure AI model inference
18
+
17
19
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.
18
20
19
21
## Prerequisites
@@ -22,51 +24,49 @@ 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 services](../../how-to/create-model-deployments.md) to add an image model to your resource.
26
-
27
-
* This article uses `Mistral OCR`.
27
+
* 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.
28
28
29
29
## Use image model
30
30
31
31
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.
32
32
33
-
If you're using bash:
34
-
35
-
```
36
-
export AZURE_API_KEY = "<your-api-key>"
37
-
```
38
-
39
-
If you're in powershell:
40
-
41
-
```
42
-
$Env:AZURE_API_KEY = "<your-api-key>"
43
-
```
44
-
45
-
If you're using Windows command prompt:
33
+
If you're using bash:
34
+
35
+
```
36
+
export AZURE_API_KEY = "<your-api-key>"
37
+
```
38
+
39
+
If you're in powershell:
46
40
47
-
```
48
-
export AZURE_API_KEY = "<your-api-key>"
49
-
```
41
+
```
42
+
$Env:AZURE_API_KEY = "<your-api-key>"
43
+
```
44
+
45
+
If you're using Windows command prompt:
46
+
47
+
```
48
+
export AZURE_API_KEY = "<your-api-key>"
49
+
```
50
50
51
51
1. Run a basic code sample. Paste the following code into a shell.
52
52
53
-
> [!NOTE]
54
-
> 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.
> 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.
0 commit comments