Skip to content

Commit d1a3500

Browse files
committed
writer edits
1 parent 3e64a6f commit d1a3500

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

articles/ai-services/content-safety/includes/quickstarts/rest-quickstart-image.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ The following section walks through a sample image moderation request with cURL.
2727

2828
Choose a sample image to analyze, and download it to your device.
2929

30-
We support JPEG, PNG, GIF, BMP, TIFF, or WEBP image formats. The maximum size for image submissions is 4 MB, and image dimensions must be between 50 x 50 pixels and 7,200 x 7,200 pixels. If your format is animated, we'll extract the first frame to do the detection.
30+
See [Input requirements](./overview.md#input-requirements) for the image limitations. If your format is animated, the service will extract the first frame to do the analysis.
3131

3232
You can input your image by one of two methods: **local filestream** or **blob storage URL**.
3333
- **Local filestream** (recommended): Encode your image to base64. You can use a website like [codebeautify](https://codebeautify.org/image-to-base64-converter) to do the encoding. Then save the encoded string to a temporary location.
@@ -39,7 +39,7 @@ You can input your image by one of two methods: **local filestream** or **blob s
3939

4040
Paste the command below into a text editor, and make the following changes.
4141

42-
1. Substitute the `<endpoint>` with your resource endpoint URL.
42+
1. Replace `<endpoint>` with your resource endpoint URL.
4343
1. Replace `<your_subscription_key>` with your key.
4444
1. Populate the `"image"` field in the body with either a `"content"` field or a `"blobUrl"` field. For example: `{"image": {"content": "<base_64_string>"}` or `{"image": {"blobUrl": "<your_storage_url>"}`.
4545

@@ -57,7 +57,7 @@ curl --location --request POST '<endpoint>/contentsafety/image:analyze?api-versi
5757
```
5858

5959
> [!NOTE]
60-
> If you're using a blob storage URL, the request body will look like this:
60+
> If you're using a blob storage URL, the request body should look like this:
6161
>
6262
> ```
6363
> {
@@ -67,8 +67,6 @@ curl --location --request POST '<endpoint>/contentsafety/image:analyze?api-versi
6767
> }
6868
> ```
6969
70-
Open a command prompt window and run the cURL command.
71-
7270
The below fields must be included in the URL:
7371
7472
| Name |Required? | Description | Type |
@@ -83,6 +81,9 @@ The parameters in the request body are defined in this table:
8381
| **categories** | Optional | This is assumed to be an array of category names. See the [Harm categories guide](../../concepts/harm-categories.md) for a list of available category names. If no categories are specified, all four categories are used. We use multiple categories to get scores in a single request. | String |
8482
| **outputType** | Optional | Image moderation API only supports `"FourSeverityLevels"`. Output severities in four levels. The value can be `0,2,4,6` | String|
8583
84+
Open a command prompt window and run the cURL command.
85+
86+
8687
### Output
8788
8889
You should see the image moderation results displayed as JSON data in the console. For example:

0 commit comments

Comments
 (0)