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/cognitive-services/openai/reference.md
+32-32Lines changed: 32 additions & 32 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -39,7 +39,7 @@ The Azure OpenAI service provides two methods for authentication. you can use e
39
39
40
40
The service APIs are versioned using the ```api-version``` query parameter. All versions follow the YYYY-MM-DD date structure, with a -preview suffix for a preview service. For example:
41
41
42
-
```
42
+
```http
43
43
POST https://YOUR_RESOURCE_NAME.openai.azure.com/openai/deployments/YOUR_DEPLOYMENT_NAME/completions?api-version=2022-06-01-preview
44
44
```
45
45
@@ -50,7 +50,7 @@ With the Completions operation, the model will generate one or more predicted co
50
50
51
51
**Create a completion**
52
52
53
-
```
53
+
```http
54
54
POST https://{your-resource-name}.openai.azure.com/openai/deployments/{deployment-id}/completions?api-version={api-version}
55
55
```
56
56
@@ -120,7 +120,7 @@ Get a vector representation of a given input that can be easily consumed by mach
120
120
121
121
**Create an embedding**
122
122
123
-
```
123
+
```http
124
124
POST https://{your-resource-name}.openai.azure.com/openai/deployments/{deployment-id}/embeddings?api-version={api-version}
This API will return the list of all available models in your resource. This includes both 'base models' that are available by default and models you've created from fine-tuning jobs.
181
181
182
-
```
182
+
```http
183
183
GET https://{your-resource-name}.openai.azure.com/openai/models?api-version={api-version}
184
184
```
185
185
@@ -196,7 +196,7 @@ GET https://{your-resource-name}.openai.azure.com/openai/models?api-version={api
196
196
197
197
#### Example request
198
198
199
-
```
199
+
```console
200
200
curl -X GET https://example_resource_name.openai.azure.com/openai/models?api-version=2022-06-01-preview \
201
201
-H "api-key: YOUR_API_KEY"
202
202
```
@@ -241,7 +241,7 @@ curl -X GET https://example_resource_name.openai.azure.com/openai/models?api-ver
241
241
242
242
This API will retrieve information on a specific model
243
243
244
-
```
244
+
```http
245
245
GET https://{your-resource-name}.openai.azure.com/openai/models/{model_id}?api-version={api-version}
246
246
```
247
247
@@ -259,7 +259,7 @@ GET https://{your-resource-name}.openai.azure.com/openai/models/{model_id}?api-v
259
259
260
260
#### Example request
261
261
262
-
```
262
+
```console
263
263
curl -X GET https://example_resource_name.openai.azure.com/openai/models/ada?api-version=2022-06-01-preview \
264
264
-H "api-key: YOUR_API_KEY"
265
265
```
@@ -291,7 +291,7 @@ You can create customized versions of our models using the fine-tuning APIs. The
291
291
292
292
This API will list your resource's fine-tuning jobs
293
293
294
-
```
294
+
```http
295
295
GET https://{your-resource-name}.openai.azure.com/openai/fine-tunes?api-version={api-version}
296
296
```
297
297
@@ -403,7 +403,7 @@ curl -X GET https://your_resource_name.openai.azure.com/openai/fine-tunes?api-ve
403
403
404
404
This API will create a new job to fine-tune a specified model with the specified dataset.
405
405
406
-
```
406
+
```http
407
407
POST https://{your-resource-name}.openai.azure.com/openai/fine-tunes?api-version={api-version}
This API will retrieve the events associated with the specified fine tuning job. To stream events as they become available, use the query parameter “stream” and pass true value (&stream=true)
636
636
637
637
638
-
```
638
+
```http
639
639
GET https://{your-resource-name}.openai.azure.com/openai/fine-tunes/{fine_tune_id}/events?api-version={api-version}
640
640
```
641
641
@@ -653,7 +653,7 @@ GET https://{your-resource-name}.openai.azure.com/openai/fine-tunes/{fine_tune_i
653
653
-`2022-06-01-preview`
654
654
655
655
#### Example request
656
-
```
656
+
```console
657
657
curl -X GET https://your_resource_name.openai.azure.com/openai/fine-tunes/ft-d3f2a65d49d34e74a80f6328ba6d8d08/events?stream=true&api-version=2022-06-01-preview \
658
658
-H "api-key: YOUR_API_KEY"
659
659
```
@@ -696,7 +696,7 @@ curl -X GET https://your_resource_name.openai.azure.com/openai/fine-tunes/ft-d3f
696
696
697
697
This API will cancel the specified job
698
698
699
-
```
699
+
```http
700
700
POST https://{your-resource-name}.openai.azure.com/openai/fine-tunes/{fine_tune_id}/cancel?api-version={api-version}
701
701
```
702
702
@@ -712,7 +712,7 @@ POST https://{your-resource-name}.openai.azure.com/openai/fine-tunes/{fine_tune_
712
712
-`2022-06-01-preview`
713
713
714
714
#### Example request
715
-
```
715
+
```console
716
716
curl -X POST https://your_resource_name.openai.azure.com/openai/fine-tunes/ft-d3f2a65d49d34e74a80f6328ba6d8d08/cancel?api-version=2022-06-01-preview \
717
717
-H "api-key: YOUR_API_KEY"
718
718
```
@@ -768,7 +768,7 @@ curl -X POST https://your_resource_name.openai.azure.com/openai/fine-tunes/ft-d3
768
768
769
769
This API will list all the Files that have been uploaded to the resource
770
770
771
-
```
771
+
```http
772
772
GET https://{your-resource-name}.openai.azure.com/openai/files?api-version={api-version}
773
773
```
774
774
@@ -785,7 +785,7 @@ GET https://{your-resource-name}.openai.azure.com/openai/files?api-version={api-
785
785
786
786
#### Example request
787
787
788
-
```
788
+
```console
789
789
curl -X GET https://example_resource_name.openai.azure.com/openai/files?api-version=2022-06-01-preview \
790
790
-H "api-key: YOUR_API_KEY"
791
791
```
@@ -825,7 +825,7 @@ curl -X GET https://example_resource_name.openai.azure.com/openai/files?api-vers
825
825
826
826
This API will upload a file that contains the examples used for fine-tuning a model.
827
827
828
-
```
828
+
```http
829
829
GET https://{your-resource-name}.openai.azure.com/openai/files?api-version={api-version}
830
830
```
831
831
@@ -859,7 +859,7 @@ curl -X POST https://example_resource_name.openai.azure.com/openai/files?api-ver
859
859
860
860
#### Example response
861
861
862
-
```JSON
862
+
```json
863
863
{
864
864
"bytes": 405898,
865
865
"purpose": "fine-tune",
@@ -876,7 +876,7 @@ curl -X POST https://example_resource_name.openai.azure.com/openai/files?api-ver
876
876
877
877
This API will return information on the specified file
878
878
879
-
```
879
+
```http
880
880
GET https://{your-resource-name}.openai.azure.com/openai/files/{file_id}?api-version={api-version}
881
881
```
882
882
@@ -918,7 +918,7 @@ curl -X GET https://example_resource_name.openai.azure.com/openai/files/file-6ca
GET https://{your-resource-name}.openai.azure.com/openai/files/{file_id}/content?api-version={api-version}
949
949
```
950
950
@@ -961,7 +961,7 @@ GET https://{your-resource-name}.openai.azure.com/openai/files/{file_id}/content
961
961
-`2022-06-01-preview`
962
962
963
963
#### Example request
964
-
```
964
+
```console
965
965
curl -X GET https://example_resource_name.openai.azure.com/openai/files/file-6ca9bd640c8e4eaa9ec922604226ab6c/content?api-version=2022-06-01-preview \
966
966
-H "api-key: YOUR_API_KEY"
967
967
```
@@ -970,7 +970,7 @@ curl -X GET https://example_resource_name.openai.azure.com/openai/files/file-6ca
970
970
971
971
Import files from blob storage or other web locations. We recommend you use this option for importing large files. Large files can become unstable when uploaded through multipart forms because the requests are atomic and can't be retried or resumed.
972
972
973
-
```
973
+
```http
974
974
POST https://{your-resource-name}.openai.azure.com/openai/files/import?api-version={api-version}
975
975
```
976
976
@@ -1008,7 +1008,7 @@ curl -X POST https://example_resource_name.openai.azure.com/openai/files/files/i
1008
1008
1009
1009
### Example response
1010
1010
1011
-
```JSON
1011
+
```json
1012
1012
{
1013
1013
"purpose": "fine-tune",
1014
1014
"filename": "validationfiletest.jsonl",
@@ -1026,8 +1026,8 @@ curl -X POST https://example_resource_name.openai.azure.com/openai/files/files/i
1026
1026
1027
1027
This API will return a list of all the deployments in the resource.
1028
1028
1029
-
```
1030
-
POST https://{your-resource-name}.openai.azure.com/openai/deployments?api-version={api-version}
1029
+
```http
1030
+
GET https://{your-resource-name}.openai.azure.com/openai/deployments?api-version={api-version}
1031
1031
```
1032
1032
1033
1033
**Path parameters**
@@ -1077,7 +1077,7 @@ curl -X GET https://example_resource_name.openai.azure.com/openai/deployments?ap
1077
1077
1078
1078
This API will create a new deployment in the resource. This will enable you to make completions and embeddings calls with the model.
1079
1079
1080
-
```
1080
+
```http
1081
1081
POST https://{your-resource-name}.openai.azure.com/openai/deployments?api-version={api-version}
1082
1082
```
1083
1083
@@ -1135,7 +1135,7 @@ curl -X POST https://example_resource_name.openai.azure.com/openai/deployments?a
1135
1135
1136
1136
This API will retrieve information about the specified deployment
1137
1137
1138
-
```
1138
+
```http
1139
1139
GET https://{your-resource-name}.openai.azure.com/openai/deployments/{deployment_id}?api-version={api-version}
1140
1140
```
1141
1141
@@ -1178,7 +1178,7 @@ curl -X GET https://example_resource_name.openai.azure.com/openai/deployments/{d
1178
1178
1179
1179
This API will update an existing deployment. Make sure to set the content-type to `application/merge-patch+json`
0 commit comments