swagger: '2.0'
info:
title: Microsoft Azure Azure OpenAI API version 2023-10-01-preview
description: APIs for fine-tuning and managing deployments of OpenAI models.
version: 2023-10-01-preview
paths:
/files:
get:
tags:
- 'Files:'
summary: "Microsoft Azure Gets A List Of All Files Owned By The Azure Openai Resource \r\nthese Include User Uploaded Content Like Files With Purpose \"fine Tune\" For Training Or Validation Of Fine Tunes Models\r\nas Well As Files That Are Generated By The Service Such As \"fine Tune Results\" Which Contains Various Metrics For The Corresponding Fine Tune Job"
operationId: microsoftAzureFilesList
produces:
- application/json
parameters:
- $ref: '#/parameters/apiVersionQueryParameter'
responses:
'200':
description: Success
schema:
$ref: '#/definitions/FileList'
default:
description: An error occurred.
schema:
$ref: '#/definitions/ErrorResponse'
x-ms-examples:
Getting all files owned by this account.:
$ref: ./examples/get_files.json
description: Needs a more full description created.
post:
tags:
- 'Files:'
summary: >-
Microsoft Azure Creates A New File Entity By Uploading Data From A Local Machine Uploaded Files Can, For Example, Be Used For Training Or Evaluating Fine Tuned Models
operationId: microsoftAzureFilesUpload
consumes:
- multipart/form-data
produces:
- application/json
parameters:
- $ref: '#/parameters/apiVersionQueryParameter'
- in: formData
name: purpose
description: >-
The intended purpose of the uploaded documents. Use "fine-tune" for
fine-tuning. This allows us to validate the format of the uploaded
file.
required: true
type: string
enum:
- fine-tune
- fine-tune-results
x-ms-enum:
name: Purpose
modelAsString: true
values:
- value: fine-tune
description: This file contains training data for a fine tune job.
- value: fine-tune-results
description: This file contains the results of a fine tune job.
- in: formData
name: file
description: Gets or sets the file to upload into Azure OpenAI.
required: true
type: file
responses:
'201':
description: The file has been successfully created.
schema:
$ref: '#/definitions/File'
headers:
Location:
description: The location of the newly created item.
type: string
format: url
default:
description: An error occurred.
schema:
$ref: '#/definitions/ErrorResponse'
x-ms-examples:
Upload a file.:
$ref: ./examples/upload_file.json
description: Needs a more full description created.
/files/{file-id}:
get:
tags:
- 'Files:'
summary: >-
Microsoft Azure Gets Details For A Single File Specified By The Given File Id Including Status, Size, Purpose, Etc
operationId: microsoftAzureFilesGet
produces:
- application/json
parameters:
- in: path
name: file-id
description: The identifier of the file.
required: true
type: string
- $ref: '#/parameters/apiVersionQueryParameter'
responses:
'200':
description: Success
schema:
$ref: '#/definitions/File'
default:
description: An error occurred.
schema:
$ref: '#/definitions/ErrorResponse'
x-ms-examples:
Getting a file.:
$ref: ./examples/get_file.json
description: Needs a more full description created.
delete:
tags:
- 'Files:'
summary: "Microsoft Azure Deletes The File With The Given File Id \r\ndeletion Is Also Allowed If A File Was Used, E G , As Training File In A Fine Tune Job"
operationId: microsoftAzureFilesDelete
produces:
- application/json
parameters:
- in: path
name: file-id
description: The identifier of the file.
required: true
type: string
- $ref: '#/parameters/apiVersionQueryParameter'
responses:
'204':
description: The file was successfully deleted.
default:
description: An error occurred.
schema:
$ref: '#/definitions/ErrorResponse'
x-ms-examples:
Deleting a file.:
$ref: ./examples/delete_file.json
description: Needs a more full description created.
/files/{file-id}/content:
get:
tags:
- 'Files:'
summary: "Microsoft Azure Gets The Content Of The File Specified By The Given File Id \r\nfiles Can Be User Uploaded Content Or Generated By The Service Like Result Metrics Of A Fine Tune Job"
operationId: microsoftAzureFilesGetcontent
produces:
- application/octet-stream
- application/json
parameters:
- in: path
name: file-id
description: The identifier of the file.
required: true
type: string
- $ref: '#/parameters/apiVersionQueryParameter'
responses:
'200':
description: Success
schema:
type: file
default:
description: An error occurred.
schema:
$ref: '#/definitions/ErrorResponse'
x-ms-examples:
Getting the file content.:
$ref: ./examples/get_file_content.json
description: Needs a more full description created.
/files/import:
post:
tags:
- 'Files:'
summary: >-
Microsoft Azure Creates A New File Entity By Importing Data From A Provided Url Uploaded Files Can, For Example, Be Used For Training Or Evaluating Fine Tuned Models
operationId: microsoftAzureFilesImport
consumes:
- application/json
produces:
- application/json
parameters:
- $ref: '#/parameters/apiVersionQueryParameter'
- in: body
name: fileImport
description: >-
The definition of the file to create including its purpose, the file
name and the url of the file location.
required: true
schema:
$ref: '#/definitions/FileImport'
responses:
'201':
description: The file has been successfully created.
schema:
$ref: '#/definitions/File'
headers:
Location:
description: The location of the newly created item.
type: string
format: url
default:
description: An error occurred.
schema:
$ref: '#/definitions/ErrorResponse'
x-ms-examples:
Importing a file with a blob url as source.:
$ref: ./examples/import_file.json
description: Needs a more full description created.
/fine-tunes:
get:
tags:
- 'Fine-Tunes:'
summary: "Microsoft Azure Gets A List Of All Fine Tune Jobs Owned By The Azure Openai Resource \r\nthe Details That Are Returned For Each Fine Tune Job Contain Besides Its Identifier\r\nthe Base Model, Training And Validation Files, Hyper Parameters, Time Stamps, Status And Events \r\nevents Are Created When The Job Status Changes, E G Running Or Complete, And When Results Are Uploaded"
operationId: microsoftAzureFinetunesList
produces:
- application/json
parameters:
- $ref: '#/parameters/apiVersionQueryParameter'
responses:
'200':
description: Success
schema:
$ref: '#/definitions/FineTuneList'
default:
description: An error occurred.
schema:
$ref: '#/definitions/ErrorResponse'
x-ms-examples:
Getting all fine tune jobs owned by this account.:
$ref: ./examples/get_finetunes.json
description: Needs a more full description created.
post:
tags:
- 'Fine-Tunes:'
summary: "Microsoft Azure Creates A Job That Fine Tunes A Specified Model From A Given Training File \r\nresponse Includes Details Of The Enqueued Job Including Job Status And Hyper Parameters \r\nthe Name Of The Fine Tuned Model Is Added To The Response Once Complete"
operationId: microsoftAzureFinetunesCreate
consumes:
- application/json
produces:
- application/json
parameters:
- $ref: '#/parameters/apiVersionQueryParameter'
- in: body
name: fineTune
description: "The specification of the fine-tuned model to create.\r\nRequired parameters are the base model and the training file to use.\r\nOptionally a validation file can be specified to compute validation metrics during training.\r\nHyper parameters will be set to default values or can by optionally specified.\r\nThese include batch size, learning rate multiplier, number of epochs and others."
required: true
schema:
$ref: '#/definitions/FineTuneCreation'
responses:
'201':
description: The fine tune has been successfully created.
schema:
$ref: '#/definitions/FineTune'
headers:
Location:
description: The location of the newly created item.
type: string
format: url
default:
description: An error occurred.
schema:
$ref: '#/definitions/ErrorResponse'
x-ms-examples:
Creating a fine tune job.:
$ref: ./examples/post_finetune.json
Creating a fine tune job for classification.:
$ref: ./examples/post_classification_finetune.json
description: Needs a more full description created.
/fine-tunes/{fine-tune-id}:
get:
tags:
- 'Fine-Tunes:'
summary: "Microsoft Azure Gets Details For A Single Fine Tune Job Specified By The Given Fine Tune Id \r\nthe Details Contain The Base Model, Training And Validation Files, Hyper Parameters, Time Stamps, Status And Events \r\nevents Are Created When The Job Status Changes, E G Running Or Complete, And When Results Are Uploaded"
operationId: microsoftAzureFinetunesGet
produces:
- application/json
parameters:
- in: path
name: fine-tune-id
description: The identifier of the fine-tune job.
required: true
type: string
- $ref: '#/parameters/apiVersionQueryParameter'
responses:
'200':
description: Success
schema:
$ref: '#/definitions/FineTune'
default:
description: An error occurred.
schema:
$ref: '#/definitions/ErrorResponse'
x-ms-examples:
Getting a fine tune job.:
$ref: ./examples/get_finetune.json
description: Needs a more full description created.
delete:
tags:
- 'Fine-Tunes:'
summary: 'Microsoft Azure Deletes The Fine Tune Job Specified By The Given Fine Tune Id'
operationId: microsoftAzureFinetunesDelete
produces:
- application/json
parameters:
- in: path
name: fine-tune-id
description: The identifier of the fine-tune job.
required: true
type: string
- $ref: '#/parameters/apiVersionQueryParameter'
responses:
'204':
description: The fine tune was successfully deleted.
default:
description: An error occurred.
schema:
$ref: '#/definitions/ErrorResponse'
x-ms-examples:
Deleting a fine tune job.:
$ref: ./examples/delete_finetune.json
description: Needs a more full description created.
/fine-tunes/{fine-tune-id}/events:
get:
tags:
- 'Fine-Tunes:'
summary: "Microsoft Azure Gets The Events For The Fine Tune Job Specified By The Given Fine Tune Id \r\nevents Are Created When The Job Status Changes, E G Running Or Complete, And When Results Are Uploaded"
operationId: microsoftAzureFinetunesGetevents
produces:
- application/json
- text/event-stream
parameters:
- in: path
name: fine-tune-id
description: The identifier of the fine-tune job.
required: true
type: string
- in: query
name: stream
description: "A flag indicating whether to stream events for the fine-tune job. If set to true,\r\n events will be sent as data-only server-sent events as they become available. The stream will terminate with\r\n a data: [DONE] message when the job is finished (succeeded, cancelled, or failed).\r\n If set to false, only events generated so far will be returned.."
type: boolean
- $ref: '#/parameters/apiVersionQueryParameter'
responses:
'200':
description: Success
schema:
$ref: '#/definitions/EventList'
default:
description: An error occurred.
schema:
$ref: '#/definitions/ErrorResponse'
x-ms-examples:
Getting events of a fine tune job.:
$ref: ./examples/get_finetune_events.json
description: Needs a more full description created.
/fine-tunes/{fine-tune-id}/cancel:
post:
tags:
- 'Fine-Tunes:'
summary: >-
Microsoft Azure Cancels The Processing Of The Fine Tune Job Specified By The Given Fine Tune Id
operationId: microsoftAzureFinetunesCancel
produces:
- application/json
parameters:
- in: path
name: fine-tune-id
description: The identifier of the fine-tune job.
required: true
type: string
- $ref: '#/parameters/apiVersionQueryParameter'
responses:
'200':
description: The fine tune has been successfully canceled
schema:
$ref: '#/definitions/FineTune'
default:
description: An error occurred.
schema:
$ref: '#/definitions/ErrorResponse'
x-ms-examples:
Canceling a fine tune job.:
$ref: ./examples/cancel_finetune.json
description: Needs a more full description created.
/fine_tuning/jobs:
get:
tags:
- 'Fine-Tuning:'
summary: "Microsoft Azure Gets A List Of All Fine Tune Jobs Owned By The Azure Openai Resource \r\nthe Details That Are Returned For Each Fine Tune Job Contain Besides Its Identifier\r\nthe Base Model, Training And Validation Files, Hyper Parameters, Time Stamps, Status And Events \r\nevents Are Created When The Job Status Changes, E G Running Or Complete, And When Results Are Uploaded"
operationId: microsoftAzureFinetuningList
produces:
- application/json
parameters:
- in: query
name: after
description: Identifier for the last event from the previous pagination request.
type: string
- in: query
name: limit
description: Number of events to retrieve. Defaults to 20.
type: integer
format: int32
default: 20
- $ref: '#/parameters/apiVersionQueryParameter'
responses:
'200':
description: Success
schema:
$ref: '#/definitions/FineTuningJobList'
default:
description: An error occurred.
schema:
$ref: '#/definitions/ErrorResponse'
x-ms-examples:
Getting all fine tune jobs owned by this account.:
$ref: ./examples/get_finetuning_jobs.json
description: Needs a more full description created.
post:
tags:
- 'Fine-Tuning:'
summary: "Microsoft Azure Creates A Job That Fine Tunes A Specified Model From A Given Training File \r\nresponse Includes Details Of The Enqueued Job Including Job Status And Hyper Parameters \r\nthe Name Of The Fine Tuned Model Is Added To The Response Once Complete"
operationId: microsoftAzureFinetuningCreate
consumes:
- application/json
produces:
- application/json
parameters:
- $ref: '#/parameters/apiVersionQueryParameter'
- in: body
name: fineTuningJob
description: "The specification of the fine-tuned model to create.\r\nRequired parameters are the base model and the training file to use.\r\nOptionally a validation file can be specified to compute validation metrics during training.\r\nHyper parameters will be set to default values or can by optionally specified.\r\nThese include batch size, learning rate multiplier, number of epochs and others."
required: true
schema:
$ref: '#/definitions/FineTuningJobCreation'
responses:
'201':
description: The fine tune has been successfully created.
schema:
$ref: '#/definitions/FineTuningJob'
headers:
Location:
description: The location of the newly created item.
type: string
format: url
default:
description: An error occurred.
schema:
$ref: '#/definitions/ErrorResponse'
x-ms-examples:
Creating a fine tune job.:
$ref: ./examples/post_finetuning_job.json
description: Needs a more full description created.
/fine_tuning/jobs/{fine-tuning-job-id}:
get:
tags:
- 'Fine-Tuning:'
summary: "Microsoft Azure Gets Details For A Single Fine Tune Job Specified By The Given Fine Tune Id \r\nthe Details Contain The Base Model, Training And Validation Files, Hyper Parameters, Time Stamps, Status And Events \r\nevents Are Created When The Job Status Changes, E G Running Or Complete, And When Results Are Uploaded"
operationId: microsoftAzureFinetuningGet
produces:
- application/json
parameters:
- in: path
name: fine-tuning-job-id
description: The identifier of the fine-tune job.
required: true
type: string
- $ref: '#/parameters/apiVersionQueryParameter'
responses:
'200':
description: Success
schema:
$ref: '#/definitions/FineTuningJob'
default:
description: An error occurred.
schema:
$ref: '#/definitions/ErrorResponse'
x-ms-examples:
Getting a fine tune job.:
$ref: ./examples/get_finetuning_job.json
description: Needs a more full description created.
delete:
tags:
- 'Fine-Tuning:'
summary: 'Microsoft Azure Deletes The Fine Tune Job Specified By The Given Fine Tune Id'
operationId: microsoftAzureFinetuningDelete
produces:
- application/json
parameters:
- in: path
name: fine-tuning-job-id
description: The identifier of the fine-tune job.
required: true
type: string
- $ref: '#/parameters/apiVersionQueryParameter'
responses:
'204':
description: The fine tune was successfully deleted.
default:
description: An error occurred.
schema:
$ref: '#/definitions/ErrorResponse'
x-ms-examples:
Deleting a fine tune job.:
$ref: ./examples/delete_finetuning_job.json
description: Needs a more full description created.
/fine_tuning/jobs/{fine-tuning-job-id}/events:
get:
tags:
- 'Fine-Tuning:'
summary: "Microsoft Azure Gets The Events For The Fine Tune Job Specified By The Given Fine Tune Id \r\nevents Are Created When The Job Status Changes, E G Running Or Complete, And When Results Are Uploaded"
operationId: microsoftAzureFinetuningGetevents
produces:
- application/json
parameters:
- in: path
name: fine-tuning-job-id
description: The identifier of the fine-tune job.
required: true
type: string
- in: query
name: after
description: Identifier for the last event from the previous pagination request.
type: string
- in: query
name: limit
description: Number of events to retrieve. Defaults to 20.
type: integer
format: int32
default: 20
- $ref: '#/parameters/apiVersionQueryParameter'
responses:
'200':
description: Success
schema:
$ref: '#/definitions/FineTuningJobEventList'
default:
description: An error occurred.
schema:
$ref: '#/definitions/ErrorResponse'
x-ms-examples:
Getting events of a fine tune job.:
$ref: ./examples/get_finetuning_job_events.json
description: Needs a more full description created.
/fine_tuning/jobs/{fine-tuning-job-id}/cancel:
post:
tags:
- 'Fine-Tuning:'
summary: >-
Microsoft Azure Cancels The Processing Of The Fine Tune Job Specified By The Given Fine Tune Id
operationId: microsoftAzureFinetuningCancel
produces:
- application/json
parameters:
- in: path
name: fine-tuning-job-id
description: The identifier of the fine-tune job.
required: true
type: string
- $ref: '#/parameters/apiVersionQueryParameter'
responses:
'200':
description: The fine tune has been successfully canceled
schema:
$ref: '#/definitions/FineTuningJob'
default:
description: An error occurred.
schema:
$ref: '#/definitions/ErrorResponse'
x-ms-examples:
Canceling a fine tune job.:
$ref: ./examples/cancel_finetuning_job.json
description: Needs a more full description created.
/models:
get:
tags:
- 'Models:'
summary: "Microsoft Azure Gets A List Of All Models That Are Accessible By The Azure Openai Resource \r\nthese Include Base Models As Well As All Successfully Completed Fine Tuned Models Owned By The Azure Openai Resource"
operationId: microsoftAzureModelsList
produces:
- application/json
parameters:
- $ref: '#/parameters/apiVersionQueryParameter'
responses:
'200':
description: Success
schema:
$ref: '#/definitions/ModelList'
default:
description: An error occurred.
schema:
$ref: '#/definitions/ErrorResponse'
x-ms-examples:
Getting all models owned by account.:
$ref: ./examples/get_models.json
description: Needs a more full description created.
/models/{model-id}:
get:
tags:
- 'Models:'
summary: 'Microsoft Azure Gets Details For The Model Specified By The Given Modelid'
operationId: microsoftAzureModelsGet
produces:
- application/json
parameters:
- in: path
name: model-id
description: The identifier of the model.
required: true
type: string
- $ref: '#/parameters/apiVersionQueryParameter'
responses:
'200':
description: Success
schema:
$ref: '#/definitions/Model'
default:
description: An error occurred.
schema:
$ref: '#/definitions/ErrorResponse'
x-ms-examples:
Getting a base model.:
$ref: ./examples/get_model_base.json
Getting a fine-tuned model.:
$ref: ./examples/get_model_finetune.json
description: Needs a more full description created.
/images/generations:submit:
post:
summary: Microsoft Azure Generates A Batch Of Images From A Text Caption
operationId: microsoftAzureImagesGenerate
tags:
- 'Images:'
consumes:
- application/json
produces:
- application/json
parameters:
- $ref: '#/parameters/apiVersionQueryParameter'
- in: header
name: Operation-Id
description: >-
ID of the status monitor for the operation. If the Operation-Id
header matches an existing operation and the request is not
identical to the prior request, it will fail with a 400 Bad Request.
type: string
format: uuid
- in: body
name: body
description: The specification of the images that should be generated.
required: true
schema:
$ref: '#/definitions/GenerateImagesCreation'
responses:
'202':
description: Accepted
headers:
operation-location:
type: string
format: url
description: URL to poll for the operation result.
x-ms-request-id:
type: string
format: uuid
description: >-
Service generated correlation id identifying the request, in the
form of a GUID.
schema:
$ref: '#/definitions/GenerateImagesResponse'
default:
description: An error occurred.
headers:
x-ms-error-code:
type: string
description: The error code indicating what went wrong.
x-ms-request-id:
type: string
format: uuid
description: >-
Service generated correlation id identifying the request, in the
form of a GUID.
schema:
$ref: '#/definitions/ErrorResponse'
x-ms-long-running-operation: true
x-ms-examples:
Creating an image generation operation.:
$ref: ./examples/post_images_generate.json
description: Needs a more full description created.
/operations/images/{operation-id}:
get:
summary: Microsoft Azure Returns The Status Of The Images Operation
operationId: microsoftAzureOperationsimagesGet
tags:
- 'Images:'
produces:
- application/json
parameters:
- $ref: '#/parameters/apiVersionQueryParameter'
- in: path
name: operation-id
required: true
type: string
format: uuid
description: The id of the operation
responses:
'200':
description: OK
headers:
retry-after:
type: integer
format: int32
description: >-
Indicates the number of seconds that the client should wait
before executing another GET request if the operation did not
terminate yet.
x-ms-request-id:
type: string
format: uuid
description: >-
Service generated correlation id identifying the request, in the
form of a GUID.
schema:
$ref: '#/definitions/OperationResponse'
default:
description: An error occurred.
headers:
x-ms-error-code:
type: string
description: The error code indicating what went wrong.
x-ms-request-id:
type: string
format: uuid
description: >-
Service generated correlation id identifying the request, in the
form of a GUID.
schema:
$ref: '#/definitions/ErrorResponse'
x-ms-examples:
Getting the result of a specific operation.:
$ref: ./examples/get_images_operation.json
description: Needs a more full description created.
delete:
summary: >-
Microsoft Azure Deletes An Operation If In Terminal State And All Generated And User Provided Images Associated With The Operation
operationId: microsoftAzureOperationsimagesDelete
tags:
- 'Images:'
parameters:
- $ref: '#/parameters/apiVersionQueryParameter'
- in: path
name: operation-id
required: true
type: string
format: uuid
description: The id of the operation
responses:
'204':
description: NoContent
headers:
x-ms-request-id:
type: string
format: uuid
description: >-
Service generated correlation id identifying the request, in the
form of a GUID.
default:
description: An error occurred.
headers:
x-ms-error-code:
type: string
description: The error code indicating what went wrong.
x-ms-request-id:
type: string
format: uuid
description: >-
Service generated correlation id identifying the request, in the
form of a GUID.
schema:
$ref: '#/definitions/ErrorResponse'
x-ms-examples:
Deleting a specific operation.:
$ref: ./examples/delete_images_operation.json
description: Needs a more full description created.
/extensions/on-your-data/ingestion-jobs/{jobId}:
put:
tags:
- 'Ingestion:'
summary: >-
Microsoft Azure Starts A Job For Ingesting Data Into An Azure Search Index To Be Used As A Data Source For Completions The Status Of The Ingestion Job Will Be Kept For 48 Hours After Its Completion And Will Be Deleted Afterwards
operationId: microsoftAzureIngestionjobsCreate
consumes:
- application/json
produces:
- application/json
parameters:
- $ref: '#/parameters/apiVersionQueryParameter'
- name: jobId
in: path
description: The id of the ingestion job.
required: true
type: string
- in: body
name: ingestionJob
description: The details of the ingestion job.
required: true
schema:
$ref: '#/definitions/IngestionJob'
- in: header
name: searchServiceEndpoint
description: >-
The endpoint to the search service resource where the ingestion
assets will be created.
type: string
required: true
- in: header
name: searchServiceAdminKey
description: >-
The admin key to the search service resource if Managed Identity is
not setup.
type: string
- in: header
name: storageConnectionString
description: >-
The connection string to the blob storage account hosting the data
that will be ingested.
type: string
required: true
- in: header
name: storageContainer
description: The name of the container hosting the data that will be ingested.
type: string
required: true
- in: header
name: embeddingEndpoint
description: >-
The endpoint of the embeddings model to be used for embeddings
calculations if enabled.
type: string
- in: header
name: embeddingKey
description: >-
The key to use for accessing the embeddings model if enabled and if
Managed Identity is not setup.
type: string
- in: header
name: storageEndpoint
description: >-
The blob storage endpoint hosting the data that will be ingested.
Required for ResourceId format of storageConnectionString.
type: string
- in: header
name: embeddingDeploymentName
description: >-
The name of embedding deployment of the current Azure OpenAI
resource to use for accessing the embeddings model.
type: string
responses:
'200':
description: Success
schema:
$ref: '#/definitions/IngestionJob'
default:
description: An error occurred.
schema:
$ref: '#/definitions/ErrorResponse'
x-ms-examples:
Starting an ingestion job.:
$ref: ./examples/put_ingestion_job.json
description: Needs a more full description created.
get:
tags:
- 'Ingestion:'
summary: 'Microsoft Azure Gets The Status Of An Ingestion Job By Its Id'
# --- truncated at 32 KB (75 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/microsoft-azure/refs/heads/main/openapi/azure-openai-api-version-2023-10-01-preview-openapi-original.yml