Skip to main content
This article provides details on the inference REST API endpoints for Azure OpenAI.

API specs

Managing and interacting with Azure OpenAI models and resources is divided across three primary API surfaces:
  • Control plane
  • Data plane - authoring
  • Data plane - inference
Each API surface/specification encapsulates a different set of Azure OpenAI capabilities. Each API has its own unique set of preview and stable/generally available (GA) API releases. Preview releases currently tend to follow a monthly cadence.
There is now a new preview inference API. Learn more in our API lifecycle guide.
APILatest preview releaseLatest GA releaseSpecificationsDescription
Control plane2025-07-01-preview2025-06-01Spec filesThe control plane API is used for operations like creating resources, model deployment, and other higher level resource management tasks. The control plane also governs what is possible to do with capabilities like Azure Resource Manager, Bicep, Terraform, and Azure CLI.
Data planev1 previewv1Spec filesThe data plane API controls inference and authoring operations.

Authentication

Azure OpenAI provides two methods for authentication. You can use either API Keys or Microsoft Entra ID.
  • API Key authentication: For this type of authentication, all API requests must include the API Key in the api-key HTTP header. The Quickstart provides guidance for how to make calls with this type of authentication.
  • Microsoft Entra ID authentication: You can authenticate an API call using a Microsoft Entra token. Authentication tokens are included in a request as the Authorization header. The token provided must be preceded by Bearer, for example Bearer YOUR_AUTH_TOKEN. You can read our how-to guide on authenticating with Microsoft Entra ID.

REST API versioning

The service APIs are versioned using the api-version query parameter. All versions follow the YYYY-MM-DD date structure. For example:
POST https://YOUR_RESOURCE_NAME.openai.azure.com/openai/deployments/YOUR_DEPLOYMENT_NAME/chat/completions?api-version=2024-06-01

Data plane authoring

The rest of the article covers the preview release of the Azure OpenAI data plane inference specification, 2025-04-01-preview. If you’re looking for documentation on the latest GA API release, refer to the latest GA data plane inference API.

Batch - List

GET {endpoint}/openai/batches?api-version=2025-04-01-preview
Gets a list of all batches owned by the Azure OpenAI resource.

URI Parameters

NameInRequiredTypeDescription
endpointpathYesstring
url
Supported Azure OpenAI endpoints (protocol and hostname, for example: https://aoairesource.openai.azure.com. Replace “aoairesource” with your Azure OpenAI resource name). https://{your-resource-name}.openai.azure.com
afterqueryNostringIdentifier for the last event from the previous pagination request.
limitqueryNointegerNumber of batches to retrieve. Defaults to 20.
$filterqueryNostringThe OData expression to describe the filtering conditions.
$orderbyqueryNostringThe OData expression to describe the sorting order.
api-versionqueryYesstringThe requested API version.

Request Header

Use either token based authentication or API key. Authenticating with token based authentication is recommended and more secure.
NameRequiredTypeDescription
AuthorizationTruestringExample: Authorization: Bearer {Azure_OpenAI_Auth_Token}

To generate an auth token using Azure CLI: az account get-access-token --resource https://cognitiveservices.azure.com

Type: oauth2
Authorization Url: https://login.microsoftonline.com/common/oauth2/v2.0/authorize
scope: https://ai.azure.com/.default
api-keyTruestringProvide Azure OpenAI API key here

Responses

Status Code: 200 Description: Success
Content-TypeTypeDescription
application/jsonBatchesList
Status Code: default Description: An error occurred.
Content-TypeTypeDescription
application/jsonErrorResponse

Examples

GET {endpoint}/openai/batches?api-version=2025-04-01-preview

Responses: Status Code: 200
{
  "headers": {},
  "body": {
    "has_more": false,
    "data": [
      {
        "object": "batch",
        "id": "batch_72a2792ef7d24ba7b82c7fe4a37e379f",
        "endpoint": "/chat/completions",
        "errors": null,
        "input_file_id": "file-b4fa7277f3eb4722ac18b90f46102c3f",
        "completion_window": "24h",
        "status": "completed",
        "output_file_id": "file-f2ddaf43-b48b-46dd-b264-90da10c7a85b",
        "error_file_id": "file-c3b563b0-ebc7-47da-93e3-a2fa694aef0c",
        "created_at": 1646126127,
        "in_progress_at": 1646126130,
        "expires_at": 1646126170,
        "finalizing_at": 1646126134,
        "completed_at": 1646126136,
        "failed_at": null,
        "expired_at": null,
        "cancelling_at": null,
        "cancelled_at": null,
        "request_counts": {
          "total": 500,
          "completed": 400,
          "failed": 100
        },
        "first_id": "batch_abc123",
        "last_id": "batch_abc456",
        "metadata": {
          "batch_description": "Evaluation job"
        }
      }
    ],
    "object": "list"
  }
}

Batch - Create

POST {endpoint}/openai/batches?api-version=2025-04-01-preview
Creates and executes a batch from an uploaded file of requests. Response includes details of the enqueued job including job status. The ID of the result file is added to the response once complete.

URI Parameters

NameInRequiredTypeDescription
endpointpathYesstring
url
Supported Azure OpenAI endpoints (protocol and hostname, for example: https://aoairesource.openai.azure.com. Replace “aoairesource” with your Azure OpenAI resource name). https://{your-resource-name}.openai.azure.com
api-versionqueryYesstringThe requested API version.

Request Header

Use either token based authentication or API key. Authenticating with token based authentication is recommended and more secure.
NameRequiredTypeDescription
AuthorizationTruestringExample: Authorization: Bearer {Azure_OpenAI_Auth_Token}

To generate an auth token using Azure CLI: az account get-access-token --resource https://cognitiveservices.azure.com

Type: oauth2
Authorization Url: https://login.microsoftonline.com/common/oauth2/v2.0/authorize
scope: https://ai.azure.com/.default
api-keyTruestringProvide Azure OpenAI API key here

Request Body

Content-Type: application/json
NameTypeDescriptionRequiredDefault
completion_windowstringThe time frame within which the batch should be processed.Yes
endpointstringThe API endpoint used by the batch.Yes
input_blobstringThe url of an Azure Storage blob to use as input for the batch.No
input_file_idstringThe ID of the input file for the batch.No
metadataobjectA set of key-value pairs that can be attached to the batch. This can be useful for storing additional information about the batch in a structured format.No
output_expires_afterFileExpiresAfterDefines an expiration for the file.No
output_folderBatchOutputReferenceThe Azure Storage folder to store output.No

Responses

Status Code: 201 Description: The batch has been successfully created.
Content-TypeTypeDescription
application/jsonBatch
Status Code: default Description: An error occurred.
Content-TypeTypeDescription
application/jsonErrorResponse

Examples

POST {endpoint}/openai/batches?api-version=2025-04-01-preview

Responses: Status Code: 201
{
  "headers": {
    "deployment-enqueued-tokens": 1000,
    "deployment-maximum-enqueued-tokens": 5000
  },
  "body": {
    "object": "batch",
    "id": "batch_72a2792ef7d24ba7b82c7fe4a37e379f",
    "endpoint": "/chat/completions",
    "errors": null,
    "input_file_id": "file-b4fa7277f3eb4722ac18b90f46102c3f",
    "completion_window": "24h",
    "status": "validating",
    "output_file_id": null,
    "error_file_id": null,
    "created_at": 1646126127,
    "in_progress_at": null,
    "expires_at": null,
    "finalizing_at": null,
    "completed_at": null,
    "failed_at": null,
    "expired_at": null,
    "cancelling_at": null,
    "cancelled_at": null,
    "request_counts": {
      "total": 0,
      "completed": 0,
      "failed": 0
    },
    "metadata": {
      "batch_description": "Evaluation job"
    }
  }
}

Batch - Get

GET {endpoint}/openai/batches/{batch-id}?api-version=2025-04-01-preview
Gets details for a single batch specified by the given batch-id.

URI Parameters

NameInRequiredTypeDescription
endpointpathYesstring
url
Supported Azure OpenAI endpoints (protocol and hostname, for example: https://aoairesource.openai.azure.com. Replace “aoairesource” with your Azure OpenAI resource name). https://{your-resource-name}.openai.azure.com
batch-idpathYesstringThe identifier of the batch.
api-versionqueryYesstringThe requested API version.

Request Header

Use either token based authentication or API key. Authenticating with token based authentication is recommended and more secure.
NameRequiredTypeDescription
AuthorizationTruestringExample: Authorization: Bearer {Azure_OpenAI_Auth_Token}

To generate an auth token using Azure CLI: az account get-access-token --resource https://cognitiveservices.azure.com

Type: oauth2
Authorization Url: https://login.microsoftonline.com/common/oauth2/v2.0/authorize
scope: https://ai.azure.com/.default
api-keyTruestringProvide Azure OpenAI API key here

Responses

Status Code: 200 Description: Success
Content-TypeTypeDescription
application/jsonBatch
Status Code: default Description: An error occurred.
Content-TypeTypeDescription
application/jsonErrorResponse

Examples

GET {endpoint}/openai/batches/{batch-id}?api-version=2025-04-01-preview

Responses: Status Code: 200
{
  "headers": {},
  "body": {
    "object": "batch",
    "id": "batch_72a2792ef7d24ba7b82c7fe4a37e379f",
    "endpoint": "/chat/completions",
    "errors": null,
    "input_file_id": "file-b4fa7277f3eb4722ac18b90f46102c3f",
    "completion_window": "24h",
    "status": "completed",
    "output_file_id": "file-f2ddaf43-b48b-46dd-b264-90da10c7a85b",
    "error_file_id": "file-c3b563b0-ebc7-47da-93e3-a2fa694aef0c",
    "created_at": 1646126127,
    "in_progress_at": 1646126130,
    "expires_at": 1646126170,
    "finalizing_at": 1646126134,
    "completed_at": 1646126136,
    "failed_at": null,
    "expired_at": null,
    "cancelling_at": null,
    "cancelled_at": null,
    "request_counts": {
      "total": 500,
      "completed": 400,
      "failed": 100
    },
    "metadata": {
      "batch_description": "Evaluation job"
    }
  }
}

Batch - Cancel

POST {endpoint}/openai/batches/{batch-id}/cancel?api-version=2025-04-01-preview
Cancels the processing of the batch specified by the given batch-id.

URI Parameters

NameInRequiredTypeDescription
endpointpathYesstring
url
Supported Azure OpenAI endpoints (protocol and hostname, for example: https://aoairesource.openai.azure.com. Replace “aoairesource” with your Azure OpenAI resource name). https://{your-resource-name}.openai.azure.com
batch-idpathYesstringThe identifier of the batch.
api-versionqueryYesstringThe requested API version.

Request Header

Use either token based authentication or API key. Authenticating with token based authentication is recommended and more secure.
NameRequiredTypeDescription
AuthorizationTruestringExample: Authorization: Bearer {Azure_OpenAI_Auth_Token}

To generate an auth token using Azure CLI: az account get-access-token --resource https://cognitiveservices.azure.com

Type: oauth2
Authorization Url: https://login.microsoftonline.com/common/oauth2/v2.0/authorize
scope: https://ai.azure.com/.default
api-keyTruestringProvide Azure OpenAI API key here

Responses

Status Code: 200 Description: The batch has been successfully canceled.
Content-TypeTypeDescription
application/jsonBatch
Status Code: default Description: An error occurred.
Content-TypeTypeDescription
application/jsonErrorResponse

Examples

POST {endpoint}/openai/batches/{batch-id}/cancel?api-version=2025-04-01-preview

Responses: Status Code: 200
{
  "headers": {},
  "body": {
    "object": "batch",
    "id": "batch_72a2792ef7d24ba7b82c7fe4a37e379f",
    "endpoint": "/chat/completions",
    "errors": null,
    "input_file_id": "file-b4fa7277f3eb4722ac18b90f46102c3f",
    "completion_window": "24h",
    "status": "cancelling",
    "output_file_id": null,
    "error_file_id": null,
    "created_at": 1646126127,
    "in_progress_at": 1646126130,
    "expires_at": 1646126170,
    "finalizing_at": null,
    "completed_at": null,
    "failed_at": null,
    "expired_at": null,
    "cancelling_at": 1646126138,
    "cancelled_at": null,
    "request_counts": {
      "total": 500,
      "completed": 100,
      "failed": 5
    },
    "metadata": {
      "batch_description": "Evaluation job"
    }
  }
}

Stored completion - List

GET {endpoint}/openai/chat/completions?api-version=2025-04-01-preview
Gets list of stored completions.

URI Parameters

NameInRequiredTypeDescription
endpointpathYesstring
url
Supported Azure OpenAI endpoints (protocol and hostname, for example: https://aoairesource.openai.azure.com. Replace “aoairesource” with your Azure OpenAI resource name). https://{your-resource-name}.openai.azure.com
metadataqueryNostringFilter by the (key, value) pair in stored completion.
modelqueryNostringFilter by model name.
afterqueryNostringIdentifier for the last stored completion from the previous pagination request.
limitqueryNointegerNumber of stored completions to retrieve. Defaults to 20.
orderqueryNostringOrder of the results by created time (ascending or descending). Default to desc.
api-versionqueryYesstringThe requested API version.

Request Header

Use either token based authentication or API key. Authenticating with token based authentication is recommended and more secure.
NameRequiredTypeDescription
AuthorizationTruestringExample: Authorization: Bearer {Azure_OpenAI_Auth_Token}

To generate an auth token using Azure CLI: az account get-access-token --resource https://cognitiveservices.azure.com

Type: oauth2
Authorization Url: https://login.microsoftonline.com/common/oauth2/v2.0/authorize
scope: https://ai.azure.com/.default
api-keyTruestringProvide Azure OpenAI API key here

Responses

Status Code: 200 Description: Success
Content-TypeTypeDescription
application/jsonStoredCompletionList
Status Code: default Description: An error occurred.
Content-TypeTypeDescription
application/jsonErrorResponse

Examples

GET {endpoint}/openai/chat/completions?api-version=2025-04-01-preview

Responses: Status Code: 200
{
  "headers": {},
  "body": {
    "object": "list",
    "data": [
      {
        "id": "chatcmpl-AvBCKqg2xqxVHCCEnUB4Bgj1Bjl7Y",
        "model": "gpt-4o-mini-2024-07-18",
        "created": 1738193475,
        "request_id": "e539c139-a97d-4ee1-bde9-3be3d5c6edb5",
        "usage": {
          "total_tokens": 25,
          "completion_tokens": 7,
          "prompt_tokens": 18
        },
        "seed": 123,
        "top_p": 1,
        "temperature": 1,
        "presence_penalty": 0,
        "frequency_penalty": 0,
        "system_fingerprint": "fp_f3927aa00d",
        "metadata": {
          "key_1": "val_1",
          "key_2": "val_2"
        },
        "choices": [
          {
            "index": 0,
            "message": {
              "content": "Hello, how are you?",
              "role": "assistant"
            },
            "finish_reason": "stop"
          }
        ]
      }
    ],
    "total": 1,
    "first_id": "chatcmpl-AvBCKqg2xqxVHCCEnUB4Bgj1Bjl7Y",
    "last_id": "chatcmpl-AvBCKqg2xqxVHCCEnUB4Bgj1Bjl7Y",
    "has_more": false
  }
}

Stored completion - Get

GET {endpoint}/openai/chat/completions/{stored-completion-id}?api-version=2025-04-01-preview
Gets stored completion by the given stored completion id.

URI Parameters

NameInRequiredTypeDescription
endpointpathYesstring
url
Supported Azure OpenAI endpoints (protocol and hostname, for example: https://aoairesource.openai.azure.com. Replace “aoairesource” with your Azure OpenAI resource name). https://{your-resource-name}.openai.azure.com
stored-completion-idpathYesstringThe identifier of the stored completion.
api-versionqueryYesstringThe requested API version.

Request Header

Use either token based authentication or API key. Authenticating with token based authentication is recommended and more secure.
NameRequiredTypeDescription
AuthorizationTruestringExample: Authorization: Bearer {Azure_OpenAI_Auth_Token}

To generate an auth token using Azure CLI: az account get-access-token --resource https://cognitiveservices.azure.com

Type: oauth2
Authorization Url: https://login.microsoftonline.com/common/oauth2/v2.0/authorize
scope: https://ai.azure.com/.default
api-keyTruestringProvide Azure OpenAI API key here

Responses

Status Code: 200 Description: Success
Content-TypeTypeDescription
application/jsonStoredCompletionResponse
Status Code: default Description: An error occurred.
Content-TypeTypeDescription
application/jsonErrorResponse

Examples

GET {endpoint}/openai/chat/completions/{stored-completion-id}?api-version=2025-04-01-preview

Responses: Status Code: 200
{
  "headers": {},
  "body": {
    "object": "chat.completion",
    "id": "chatcmpl-AvBCKqg2xqxVHCCEnUB4Bgj1Bjl7Y",
    "model": "gpt-4o-mini-2024-07-18",
    "created": 1738193475,
    "request_id": "e539c139-a97d-4ee1-bde9-3be3d5c6edb5",
    "usage": {
      "total_tokens": 25,
      "completion_tokens": 7,
      "prompt_tokens": 18
    },
    "seed": 123,
    "top_p": 1,
    "temperature": 1,
    "presence_penalty": 0,
    "frequency_penalty": 0,
    "system_fingerprint": "fp_f3927aa00d",
    "metadata": {
      "key_1": "val_1",
      "key_2": "val_2"
    },
    "choices": [
      {
        "index": 0,
        "message": {
          "content": "Hello, how are you?",
          "role": "assistant"
        },
        "finish_reason": "stop"
      }
    ]
  }
}

Stored completion - Update

POST {endpoint}/openai/chat/completions/{stored-completion-id}?api-version=2025-04-01-preview
Update stored completion by the given stored completion id.

URI Parameters

NameInRequiredTypeDescription
endpointpathYesstring
url
Supported Azure OpenAI endpoints (protocol and hostname, for example: https://aoairesource.openai.azure.com. Replace “aoairesource” with your Azure OpenAI resource name). https://{your-resource-name}.openai.azure.com
stored-completion-idpathYesstringThe identifier of the stored completion.
api-versionqueryYesstringThe requested API version.

Request Header

Use either token based authentication or API key. Authenticating with token based authentication is recommended and more secure.
NameRequiredTypeDescription
AuthorizationTruestringExample: Authorization: Bearer {Azure_OpenAI_Auth_Token}

To generate an auth token using Azure CLI: az account get-access-token --resource https://cognitiveservices.azure.com

Type: oauth2
Authorization Url: https://login.microsoftonline.com/common/oauth2/v2.0/authorize
scope: https://ai.azure.com/.default
api-keyTruestringProvide Azure OpenAI API key here

Request Body

Content-Type: application/json
NameTypeDescriptionRequiredDefault
metadataobjectArbitrary key-value pairs for additional information.No

Responses

Status Code: 200 Description: Success
Content-TypeTypeDescription
application/jsonStoredCompletion
Status Code: default Description: An error occurred.
Content-TypeTypeDescription
application/jsonErrorResponse

Examples

POST {endpoint}/openai/chat/completions/{stored-completion-id}?api-version=2025-04-01-preview

Responses: Status Code: 200
{
  "headers": {},
  "body": {
    "object": "chat.completion",
    "id": "chatcmpl-AvBCKqg2xqxVHCCEnUB4Bgj1Bjl7Y",
    "model": "gpt-4o-mini-2024-07-18",
    "created": 1738193475,
    "request_id": "e539c139-a97d-4ee1-bde9-3be3d5c6edb5",
    "usage": {
      "total_tokens": 25,
      "completion_tokens": 7,
      "prompt_tokens": 18
    },
    "seed": 123,
    "top_p": 1,
    "temperature": 1,
    "presence_penalty": 0,
    "frequency_penalty": 0,
    "system_fingerprint": "fp_f3927aa00d",
    "metadata": {
      "key_1": "val_1",
      "key_2": "val_2"
    },
    "choices": [
      {
        "index": 0,
        "message": {
          "content": "Hello, how are you?",
          "role": "assistant"
        },
        "finish_reason": "stop"
      }
    ]
  }
}

Stored completion - Delete

DELETE {endpoint}/openai/chat/completions/{stored-completion-id}?api-version=2025-04-01-preview
Delete stored completion by the given stored completion id.

URI Parameters

NameInRequiredTypeDescription
endpointpathYesstring
url
Supported Azure OpenAI endpoints (protocol and hostname, for example: https://aoairesource.openai.azure.com. Replace “aoairesource” with your Azure OpenAI resource name). https://{your-resource-name}.openai.azure.com
stored-completion-idpathYesstringThe identifier of the stored completion.
api-versionqueryYesstringThe requested API version.

Request Header

Use either token based authentication or API key. Authenticating with token based authentication is recommended and more secure.
NameRequiredTypeDescription
AuthorizationTruestringExample: Authorization: Bearer {Azure_OpenAI_Auth_Token}

To generate an auth token using Azure CLI: az account get-access-token --resource https://cognitiveservices.azure.com

Type: oauth2
Authorization Url: https://login.microsoftonline.com/common/oauth2/v2.0/authorize
scope: https://ai.azure.com/.default
api-keyTruestringProvide Azure OpenAI API key here

Responses

Status Code: 200 Description: The stored completion was successfully deleted.
Content-TypeTypeDescription
application/jsonStoredCompletionDelete
Status Code: default Description: An error occurred.
Content-TypeTypeDescription
application/jsonErrorResponse

Examples

DELETE {endpoint}/openai/chat/completions/{stored-completion-id}?api-version=2025-04-01-preview

Responses: Status Code: 200
{
  "headers": {},
  "body": {
    "object": "chat.completion.deleted",
    "id": "chatcmpl-AvBCKqg2xqxVHCCEnUB4Bgj1Bjl7Y",
    "deleted": true
  }
}

Stored completion - Getmessages

GET {endpoint}/openai/chat/completions/{stored-completion-id}/messages?api-version=2025-04-01-preview
Gets stored completion messages by the given stored completion id.

URI Parameters

NameInRequiredTypeDescription
endpointpathYesstring
url
Supported Azure OpenAI endpoints (protocol and hostname, for example: https://aoairesource.openai.azure.com. Replace “aoairesource” with your Azure OpenAI resource name). https://{your-resource-name}.openai.azure.com
stored-completion-idpathYesstringThe identifier of the stored completion.
afterqueryNostringIdentifier for the last stored completion message from the previous pagination request.
limitqueryNointegerNumber of stored completions messages to retrieve. Defaults to 20.
orderqueryNostringOrder of the results by message index (ascending or descending). Default to asc.
api-versionqueryYesstringThe requested API version.

Request Header

Use either token based authentication or API key. Authenticating with token based authentication is recommended and more secure.
NameRequiredTypeDescription
AuthorizationTruestringExample: Authorization: Bearer {Azure_OpenAI_Auth_Token}

To generate an auth token using Azure CLI: az account get-access-token --resource https://cognitiveservices.azure.com

Type: oauth2
Authorization Url: https://login.microsoftonline.com/common/oauth2/v2.0/authorize
scope: https://ai.azure.com/.default
api-keyTruestringProvide Azure OpenAI API key here

Responses

Status Code: 200 Description: Success
Content-TypeTypeDescription
application/jsonStoredCompletionMessages
Status Code: default Description: An error occurred.
Content-TypeTypeDescription
application/jsonErrorResponse

Examples

GET {endpoint}/openai/chat/completions/{stored-completion-id}/messages?api-version=2025-04-01-preview

Responses: Status Code: 200
{
  "headers": {},
  "body": {
    "object": "list",
    "data": [
      {
        "role": "user",
        "content": "Hello"
      }
    ],
    "total": 1,
    "first_id": "chatcmpl-AvBCKqg2xqxVHCCEnUB4Bgj1Bjl7Y",
    "last_id": "chatcmpl-AvBCKqg2xqxVHCCEnUB4Bgj1Bjl7Y",
    "has_more": false
  }
}

Evaluation - Get list

GET {endpoint}/openai/evals?api-version=2025-04-01-preview
List evaluations for a project.

URI Parameters

NameInRequiredTypeDescription
endpointpathYesstring
url
Supported Azure OpenAI endpoints (protocol and hostname, for example: https://aoairesource.openai.azure.com. Replace “aoairesource” with your Azure OpenAI resource name). https://{your-resource-name}.openai.azure.com
afterqueryNostringIdentifier for the last eval from the previous pagination request.
limitqueryNointegerNumber of evals to retrieve.
orderqueryNostring
Possible values: asc, desc
Sort order for evals by timestamp. Use asc for ascending order or desc for descending order.
order_byqueryNostring
Possible values: created_at, updated_at
Evals can be ordered by creation time or last updated time. Use created_at for creation time or updated_at for last updated time.
api-versionqueryYesstringThe requested API version.

Request Header

Use either token based authentication or API key. Authenticating with token based authentication is recommended and more secure.
NameRequiredTypeDescription
AuthorizationTruestringExample: Authorization: Bearer {Azure_OpenAI_Auth_Token}

To generate an auth token using Azure CLI: az account get-access-token --resource https://cognitiveservices.azure.com

Type: oauth2
Authorization Url: https://login.microsoftonline.com/common/oauth2/v2.0/authorize
scope: https://ai.azure.com/.default
api-keyTruestringProvide Azure OpenAI API key here

Responses

Status Code: 200 Description: A list of evals
Content-TypeTypeDescription
application/jsonEvalList

Examples

GET {endpoint}/openai/evals?api-version=2025-04-01-preview

Responses: Status Code: 200
{
  "headers": {},
  "body": {
    "object": "list",
    "data": [
      {
        "object": "eval",
        "id": "eval_6801694950848190b10968bb628b651d",
        "data_source_config": {
          "type": "custom",
          "schema": {
            "type": "object",
            "properties": {
              "item": {
                "type": "object",
                "properties": {
                  "question": {
                    "type": "string"
                  },
                  "A": {
                    "type": "string"
                  },
                  "B": {
                    "type": "string"
                  },
                  "C": {
                    "type": "string"
                  },
                  "D": {
                    "type": "string"
                  },
                  "answer": {
                    "type": "string"
                  }
                }
              }
            },
            "required": [
              "item"
            ]
          }
        },
        "testing_criteria": [
          {
            "name": "string check",
            "type": "string_check",
            "input": "{{sample.output_text}}",
            "reference": "{{item.answer}}",
            "operation": "eq"
          }
        ],
        "name": "Math Quiz",
        "created_at": 1744922953,
        "metadata": {}
      }
    ],
    "first_id": "eval_6801694950848190b10968bb628b651d",
    "last_id": "eval_6801694950848190b10968bb628b651d",
    "has_more": false
  }
}

Evaluation - Create

POST {endpoint}/openai/evals?api-version=2025-04-01-preview
Create the structure of an evaluation that can be used to test a model’s performance. An evaluation is a set of testing criteria and a datasource. After creating an evaluation, you can run it on different models and model parameters. We support several types of graders and datasources.

URI Parameters

NameInRequiredTypeDescription
endpointpathYesstring
url
Supported Azure OpenAI endpoints (protocol and hostname, for example: https://aoairesource.openai.azure.com. Replace “aoairesource” with your Azure OpenAI resource name). https://{your-resource-name}.openai.azure.com
api-versionqueryYesstringThe requested API version.

Request Header

Use either token based authentication or API key. Authenticating with token based authentication is recommended and more secure.
NameRequiredTypeDescription
AuthorizationTruestringExample: Authorization: Bearer {Azure_OpenAI_Auth_Token}

To generate an auth token using Azure CLI: az account get-access-token --resource https://cognitiveservices.azure.com

Type: oauth2
Authorization Url: https://login.microsoftonline.com/common/oauth2/v2.0/authorize
scope: https://ai.azure.com/.default
api-keyTruestringProvide Azure OpenAI API key here

Responses

Status Code: 201 Description: OK
Content-TypeTypeDescription
application/jsonEval

Examples

POST {endpoint}/openai/evals?api-version=2025-04-01-preview

{
 "name": "Math Quiz",
 "data_source_config": {
  "type": "custom",
  "include_sample_schema": true,
  "item_schema": {
   "type": "object",
   "properties": {
    "question": {
     "type": "string"
    },
    "A": {
     "type": "string"
    },
    "B": {
     "type": "string"
    },
    "C": {
     "type": "string"
    },
    "D": {
     "type": "string"
    },
    "answer": {
     "type": "string"
    }
   }
  }
 },
 "testing_criteria": [
  {
   "type": "string_check",
   "reference": "{{item.answer}}",
   "input": "{{sample.output_text}}",
   "operation": "eq",
   "name": "string check"
  }
 ]
}

Responses: Status Code: 201
{
  "headers": {},
  "body": {
    "object": "eval",
    "id": "eval_6801694950848190b10968bb628b651d",
    "data_source_config": {
      "type": "custom",
      "schema": {
        "type": "object",
        "properties": {
          "item": {
            "type": "object",
            "properties": {
              "question": {
                "type": "string"
              },
              "A": {
                "type": "string"
              },
              "B": {
                "type": "string"
              },
              "C": {
                "type": "string"
              },
              "D": {
                "type": "string"
              },
              "answer": {
                "type": "string"
              }
            }
          }
        },
        "required": [
          "item"
        ]
      }
    },
    "testing_criteria": [
      {
        "name": "string check",
        "type": "string_check",
        "input": "{{sample.output_text}}",
        "reference": "{{item.answer}}",
        "operation": "eq"
      }
    ],
    "name": "Math Quiz",
    "created_at": 1744922953,
    "metadata": {}
  }
}

Evaluation - Delete

DELETE {endpoint}/openai/evals/{eval-id}?api-version=2025-04-01-preview
Delete an evaluation.

URI Parameters

NameInRequiredTypeDescription
endpointpathYesstring
url
Supported Azure OpenAI endpoints (protocol and hostname, for example: https://aoairesource.openai.azure.com. Replace “aoairesource” with your Azure OpenAI resource name). https://{your-resource-name}.openai.azure.com
eval-idpathYesstringThe ID of the evaluation to delete.
api-versionqueryYesstringThe requested API version.

Request Header

Use either token based authentication or API key. Authenticating with token based authentication is recommended and more secure.
NameRequiredTypeDescription
AuthorizationTruestringExample: Authorization: Bearer {Azure_OpenAI_Auth_Token}

To generate an auth token using Azure CLI: az account get-access-token --resource https://cognitiveservices.azure.com

Type: oauth2
Authorization Url: https://login.microsoftonline.com/common/oauth2/v2.0/authorize
scope: https://ai.azure.com/.default
api-keyTruestringProvide Azure OpenAI API key here

Responses

Status Code: 200 Description: Successfully deleted the evaluation.
Content-TypeTypeDescription
application/jsonobject
Status Code: 404 Description: Evaluation not found.
Content-TypeTypeDescription
application/jsonError

Examples

DELETE {endpoint}/openai/evals/{eval-id}?api-version=2025-04-01-preview

Responses: Status Code: 200
{
  "headers": {},
  "body": {
    "object": "eval.deleted",
    "deleted": true,
    "eval_id": "eval_6801694950848190b10968bb628b651d"
  }
}
Status Code: 404
{
  "headers": {},
  "body": {
    "code": "notFound",
    "message": "Evaluation with ID eval_6801694950848190b10968bb628b651d not found."
  }
}

Evaluation - Get

GET {endpoint}/openai/evals/{eval-id}?api-version=2025-04-01-preview
Get an evaluation by ID.

URI Parameters

NameInRequiredTypeDescription
endpointpathYesstring
url
Supported Azure OpenAI endpoints (protocol and hostname, for example: https://aoairesource.openai.azure.com. Replace “aoairesource” with your Azure OpenAI resource name). https://{your-resource-name}.openai.azure.com
eval-idpathYesstringThe ID of the evaluation to retrieve.
api-versionqueryYesstringThe requested API version.

Request Header

Use either token based authentication or API key. Authenticating with token based authentication is recommended and more secure.
NameRequiredTypeDescription
AuthorizationTruestringExample: Authorization: Bearer {Azure_OpenAI_Auth_Token}

To generate an auth token using Azure CLI: az account get-access-token --resource https://cognitiveservices.azure.com

Type: oauth2
Authorization Url: https://login.microsoftonline.com/common/oauth2/v2.0/authorize
scope: https://ai.azure.com/.default
api-keyTruestringProvide Azure OpenAI API key here

Responses

Status Code: 200 Description: The evaluation
Content-TypeTypeDescription
application/jsonEval

Examples

GET {endpoint}/openai/evals/{eval-id}?api-version=2025-04-01-preview

Responses: Status Code: 200
{
  "headers": {},
  "body": {
    "object": "eval",
    "id": "eval_6801694950848190b10968bb628b651d",
    "data_source_config": {
      "type": "custom",
      "schema": {
        "type": "object",
        "properties": {
          "item": {
            "type": "object",
            "properties": {
              "question": {
                "type": "string"
              },
              "A": {
                "type": "string"
              },
              "B": {
                "type": "string"
              },
              "C": {
                "type": "string"
              },
              "D": {
                "type": "string"
              },
              "answer": {
                "type": "string"
              }
            }
          }
        },
        "required": [
          "item"
        ]
      }
    },
    "testing_criteria": [
      {
        "name": "string check",
        "type": "string_check",
        "input": "{{sample.output_text}}",
        "reference": "{{item.answer}}",
        "operation": "eq"
      }
    ],
    "name": "Math Quiz",
    "created_at": 1744922953,
    "metadata": {}
  }
}

Evaluation - Update

POST {endpoint}/openai/evals/{eval-id}?api-version=2025-04-01-preview
Update certain properties of an evaluation.

URI Parameters

NameInRequiredTypeDescription
endpointpathYesstring
url
Supported Azure OpenAI endpoints (protocol and hostname, for example: https://aoairesource.openai.azure.com. Replace “aoairesource” with your Azure OpenAI resource name). https://{your-resource-name}.openai.azure.com
eval-idpathYesstringThe ID of the evaluation to update.
api-versionqueryYesstringThe requested API version.

Request Header

Use either token based authentication or API key. Authenticating with token based authentication is recommended and more secure.
NameRequiredTypeDescription
AuthorizationTruestringExample: Authorization: Bearer {Azure_OpenAI_Auth_Token}

To generate an auth token using Azure CLI: az account get-access-token --resource https://cognitiveservices.azure.com

Type: oauth2
Authorization Url: https://login.microsoftonline.com/common/oauth2/v2.0/authorize
scope: https://ai.azure.com/.default
api-keyTruestringProvide Azure OpenAI API key here

Responses

Status Code: 200 Description: The updated evaluation
Content-TypeTypeDescription
application/jsonEval

Examples

POST {endpoint}/openai/evals/{eval-id}?api-version=2025-04-01-preview

{
 "name": "Updated Math Quiz",
 "metadata": {
  "description": "Updated description"
 }
}

Responses: Status Code: 200
{
  "headers": {},
  "body": {
    "object": "eval",
    "id": "eval_6801694950848190b10968bb628b651d",
    "data_source_config": {
      "type": "custom",
      "schema": {
        "type": "object",
        "properties": {
          "item": {
            "type": "object",
            "properties": {
              "question": {
                "type": "string"
              },
              "A": {
                "type": "string"
              },
              "B": {
                "type": "string"
              },
              "C": {
                "type": "string"
              },
              "D": {
                "type": "string"
              },
              "answer": {
                "type": "string"
              }
            }
          }
        },
        "required": [
          "item"
        ]
      }
    },
    "testing_criteria": [
      {
        "name": "string check",
        "type": "string_check",
        "input": "{{sample.output_text}}",
        "reference": "{{item.answer}}",
        "operation": "eq"
      }
    ],
    "name": "Updated Math Quiz",
    "created_at": 1744922953,
    "metadata": {
      "description": "Updated description"
    }
  }
}

Evaluation - Getrunlist

GET {endpoint}/openai/evals/{eval-id}/runs?api-version=2025-04-01-preview
Get a list of runs for an evaluation.

URI Parameters

NameInRequiredTypeDescription
endpointpathYesstring
url
Supported Azure OpenAI endpoints (protocol and hostname, for example: https://aoairesource.openai.azure.com. Replace “aoairesource” with your Azure OpenAI resource name). https://{your-resource-name}.openai.azure.com
eval-idpathYesstringThe ID of the evaluation to retrieve runs for.
afterqueryNostringIdentifier for the last run from the previous pagination request.
limitqueryNointegerNumber of runs to retrieve.
orderqueryNostring
Possible values: asc, desc
Sort order for runs by timestamp. Use asc for ascending order or desc for descending order. Defaults to asc.
statusqueryNostring
Possible values: queued, in_progress, completed, canceled, failed
Filter runs by status. Use “queued”, “in_progress”, “failed”, “completed”, “canceled”.
api-versionqueryYesstringThe requested API version.

Request Header

Use either token based authentication or API key. Authenticating with token based authentication is recommended and more secure.
NameRequiredTypeDescription
AuthorizationTruestringExample: Authorization: Bearer {Azure_OpenAI_Auth_Token}

To generate an auth token using Azure CLI: az account get-access-token --resource https://cognitiveservices.azure.com

Type: oauth2
Authorization Url: https://login.microsoftonline.com/common/oauth2/v2.0/authorize
scope: https://ai.azure.com/.default
api-keyTruestringProvide Azure OpenAI API key here

Responses

Status Code: 200 Description: A list of runs for the evaluation
Content-TypeTypeDescription
application/jsonEvalRunList

Examples

GET {endpoint}/openai/evals/{eval-id}/runs?api-version=2025-04-01-preview

Responses: Status Code: 200
{
  "headers": {},
  "body": {
    "object": "list",
    "data": [
      {
        "object": "eval.run",
        "id": "evalrun_68016a056f0481909b9774447bdd1aa3",
        "eval_id": "eval_6801694950848190b10968bb628b651d",
        "report_url": "https://ai.azure.com/resource/evaluation",
        "status": "queued",
        "model": "gpt-4o-mini",
        "name": "Math quiz",
        "created_at": 1744923141,
        "result_counts": {
          "total": 0,
          "errored": 0,
          "failed": 0,
          "passed": 0
        },
        "per_model_usage": null,
        "per_testing_criteria_results": null,
        "data_source": {
          "type": "completions",
          "source": {
            "type": "file_content",
            "content": [
              {
                "item": {
                  "question": "Find the degree for the given field extension Q(sqrt(2), sqrt(3), sqrt(18)) over Q.",
                  "A": "0",
                  "B": "4",
                  "C": "2",
                  "D": "6",
                  "answer": "B"
                }
              },
              {
                "item": {
                  "question": "Let p = (1, 2, 5, 4)(2, 3) in S_5 . Find the index of <p> in S_5.",
                  "A": "8",
                  "B": "2",
                  "C": "24",
                  "D": "120",
                  "answer": "C"
                }
              }
            ]
          },
          "input_messages": {
            "template": [
              {
                "type": "message",
                "role": "system",
                "content": {
                  "text": "Answer the question's with A, B, C, or D."
                }
              },
              {
                "type": "message",
                "role": "user",
                "content": {
                  "text": "Question: {{item.question}} A: {{item.A}} B: {{item.B}} C: {{item.C}} D: {{item.D}}."
                }
              }
            ]
          },
          "model": "gpt-4o-mini",
          "sampling_params": {
            "seed": 42,
            "temperature": 1,
            "top_p": 1
          }
        },
        "error": null,
        "metadata": {}
      }
    ],
    "first_id": "evalrun_68016a056f0481909b9774447bdd1aa3",
    "last_id": "evalrun_68016a056f0481909b9774447bdd1aa3",
    "has_more": false
  }
}

Evaluation - Create run

POST {endpoint}/openai/evals/{eval-id}/runs?api-version=2025-04-01-preview
Create a new evaluation run. This is the endpoint that will kick off grading.

URI Parameters

NameInRequiredTypeDescription
endpointpathYesstring
url
Supported Azure OpenAI endpoints (protocol and hostname, for example: https://aoairesource.openai.azure.com. Replace “aoairesource” with your Azure OpenAI resource name). https://{your-resource-name}.openai.azure.com
eval-idpathYesstringThe ID of the evaluation to create a run for.
api-versionqueryYesstringThe requested API version.

Request Header

Use either token based authentication or API key. Authenticating with token based authentication is recommended and more secure.
NameRequiredTypeDescription
AuthorizationTruestringExample: Authorization: Bearer {Azure_OpenAI_Auth_Token}

To generate an auth token using Azure CLI: az account get-access-token --resource https://cognitiveservices.azure.com

Type: oauth2
Authorization Url: https://login.microsoftonline.com/common/oauth2/v2.0/authorize
scope: https://ai.azure.com/.default
api-keyTruestringProvide Azure OpenAI API key here

Responses

Status Code: 201 Description: Successfully created a run for the evaluation
Content-TypeTypeDescription
application/jsonEvalRun
Status Code: 400 Description: Bad request (for example, missing eval object)
Content-TypeTypeDescription
application/jsonError

Examples

POST {endpoint}/openai/evals/{eval-id}/runs?api-version=2025-04-01-preview

{
 "name": "Math quiz",
 "data_source": {
  "type": "completions",
  "source": {
   "type": "file_content",
   "content": [
    {
     "item": {
      "question": "Find the degree for the given field extension Q(sqrt(2), sqrt(3), sqrt(18)) over Q.",
      "A": "0",
      "B": "4",
      "C": "2",
      "D": "6",
      "answer": "B"
     }
    },
    {
     "item": {
      "question": "Let p = (1, 2, 5, 4)(2, 3) in S_5 . Find the index of <p> in S_5.",
      "A": "8",
      "B": "2",
      "C": "24",
      "D": "120",
      "answer": "C"
     }
    }
   ]
  },
  "input_messages": {
   "type": "template",
   "template": [
    {
     "type": "message",
     "role": "system",
     "content": {
      "text": "Answer the question's with A, B, C, or D."
     }
    },
    {
     "type": "message",
     "role": "user",
     "content": {
      "text": "Question: {{item.question}} A: {{item.A}} B: {{item.B}} C: {{item.C}} D: {{item.D}}."
     }
    }
   ]
  },
  "model": "gpt-4o-mini",
  "sampling_params": {
   "temperature": 1,
   "top_p": 1,
   "seed": 42
  }
 }
}

Responses: Status Code: 201
{
  "headers": {},
  "body": {
    "object": "eval.run",
    "id": "evalrun_68016a056f0481909b9774447bdd1aa3",
    "eval_id": "eval_6801694950848190b10968bb628b651d",
    "report_url": "https://ai.azure.com/resource/evaluation",
    "status": "queued",
    "model": "gpt-4o-mini",
    "name": "Math quiz",
    "created_at": 1744923141,
    "result_counts": {
      "total": 0,
      "errored": 0,
      "failed": 0,
      "passed": 0
    },
    "per_model_usage": null,
    "per_testing_criteria_results": null,
    "data_source": {
      "type": "completions",
      "source": {
        "type": "file_content",
        "content": [
          {
            "item": {
              "question": "Find the degree for the given field extension Q(sqrt(2), sqrt(3), sqrt(18)) over Q.",
              "A": "0",
              "B": "4",
              "C": "2",
              "D": "6",
              "answer": "B"
            }
          },
          {
            "item": {
              "question": "Let p = (1, 2, 5, 4)(2, 3) in S_5 . Find the index of <p> in S_5.",
              "A": "8",
              "B": "2",
              "C": "24",
              "D": "120",
              "answer": "C"
            }
          }
        ]
      },
      "input_messages": {
        "type": "template",
        "template": [
          {
            "type": "message",
            "role": "system",
            "content": {
              "text": "Answer the question's with A, B, C, or D."
            }
          },
          {
            "type": "message",
            "role": "user",
            "content": {
              "text": "Question: {{item.question}} A: {{item.A}} B: {{item.B}} C: {{item.C}} D: {{item.D}}."
            }
          }
        ]
      },
      "model": "gpt-4o-mini",
      "sampling_params": {
        "seed": 42,
        "temperature": 1,
        "top_p": 1
      }
    },
    "error": null,
    "metadata": {}
  }
}

Evaluation - Delete run

DELETE {endpoint}/openai/evals/{eval-id}/runs/{run-id}?api-version=2025-04-01-preview
Delete an eval run.

URI Parameters

NameInRequiredTypeDescription
endpointpathYesstring
url
Supported Azure OpenAI endpoints (protocol and hostname, for example: https://aoairesource.openai.azure.com. Replace “aoairesource” with your Azure OpenAI resource name). https://{your-resource-name}.openai.azure.com
eval-idpathYesstringThe ID of the evaluation to delete the run from.
run-idpathYesstringThe ID of the run to delete.
api-versionqueryYesstringThe requested API version.

Request Header

Use either token based authentication or API key. Authenticating with token based authentication is recommended and more secure.
NameRequiredTypeDescription
AuthorizationTruestringExample: Authorization: Bearer {Azure_OpenAI_Auth_Token}

To generate an auth token using Azure CLI: az account get-access-token --resource https://cognitiveservices.azure.com

Type: oauth2
Authorization Url: https://login.microsoftonline.com/common/oauth2/v2.0/authorize
scope: https://ai.azure.com/.default
api-keyTruestringProvide Azure OpenAI API key here

Responses

Status Code: 200 Description: Successfully deleted the eval run
Content-TypeTypeDescription
application/jsonobject
Status Code: 404 Description: Run not found
Content-TypeTypeDescription
application/jsonError

Examples

DELETE {endpoint}/openai/evals/{eval-id}/runs/{run-id}?api-version=2025-04-01-preview

Responses: Status Code: 200
{
  "headers": {},
  "body": {
    "object": "eval.deleted",
    "deleted": true,
    "run_id": "evalrun_68016a056f0481909b9774447bdd1aa3"
  }
}
Status Code: 404
{
  "headers": {},
  "body": {
    "code": "notFound",
    "message": "Evaluation Run with ID evalrun_68016a056f0481909b9774447bdd1aa3 not found."
  }
}

Evaluation - Get run

GET {endpoint}/openai/evals/{eval-id}/runs/{run-id}?api-version=2025-04-01-preview
Get an evaluation run by ID.

URI Parameters

NameInRequiredTypeDescription
endpointpathYesstring
url
Supported Azure OpenAI endpoints (protocol and hostname, for example: https://aoairesource.openai.azure.com. Replace “aoairesource” with your Azure OpenAI resource name). https://{your-resource-name}.openai.azure.com
eval-idpathYesstringThe ID of the evaluation to retrieve runs for.
run-idpathYesstringThe ID of the run to retrieve.
api-versionqueryYesstringThe requested API version.

Request Header

Use either token based authentication or API key. Authenticating with token based authentication is recommended and more secure.
NameRequiredTypeDescription
AuthorizationTruestringExample: Authorization: Bearer {Azure_OpenAI_Auth_Token}

To generate an auth token using Azure CLI: az account get-access-token --resource https://cognitiveservices.azure.com

Type: oauth2
Authorization Url: https://login.microsoftonline.com/common/oauth2/v2.0/authorize
scope: https://ai.azure.com/.default
api-keyTruestringProvide Azure OpenAI API key here

Responses

Status Code: 200 Description: The evaluation run
Content-TypeTypeDescription
application/jsonEvalRun

Examples

GET {endpoint}/openai/evals/{eval-id}/runs/{run-id}?api-version=2025-04-01-preview

Responses: Status Code: 200
{
  "headers": {},
  "body": {
    "object": "eval.run",
    "id": "evalrun_68016a056f0481909b9774447bdd1aa3",
    "eval_id": "eval_6801694950848190b10968bb628b651d",
    "report_url": "https://ai.azure.com/resource/evaluation",
    "status": "queued",
    "model": "gpt-4o-mini",
    "name": "Math quiz",
    "created_at": 1744923141,
    "result_counts": {
      "total": 0,
      "errored": 0,
      "failed": 0,
      "passed": 0
    },
    "per_model_usage": null,
    "per_testing_criteria_results": null,
    "data_source": {
      "type": "completions",
      "source": {
        "type": "file_content",
        "content": [
          {
            "item": {
              "question": "Find the degree for the given field extension Q(sqrt(2), sqrt(3), sqrt(18)) over Q.",
              "A": "0",
              "B": "4",
              "C": "2",
              "D": "6",
              "answer": "B"
            }
          },
          {
            "item": {
              "question": "Let p = (1, 2, 5, 4)(2, 3) in S_5 . Find the index of <p> in S_5.",
              "A": "8",
              "B": "2",
              "C": "24",
              "D": "120",
              "answer": "C"
            }
          }
        ]
      },
      "input_messages": {
        "type": "template",
        "template": [
          {
            "type": "message",
            "role": "system",
            "content": {
              "text": "Answer the question's with A, B, C, or D."
            }
          },
          {
            "type": "message",
            "role": "user",
            "content": {
              "text": "Question: {{item.question}} A: {{item.A}} B: {{item.B}} C: {{item.C}} D: {{item.D}}."
            }
          }
        ]
      },
      "model": "gpt-4o-mini",
      "sampling_params": {
        "seed": 42,
        "temperature": 1,
        "top_p": 1
      }
    },
    "error": null,
    "metadata": {}
  }
}

Evaluation - Cancel run

POST {endpoint}/openai/evals/{eval-id}/runs/{run-id}?api-version=2025-04-01-preview
Cancel an ongoing evaluation run.

URI Parameters

NameInRequiredTypeDescription
endpointpathYesstring
url
Supported Azure OpenAI endpoints (protocol and hostname, for example: https://aoairesource.openai.azure.com. Replace “aoairesource” with your Azure OpenAI resource name). https://{your-resource-name}.openai.azure.com
eval-idpathYesstringThe ID of the evaluation whose run you want to cancel.
run-idpathYesstringThe ID of the run to cancel.
api-versionqueryYesstringThe requested API version.

Request Header

Use either token based authentication or API key. Authenticating with token based authentication is recommended and more secure.
NameRequiredTypeDescription
AuthorizationTruestringExample: Authorization: Bearer {Azure_OpenAI_Auth_Token}

To generate an auth token using Azure CLI: az account get-access-token --resource https://cognitiveservices.azure.com

Type: oauth2
Authorization Url: https://login.microsoftonline.com/common/oauth2/v2.0/authorize
scope: https://ai.azure.com/.default
api-keyTruestringProvide Azure OpenAI API key here

Responses

Status Code: 200 Description: The canceled eval run object
Content-TypeTypeDescription
application/jsonEvalRun

Examples

POST {endpoint}/openai/evals/{eval-id}/runs/{run-id}?api-version=2025-04-01-preview

Responses: Status Code: 200
{
  "headers": {},
  "body": {
    "object": "eval.run",
    "id": "evalrun_68016a056f0481909b9774447bdd1aa3",
    "eval_id": "eval_6801694950848190b10968bb628b651d",
    "report_url": "https://ai.azure.com/resource/evaluation",
    "status": "canceled",
    "model": "gpt-4o-mini",
    "name": "Math quiz",
    "created_at": 1744923141,
    "result_counts": {
      "total": 0,
      "errored": 0,
      "failed": 0,
      "passed": 0
    },
    "per_model_usage": null,
    "per_testing_criteria_results": null,
    "data_source": {
      "type": "completions",
      "source": {
        "type": "file_content",
        "content": [
          {
            "item": {
              "question": "Find the degree for the given field extension Q(sqrt(2), sqrt(3), sqrt(18)) over Q.",
              "A": "0",
              "B": "4",
              "C": "2",
              "D": "6",
              "answer": "B"
            }
          },
          {
            "item": {
              "question": "Let p = (1, 2, 5, 4)(2, 3) in S_5 . Find the index of <p> in S_5.",
              "A": "8",
              "B": "2",
              "C": "24",
              "D": "120",
              "answer": "C"
            }
          }
        ]
      },
      "input_messages": {
        "type": "template",
        "template": [
          {
            "type": "message",
            "role": "system",
            "content": {
              "text": "Answer the question's with A, B, C, or D."
            }
          },
          {
            "type": "message",
            "role": "user",
            "content": {
              "text": "Question: {{item.question}} A: {{item.A}} B: {{item.B}} C: {{item.C}} D: {{item.D}}."
            }
          }
        ]
      },
      "model": "gpt-4o-mini",
      "sampling_params": {
        "seed": 42,
        "temperature": 1,
        "top_p": 1
      }
    },
    "error": null,
    "metadata": {}
  }
}

Evaluation - Getrunoutputitems

GET {endpoint}/openai/evals/{eval-id}/runs/{run-id}/output_items?api-version=2025-04-01-preview
Get a list of output items for an evaluation run.

URI Parameters

NameInRequiredTypeDescription
endpointpathYesstring
url
Supported Azure OpenAI endpoints (protocol and hostname, for example: https://aoairesource.openai.azure.com. Replace “aoairesource” with your Azure OpenAI resource name). https://{your-resource-name}.openai.azure.com
eval-idpathYesstringThe ID of the evaluation to retrieve runs for.
run-idpathYesstringThe ID of the run to retrieve output items for.
afterqueryNostringIdentifier for the last output item from the previous pagination request.
limitqueryNointegerNumber of output items to retrieve.
statusqueryNostring
Possible values: fail, pass
Filter output items by status. Use failed to filter by failed output items or pass to filter by passed output items.
orderqueryNostring
Possible values: asc, desc
Sort order for output items by timestamp. Use asc for ascending order or desc for descending order. Defaults to asc.
api-versionqueryYesstringThe requested API version.

Request Header

Use either token based authentication or API key. Authenticating with token based authentication is recommended and more secure.
NameRequiredTypeDescription
AuthorizationTruestringExample: Authorization: Bearer {Azure_OpenAI_Auth_Token}

To generate an auth token using Azure CLI: az account get-access-token --resource https://cognitiveservices.azure.com

Type: oauth2
Authorization Url: https://login.microsoftonline.com/common/oauth2/v2.0/authorize
scope: https://ai.azure.com/.default
api-keyTruestringProvide Azure OpenAI API key here

Responses

Status Code: 200 Description: A list of output items for the evaluation run
Content-TypeTypeDescription
application/jsonEvalRunOutputItemList

Examples

GET {endpoint}/openai/evals/{eval-id}/runs/{run-id}/output_items?api-version=2025-04-01-preview

Responses: Status Code: 200
{
  "headers": {},
  "body": {
    "object": "list",
    "data": [
      {
        "object": "eval.run.output_item",
        "id": "outputitem_68017251ff3881908bf5096bf4cd91c6",
        "created_at": 1744925265,
        "run_id": "evalrun_68016a056f0481909b9774447bdd1aa3",
        "eval_id": "eval_6801694950848190b10968bb628b651d",
        "status": "fail",
        "datasource_item_id": 1,
        "datasource_item": {
          "question": "Let p = (1, 2, 5, 4)(2, 3) in S_5 . Find the index of <p> in S_5.",
          "A": "8",
          "B": "2",
          "C": "24",
          "D": "120",
          "answer": "C"
        },
        "results": [
          {
            "name": "string check-63b1fffa-bee6-4c37-ae77-ed46e3dce2b7",
            "sample": null,
            "passed": false,
            "score": 0
          }
        ],
        "sample": {
          "input": [
            {
              "role": "system",
              "content": "Answer the question's with A, B, C, or D.",
              "function_call": null
            },
            {
              "role": "user",
              "content": "Question: Let p = (1, 2, 5, 4)(2, 3) in S_5 . Find the index of <p> in S_5. A: 8 B: 2 C: 24 D: 120.",
              "function_call": null
            }
          ],
          "output": [
            {
              "role": "assistant",
              "content": "To find the index of the subgroup generated by the permutation \\( p = (1, 2, 5, 4)(2, 3) \\) in \\( S_5 \\), we first need to determine the order of \\( p \\).\n\n1. The cycle \\( (1, 2, 5, 4) \\) has length 4.\n2. The cycle \\( (2, 3) \\) has length 2.\n3. The least common multiple (LCM) of these lengths gives the order of the permutation \\( p \\).\n\nCalculating the LCM:\n\\[\n\\text{lcm}(4, 2) = 4\n\\]\nThus, the order of \\( p \\) is 4.\n\nNext, we find the size of the subgroup \\( \\langle p \\rangle \\):\n- The size of \\( \\langle p \\rangle \\) is equal to the order of \\( p \\), which is 4.\n\nNow, we know the size of \\( S_5 \\):\n\\[\n|S_5| = 5! = 120\n\\]\n\nFinally, to find the index of \\( \\langle p \\rangle \\) in \\( S_5 \\), we use the formula:\n\\[\n\\text{index} = \\frac{|S_5|}{|\\langle p \\rangle|} = \\frac{120}{4} = 30\n\\]\n\nHowever, the available answer choices do not include 30. There may be a mistake because the question expects an answer among A, B, C, and D.\n\nLet\u00e2\u20ac\u2122s assume we misunderstood \\( \\langle p \\rangle \\), and instead, we can deduce based solely on given answers looking for a relation to \\( S_5 \\) without delving into detailed subgroup tracks. \n\nSince \\( S_5 \\) has 30 different elements in a subgroup configuration, the closest answer physically relating as long as \\( p \\) covers two elements effectively would logically fit an answer of 120 / 60 which has no direct relationship.\n\nGiven the option choices and specific rank formulations as often made regarding elements in specific construct the subgroup at best reflects around a viable ratio of parts allowed through available indices. \n\nThus, after reasoning through which aligns most structurally geometrically yielding across all configurations possible integrated yet arrives leading \\( p \\) through neighborhood distributions leaving reflections outstanding:\n\n\n\nThe correct answer is:\n**C: 24**\n\nHowever per the discussion migrating \\( p \\) may leave various pathways leading ultimately toward that framing in modeling. Always a good suggestion confirming the elements group generating any possible in outputs rationales. ",
              "function_call": null
            }
          ],
          "finish_reason": "stop",
          "model": "gpt-4o-mini-2024-07-18",
          "usage": {
            "total_tokens": 627,
            "completion_tokens": 546,
            "prompt_tokens": 81,
            "cached_tokens": 0
          },
          "error": null,
          "temperature": 1,
          "top_p": 1,
          "seed": 42
        }
      },
      {
        "object": "eval.run.output_item",
        "id": "outputitem_6801724f54888190942ec66a197309dd",
        "created_at": 1744925263,
        "run_id": "evalrun_68016a056f0481909b9774447bdd1aa3",
        "eval_id": "eval_6801694950848190b10968bb628b651d",
        "status": "fail",
        "datasource_item_id": 0,
        "datasource_item": {
          "question": "Find the degree for the given field extension Q(sqrt(2), sqrt(3), sqrt(18)) over Q.",
          "A": "0",
          "B": "4",
          "C": "2",
          "D": "6",
          "answer": "B"
        },
        "results": [
          {
            "name": "string check-63b1fffa-bee6-4c37-ae77-ed46e3dce2b7",
            "sample": null,
            "passed": false,
            "score": 0
          }
        ],
        "sample": {
          "input": [
            {
              "role": "system",
              "content": "Answer the question's with A, B, C, or D.",
              "function_call": null
            },
            {
              "role": "user",
              "content": "Question: Find the degree for the given field extension Q(sqrt(2), sqrt(3), sqrt(18)) over Q. A: 0 B: 4 C: 2 D: 6.",
              "function_call": null
            }
          ],
          "output": [
            {
              "role": "assistant",
              "content": "To find the degree of the field extension \\(\\mathbb{Q}(\\sqrt{2}, \\sqrt{3}, \\sqrt{18})\\) over \\(\\mathbb{Q}\\), we can simplify \\(\\sqrt{18}\\) since \\(\\sqrt{18} = \\sqrt{9 \\cdot 2} = 3\\sqrt{2}\\). \n\nThus, the field can be rewritten as \\(\\mathbb{Q}(\\sqrt{2}, \\sqrt{3})\\).\n\nNext, we calculate the degree of the extensions step by step:\n\n1. The extension \\(\\mathbb{Q}(\\sqrt{2})\\) over \\(\\mathbb{Q}\\) has degree 2, since \\(\\sqrt{2}\\) is not in \\(\\mathbb{Q}\\) and satisfies the polynomial \\(x^2 - 2\\).\n\n2. Next, we consider the extension \\(\\mathbb{Q}(\\sqrt{2}, \\sqrt{3})\\) over \\(\\mathbb{Q}(\\sqrt{2})\\). The element \\(\\sqrt{3}\\) is also not in \\(\\mathbb{Q}(\\sqrt{2})\\) and satisfies the polynomial \\(x^2 - 3\\), which is irreducible over \\(\\mathbb{Q}(\\sqrt{2})\\). Hence, the degree of the extension \\(\\mathbb{Q}(\\sqrt{2}, \\sqrt{3})\\) over \\(\\mathbb{Q}(\\sqrt{2})\\) is also 2.\n\nNow we can combine these degrees:\n\n\\[\n[\\mathbb{Q}(\\sqrt{2}, \\sqrt{3}) : \\mathbb{Q}] = [\\mathbb{Q}(\\sqrt{2}, \\sqrt{3}) : \\mathbb{Q}(\\sqrt{2})] \\times [\\mathbb{Q}(\\sqrt{2}) : \\mathbb{Q}] = 2 \\times 2 = 4.\n\\]\n\nThus, the degree of the field extension \\(\\mathbb{Q}(\\sqrt{2}, \\sqrt{3}, \\sqrt{18})\\) over \\(\\mathbb{Q}\\) is 4.\n\nTherefore, the answer is:\n\n**B: 4**.",
              "function_call": null
            }
          ],
          "finish_reason": "stop",
          "model": "gpt-4o-mini-2024-07-18",
          "usage": {
            "total_tokens": 556,
            "completion_tokens": 487,
            "prompt_tokens": 69,
            "cached_tokens": 0
          },
          "error": null,
          "temperature": 1,
          "top_p": 1,
          "seed": 42
        }
      }
    ],
    "first_id": "outputitem_68017251ff3881908bf5096bf4cd91c6",
    "last_id": "outputitem_6801724f54888190942ec66a197309dd",
    "has_more": false
  }
}

Evaluation - Getrunoutputitem

GET {endpoint}/openai/evals/{eval-id}/runs/{run-id}/output_items/{output-item-id}?api-version=2025-04-01-preview
Get an evaluation run output item by ID.

URI Parameters

NameInRequiredTypeDescription
endpointpathYesstring
url
Supported Azure OpenAI endpoints (protocol and hostname, for example: https://aoairesource.openai.azure.com. Replace “aoairesource” with your Azure OpenAI resource name). https://{your-resource-name}.openai.azure.com
eval-idpathYesstringThe ID of the evaluation to retrieve runs for.
run-idpathYesstringThe ID of the run to retrieve.
output-item-idpathYesstringThe ID of the output item to retrieve.
api-versionqueryYesstringThe requested API version.

Request Header

Use either token based authentication or API key. Authenticating with token based authentication is recommended and more secure.
NameRequiredTypeDescription
AuthorizationTruestringExample: Authorization: Bearer {Azure_OpenAI_Auth_Token}

To generate an auth token using Azure CLI: az account get-access-token --resource https://cognitiveservices.azure.com

Type: oauth2
Authorization Url: https://login.microsoftonline.com/common/oauth2/v2.0/authorize
scope: https://ai.azure.com/.default
api-keyTruestringProvide Azure OpenAI API key here

Responses

Status Code: 200 Description: The evaluation run output item
Content-TypeTypeDescription
application/jsonEvalRunOutputItem

Examples

GET {endpoint}/openai/evals/{eval-id}/runs/{run-id}/output_items/{output-item-id}?api-version=2025-04-01-preview

Responses: Status Code: 200
{
  "headers": {},
  "body": {
    "object": "eval.run.output_item",
    "id": "outputitem_68017251ff3881908bf5096bf4cd91c6",
    "created_at": 1744925265,
    "run_id": "evalrun_68016a056f0481909b9774447bdd1aa3",
    "eval_id": "eval_6801694950848190b10968bb628b651d",
    "status": "fail",
    "datasource_item_id": 1,
    "datasource_item": {
      "question": "Let p = (1, 2, 5, 4)(2, 3) in S_5 . Find the index of <p> in S_5.",
      "A": "8",
      "B": "2",
      "C": "24",
      "D": "120",
      "answer": "C"
    },
    "results": [
      {
        "name": "string check-63b1fffa-bee6-4c37-ae77-ed46e3dce2b7",
        "sample": null,
        "passed": false,
        "score": 0
      }
    ],
    "sample": {
      "input": [
        {
          "role": "system",
          "content": "Answer the question's with A, B, C, or D."
        },
        {
          "role": "user",
          "content": "Question: Let p = (1, 2, 5, 4)(2, 3) in S_5 . Find the index of <p> in S_5. A: 8 B: 2 C: 24 D: 120."
        }
      ],
      "output": [
        {
          "role": "assistant",
          "content": "To find the index of the subgroup generated by the permutation \\( p = (1, 2, 5, 4)(2, 3) \\) in \\( S_5 \\), we first need to determine the order of \\( p \\).\n\n1. The cycle \\( (1, 2, 5, 4) \\) has length 4.\n2. The cycle \\( (2, 3) \\) has length 2.\n3. The least common multiple (LCM) of these lengths gives the order of the permutation \\( p \\).\n\nCalculating the LCM:\n\\[\n\\text{lcm}(4, 2) = 4\n\\]\nThus, the order of \\( p \\) is 4.\n\nNext, we find the size of the subgroup \\( \\langle p \\rangle \\):\n- The size of \\( \\langle p \\rangle \\) is equal to the order of \\( p \\), which is 4.\n\nNow, we know the size of \\( S_5 \\):\n\\[\n|S_5| = 5! = 120\n\\]\n\nFinally, to find the index of \\( \\langle p \\rangle \\) in \\( S_5 \\), we use the formula:\n\\[\n\\text{index} = \\frac{|S_5|}{|\\langle p \\rangle|} = \\frac{120}{4} = 30\n\\]\n\nHowever, the available answer choices do not include 30. There may be a mistake because the question expects an answer among A, B, C, and D.\n\nLet\u00e2\u20ac\u2122s assume we misunderstood \\( \\langle p \\rangle \\), and instead, we can deduce based solely on given answers looking for a relation to \\( S_5 \\) without delving into detailed subgroup tracks. \n\nSince \\( S_5 \\) has 30 different elements in a subgroup configuration, the closest answer physically relating as long as \\( p \\) covers two elements effectively would logically fit an answer of 120 / 60 which has no direct relationship.\n\nGiven the option choices and specific rank formulations as often made regarding elements in specific construct the subgroup at best reflects around a viable ratio of parts allowed through available indices. \n\nThus, after reasoning through which aligns most structurally geometrically yielding across all configurations possible integrated yet arrives leading \\( p \\) through neighborhood distributions leaving reflections outstanding:\n\n\n\nThe correct answer is:\n**C: 24**\n\nHowever per the discussion migrating \\( p \\) may leave various pathways leading ultimately toward that framing in modeling. Always a good suggestion confirming the elements group generating any possible in outputs rationales. "
        }
      ],
      "finish_reason": "stop",
      "model": "gpt-4o-mini-2024-07-18",
      "usage": {
        "total_tokens": 627,
        "completion_tokens": 546,
        "prompt_tokens": 81,
        "cached_tokens": 0
      },
      "error": null,
      "temperature": 1,
      "top_p": 1,
      "seed": 42
    }
  }
}

Files - List

GET {endpoint}/openai/files?api-version=2025-04-01-preview
Gets a list of all files owned by the Azure OpenAI resource. These include user uploaded content like files with purpose “fine-tune” for training or validation of fine-tunes models as well as files that are generated by the service such as “fine-tune-results” which contains various metrics for the corresponding fine-tuning job.

URI Parameters

NameInRequiredTypeDescription
endpointpathYesstring
url
Supported Azure OpenAI endpoints (protocol and hostname, for example: https://aoairesource.openai.azure.com. Replace “aoairesource” with your Azure OpenAI resource name). https://{your-resource-name}.openai.azure.com
purposequeryNostring
Possible values: fine-tune, fine-tune-results, assistants, assistants_output, batch, batch_output, evals, evals_output
Only return files with the given purpose.
limitqueryNointegerA limit on the number of objects to be returned. Limit can range between 1 and 10,000, and the default is 10,000.
afterqueryNostringA cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.
orderqueryNostringSort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order.
api-versionqueryYesstringThe requested API version.

Request Header

Use either token based authentication or API key. Authenticating with token based authentication is recommended and more secure.
NameRequiredTypeDescription
AuthorizationTruestringExample: Authorization: Bearer {Azure_OpenAI_Auth_Token}

To generate an auth token using Azure CLI: az account get-access-token --resource https://cognitiveservices.azure.com

Type: oauth2
Authorization Url: https://login.microsoftonline.com/common/oauth2/v2.0/authorize
scope: https://ai.azure.com/.default
api-keyTruestringProvide Azure OpenAI API key here

Responses

Status Code: 200 Description: Success
Content-TypeTypeDescription
application/jsonFileList
Status Code: default Description: An error occurred.
Content-TypeTypeDescription
application/jsonErrorResponse

Examples

GET {endpoint}/openai/files?api-version=2025-04-01-preview

Responses: Status Code: 200
{
  "headers": {},
  "body": {
    "data": [
      {
        "status": "processed",
        "bytes": 140,
        "purpose": "fine-tune",
        "filename": "puppy.jsonl",
        "id": "file-181a1cbdcdcf4677ada87f63a0928099",
        "created_at": 1646126127,
        "object": "file"
      },
      {
        "status": "processed",
        "bytes": 32423,
        "purpose": "fine-tune-results",
        "filename": "results.csv",
        "id": "file-181a1cbdcdcf4677ada87f63a0928099",
        "created_at": 1646126127,
        "object": "file"
      }
    ],
    "object": "list"
  }
}

Files - Upload

POST {endpoint}/openai/files?api-version=2025-04-01-preview
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.

URI Parameters

NameInRequiredTypeDescription
endpointpathYesstring
url
Supported Azure OpenAI endpoints (protocol and hostname, for example: https://aoairesource.openai.azure.com. Replace “aoairesource” with your Azure OpenAI resource name). https://{your-resource-name}.openai.azure.com
api-versionqueryYesstringThe requested API version.

Request Header

Use either token based authentication or API key. Authenticating with token based authentication is recommended and more secure.
NameRequiredTypeDescription
AuthorizationTruestringExample: Authorization: Bearer {Azure_OpenAI_Auth_Token}

To generate an auth token using Azure CLI: az account get-access-token --resource https://cognitiveservices.azure.com

Type: oauth2
Authorization Url: https://login.microsoftonline.com/common/oauth2/v2.0/authorize
scope: https://ai.azure.com/.default
api-keyTruestringProvide Azure OpenAI API key here

Request Body

Content-Type: multipart/form-data
NameTypeDescriptionRequiredDefault
anchorstringDefines the anchor relative to what time the absolute expiration should be generated from.No
secondsintegerGets the relative expiration time in seconds.
Range: [1209600 - 2592000].No
filestringGets or sets the file to upload into Azure OpenAI.Yes
purposestringThe intended purpose of the uploaded documents. Use “fine-tune” for fine-tuning. This allows us to validate the format of the uploaded file.Yes

Responses

Status Code: 201 Description: The file has been successfully created.
Content-TypeTypeDescription
application/jsonFile
Status Code: default Description: An error occurred.
Content-TypeTypeDescription
application/jsonErrorResponse

Examples

POST {endpoint}/openai/files?api-version=2025-04-01-preview

Responses: Status Code: 201
{
  "headers": {
    "location": "https://aoairesource.openai.azure.com/openai/files/file-181a1cbdcdcf4677ada87f63a0928099"
  },
  "body": {
    "status": "pending",
    "purpose": "fine-tune",
    "filename": "puppy.jsonl",
    "id": "file-181a1cbdcdcf4677ada87f63a0928099",
    "created_at": 1646126127,
    "object": "file"
  }
}

Files - Import

POST {endpoint}/openai/files/import?api-version=2025-04-01-preview
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.

URI Parameters

NameInRequiredTypeDescription
endpointpathYesstring
url
Supported Azure OpenAI endpoints (protocol and hostname, for example: https://aoairesource.openai.azure.com. Replace “aoairesource” with your Azure OpenAI resource name). https://{your-resource-name}.openai.azure.com
api-versionqueryYesstringThe requested API version.

Request Header

Use either token based authentication or API key. Authenticating with token based authentication is recommended and more secure.
NameRequiredTypeDescription
AuthorizationTruestringExample: Authorization: Bearer {Azure_OpenAI_Auth_Token}

To generate an auth token using Azure CLI: az account get-access-token --resource https://cognitiveservices.azure.com

Type: oauth2
Authorization Url: https://login.microsoftonline.com/common/oauth2/v2.0/authorize
scope: https://ai.azure.com/.default
api-keyTruestringProvide Azure OpenAI API key here

Request Body

Content-Type: application/json
NameTypeDescriptionRequiredDefault
content_urlstringThe url to download the document from (can be SAS url of a blob or any other external url accessible with a GET request).Yes
expires_afterFileExpiresAfterDefines an expiration for the file.No
filenamestringThe name of the JSON Lines file to be uploaded.
If the purpose is set to “fine-tune”, each line is a JSON record with “prompt” and “completion” fields representing your training examples.Yes
purposePurposeThe intended purpose of the uploaded documents. Use “fine-tune” for fine-tuning. This allows us to validate the format of the uploaded file.Yes

Responses

Status Code: 201 Description: The file has been successfully created.
Content-TypeTypeDescription
application/jsonFile
Status Code: default Description: An error occurred.
Content-TypeTypeDescription
application/jsonErrorResponse

Examples

POST {endpoint}/openai/files/import?api-version=2025-04-01-preview

Responses: Status Code: 201
{
  "headers": {
    "location": "https://aoairesource.openai.azure.com/openai/files/file-181a1cbdcdcf4677ada87f63a0928099"
  },
  "body": {
    "status": "pending",
    "purpose": "fine-tune",
    "filename": "puppy.jsonl",
    "id": "file-181a1cbdcdcf4677ada87f63a0928099",
    "created_at": 1646126127,
    "object": "file"
  }
}

Files - Get

GET {endpoint}/openai/files/{file-id}?api-version=2025-04-01-preview
Gets details for a single file specified by the given file-id including status, size, purpose, etc.

URI Parameters

NameInRequiredTypeDescription
endpointpathYesstring
url
Supported Azure OpenAI endpoints (protocol and hostname, for example: https://aoairesource.openai.azure.com. Replace “aoairesource” with your Azure OpenAI resource name). https://{your-resource-name}.openai.azure.com
file-idpathYesstringThe identifier of the file.
api-versionqueryYesstringThe requested API version.

Request Header

Use either token based authentication or API key. Authenticating with token based authentication is recommended and more secure.
NameRequiredTypeDescription
AuthorizationTruestringExample: Authorization: Bearer {Azure_OpenAI_Auth_Token}

To generate an auth token using Azure CLI: az account get-access-token --resource https://cognitiveservices.azure.com

Type: oauth2
Authorization Url: https://login.microsoftonline.com/common/oauth2/v2.0/authorize
scope: https://ai.azure.com/.default
api-keyTruestringProvide Azure OpenAI API key here

Responses

Status Code: 200 Description: Success
Content-TypeTypeDescription
application/jsonFile
Status Code: default Description: An error occurred.
Content-TypeTypeDescription
application/jsonErrorResponse

Examples

GET {endpoint}/openai/files/{file-id}?api-version=2025-04-01-preview

Responses: Status Code: 200
{
  "headers": {},
  "body": {
    "status": "processed",
    "bytes": 140,
    "purpose": "fine-tune",
    "filename": "puppy.jsonl",
    "id": "file-181a1cbdcdcf4677ada87f63a0928099",
    "created_at": 1646126127,
    "object": "file"
  }
}

Files - Delete

DELETE {endpoint}/openai/files/{file-id}?api-version=2025-04-01-preview
Deletes the file with the given file-id. Deletion is also allowed if a file was used, e.g., as training file in a fine-tuning job.

URI Parameters

NameInRequiredTypeDescription
endpointpathYesstring
url
Supported Azure OpenAI endpoints (protocol and hostname, for example: https://aoairesource.openai.azure.com. Replace “aoairesource” with your Azure OpenAI resource name). https://{your-resource-name}.openai.azure.com
file-idpathYesstringThe identifier of the file.
api-versionqueryYesstringThe requested API version.

Request Header

Use either token based authentication or API key. Authenticating with token based authentication is recommended and more secure.
NameRequiredTypeDescription
AuthorizationTruestringExample: Authorization: Bearer {Azure_OpenAI_Auth_Token}

To generate an auth token using Azure CLI: az account get-access-token --resource https://cognitiveservices.azure.com

Type: oauth2
Authorization Url: https://login.microsoftonline.com/common/oauth2/v2.0/authorize
scope: https://ai.azure.com/.default
api-keyTruestringProvide Azure OpenAI API key here

Responses

Status Code: 200 Description: The file was successfully deleted.
Content-TypeTypeDescription
application/jsonFileDelete
Status Code: default Description: An error occurred.
Content-TypeTypeDescription
application/jsonErrorResponse

Examples

DELETE {endpoint}/openai/files/{file-id}?api-version=2025-04-01-preview

Responses: Status Code: 200
{
  "headers": {},
  "body": {
    "object": "file",
    "deleted": true,
    "id": "file-181a1cbdcdcf4677ada87f63a0928099"
  }
}

Files - Get content

GET {endpoint}/openai/files/{file-id}/content?api-version=2025-04-01-preview
Gets the content of the file specified by the given file-id. Files can be user uploaded content or generated by the service like result metrics of a fine-tuning job.

URI Parameters

NameInRequiredTypeDescription
endpointpathYesstring
url
Supported Azure OpenAI endpoints (protocol and hostname, for example: https://aoairesource.openai.azure.com. Replace “aoairesource” with your Azure OpenAI resource name). https://{your-resource-name}.openai.azure.com
file-idpathYesstringThe identifier of the file.
api-versionqueryYesstringThe requested API version.

Request Header

Use either token based authentication or API key. Authenticating with token based authentication is recommended and more secure.
NameRequiredTypeDescription
AuthorizationTruestringExample: Authorization: Bearer {Azure_OpenAI_Auth_Token}

To generate an auth token using Azure CLI: az account get-access-token --resource https://cognitiveservices.azure.com

Type: oauth2
Authorization Url: https://login.microsoftonline.com/common/oauth2/v2.0/authorize
scope: https://ai.azure.com/.default
api-keyTruestringProvide Azure OpenAI API key here

Responses

Status Code: 200 Description: Success
Content-TypeTypeDescription
application/octet-streamstring
application/jsonstring
Status Code: default Description: An error occurred.
Content-TypeTypeDescription
application/octet-streamErrorResponse
application/jsonErrorResponse

Examples

GET {endpoint}/openai/files/{file-id}/content?api-version=2025-04-01-preview

Responses: Status Code: 200
{
  "headers": {},
  "body": "raw file content"
}

Fine-tuning - List

GET {endpoint}/openai/fine_tuning/jobs?api-version=2025-04-01-preview
Gets a list of all fine-tuning jobs owned by the Azure OpenAI resource.The details that are returned for each fine-tuning job contain besides its identifier the base model, training and validation files, hyper parameters, time stamps, status and events. Events are created when the job status changes. For example, running or complete, and when results are uploaded.

URI Parameters

NameInRequiredTypeDescription
endpointpathYesstring
url
Supported Azure OpenAI endpoints (protocol and hostname, for example: https://aoairesource.openai.azure.com. Replace “aoairesource” with your Azure OpenAI resource name). https://{your-resource-name}.openai.azure.com
afterqueryNostringIdentifier for the last event from the previous pagination request.
limitqueryNointegerNumber of events to retrieve. Defaults to 20.
api-versionqueryYesstringThe requested API version.

Request Header

Use either token based authentication or API key. Authenticating with token based authentication is recommended and more secure.
NameRequiredTypeDescription
AuthorizationTruestringExample: Authorization: Bearer {Azure_OpenAI_Auth_Token}

To generate an auth token using Azure CLI: az account get-access-token --resource https://cognitiveservices.azure.com

Type: oauth2
Authorization Url: https://login.microsoftonline.com/common/oauth2/v2.0/authorize
scope: https://ai.azure.com/.default
api-keyTruestringProvide Azure OpenAI API key here

Responses

Status Code: 200 Description: Success
Content-TypeTypeDescription
application/jsonFineTuningJobList
Status Code: default Description: An error occurred.
Content-TypeTypeDescription
application/jsonErrorResponse

Examples

GET {endpoint}/openai/fine_tuning/jobs?api-version=2025-04-01-preview

Responses: Status Code: 200
{
  "headers": {},
  "body": {
    "has_more": false,
    "data": [
      {
        "hyperparameters": {
          "n_epochs": -1
        },
        "integrations": [
          {
            "type": "wandb",
            "wandb": {
              "project": "custom-wandb-project",
              "tags": [
                "project:tag",
                "lineage"
              ]
            }
          }
        ],
        "method": {
          "type": "supervised"
        },
        "status": "succeeded",
        "model": "curie",
        "fine_tuned_model": "curie.ft-72a2792ef7d24ba7b82c7fe4a37e379f",
        "training_file": "file-181a1cbdcdcf4677ada87f63a0928099",
        "result_files": [
          "file-181a1cbdcdcf4677ada87f63a0928099"
        ],
        "finished_at": 1646127311,
        "trained_tokens": 2342,
        "id": "ft-72a2792ef7d24ba7b82c7fe4a37e379f",
        "created_at": 1646126127,
        "object": "fine_tuning.job"
      }
    ],
    "object": "list"
  }
}

Fine-tuning - Create

POST {endpoint}/openai/fine_tuning/jobs?api-version=2025-04-01-preview
Creates a job that fine-tunes a specified model from a given training file. Response includes details of the enqueued job including job status and hyper parameters. The name of the fine-tuned model is added to the response once complete.

URI Parameters

NameInRequiredTypeDescription
endpointpathYesstring
url
Supported Azure OpenAI endpoints (protocol and hostname, for example: https://aoairesource.openai.azure.com. Replace “aoairesource” with your Azure OpenAI resource name). https://{your-resource-name}.openai.azure.com
api-versionqueryYesstringThe requested API version.

Request Header

Use either token based authentication or API key. Authenticating with token based authentication is recommended and more secure.
NameRequiredTypeDescription
AuthorizationTruestringExample: Authorization: Bearer {Azure_OpenAI_Auth_Token}

To generate an auth token using Azure CLI: az account get-access-token --resource https://cognitiveservices.azure.com

Type: oauth2
Authorization Url: https://login.microsoftonline.com/common/oauth2/v2.0/authorize
scope: https://ai.azure.com/.default
api-keyTruestringProvide Azure OpenAI API key here

Request Body

Content-Type: application/json
NameTypeDescriptionRequiredDefault
hyperparametersFineTuningHyperParametersThe hyper parameter settings used in a fine tune job.No
integrationsarrayA list of configurations for integrations supporting the fine-tuning job. There are many integrations planned, so make sure to check and act on the integration type.No
methodobjectMethod used for supervised fine-tuningNo
└─ typeFineTuningMethodTypeNo
modelstringThe identifier (model-id) of the base model used for this fine-tune.Yes
seedintegerThe seed used for the fine-tuning job. Passing in the same seed and job parameters should produce the same results, but may differ in rare cases. If a seed isn’t specified, one will be generated for you.No
suffixstringThe suffix used to identify the fine-tuned model. The suffix can contain up to 40 characters (a-z, A-Z, 0-9,- and _) that will be added to your fine-tuned model name.No
training_filestringThe file identity (file-id) that is used for training this fine tuned model.Yes
validation_filestringThe file identity (file-id) that is used to evaluate the fine tuned model during training.No

Responses

Status Code: 201 Description: The fine tune has been successfully created.
Content-TypeTypeDescription
application/jsonFineTuningJob
Status Code: default Description: An error occurred.
Content-TypeTypeDescription
application/jsonErrorResponse

Examples

POST {endpoint}/openai/fine_tuning/jobs?api-version=2025-04-01-preview

Responses: Status Code: 201
{
  "headers": {
    "location": "https://aoairesource.openai.azure.com/openai/fine_tuning/jobs/ft-72a2792ef7d24ba7b82c7fe4a37e379f"
  },
  "body": {
    "hyperparameters": {
      "n_epochs": -1
    },
    "integrations": [
      {
        "type": "wandb",
        "wandb": {
          "project": "custom-wandb-project",
          "tags": [
            "project:tag",
            "lineage"
          ]
        }
      }
    ],
    "method": {
      "type": "supervised"
    },
    "status": "pending",
    "model": "curie",
    "training_file": "file-181a1cbdcdcf4677ada87f63a0928099",
    "id": "ft-72a2792ef7d24ba7b82c7fe4a37e379f",
    "created_at": 1646126127,
    "object": "fine_tuning.job"
  }
}

Fine-tuning - Get

GET {endpoint}/openai/fine_tuning/jobs/{fine-tuning-job-id}?api-version=2025-04-01-preview
Gets details for a single fine-tuning job specified by the given fine-tune-id. The details contain the base model, training and validation files, hyper parameters, time stamps, status and events. Events are created when the job status changes, e.g. running or complete, and when results are uploaded.

URI Parameters

NameInRequiredTypeDescription
endpointpathYesstring
url
Supported Azure OpenAI endpoints (protocol and hostname, for example: https://aoairesource.openai.azure.com. Replace “aoairesource” with your Azure OpenAI resource name). https://{your-resource-name}.openai.azure.com
fine-tuning-job-idpathYesstringThe identifier of the fine-tuning job.
api-versionqueryYesstringThe requested API version.

Request Header

Use either token based authentication or API key. Authenticating with token based authentication is recommended and more secure.
NameRequiredTypeDescription
AuthorizationTruestringExample: Authorization: Bearer {Azure_OpenAI_Auth_Token}

To generate an auth token using Azure CLI: az account get-access-token --resource https://cognitiveservices.azure.com

Type: oauth2
Authorization Url: https://login.microsoftonline.com/common/oauth2/v2.0/authorize
scope: https://ai.azure.com/.default
api-keyTruestringProvide Azure OpenAI API key here

Responses

Status Code: 200 Description: Success
Content-TypeTypeDescription
application/jsonFineTuningJob
Status Code: default Description: An error occurred.
Content-TypeTypeDescription
application/jsonErrorResponse

Examples

GET {endpoint}/openai/fine_tuning/jobs/{fine-tuning-job-id}?api-version=2025-04-01-preview

Responses: Status Code: 200
{
  "headers": {},
  "body": {
    "hyperparameters": {
      "n_epochs": -1
    },
    "integrations": [
      {
        "type": "wandb",
        "wandb": {
          "project": "custom-wandb-project",
          "tags": [
            "project:tag",
            "lineage"
          ]
        }
      }
    ],
    "method": {
      "type": "supervised"
    },
    "status": "succeeded",
    "model": "curie",
    "fine_tuned_model": "curie.ft-72a2792ef7d24ba7b82c7fe4a37e379f",
    "training_file": "file-181a1cbdcdcf4677ada87f63a0928099",
    "result_files": [
      "file-181a1cbdcdcf4677ada87f63a0928099"
    ],
    "finished_at": 1646127311,
    "trained_tokens": 2342,
    "id": "ft-72a2792ef7d24ba7b82c7fe4a37e379f",
    "created_at": 1646126127,
    "object": "fine_tuning.job"
  }
}

Fine-tuning - Delete

DELETE {endpoint}/openai/fine_tuning/jobs/{fine-tuning-job-id}?api-version=2025-04-01-preview
Deletes the fine-tuning job specified by the given fine-tune-id.

URI Parameters

NameInRequiredTypeDescription
endpointpathYesstring
url
Supported Azure OpenAI endpoints (protocol and hostname, for example: https://aoairesource.openai.azure.com. Replace “aoairesource” with your Azure OpenAI resource name). https://{your-resource-name}.openai.azure.com
fine-tuning-job-idpathYesstringThe identifier of the fine-tuning job.
api-versionqueryYesstringThe requested API version.

Request Header

Use either token based authentication or API key. Authenticating with token based authentication is recommended and more secure.
NameRequiredTypeDescription
AuthorizationTruestringExample: Authorization: Bearer {Azure_OpenAI_Auth_Token}

To generate an auth token using Azure CLI: az account get-access-token --resource https://cognitiveservices.azure.com

Type: oauth2
Authorization Url: https://login.microsoftonline.com/common/oauth2/v2.0/authorize
scope: https://ai.azure.com/.default
api-keyTruestringProvide Azure OpenAI API key here

Responses

Status Code: 204 Description: The fine tune was successfully deleted. Status Code: default Description: An error occurred.
Content-TypeTypeDescription
application/jsonErrorResponse

Examples

DELETE {endpoint}/openai/fine_tuning/jobs/{fine-tuning-job-id}?api-version=2025-04-01-preview

Responses: Status Code: 204
{
  "headers": {}
}

Fine-tuning - Cancel

POST {endpoint}/openai/fine_tuning/jobs/{fine-tuning-job-id}/cancel?api-version=2025-04-01-preview
Cancels the processing of the fine-tuning job specified by the given fine-tune-id.

URI Parameters

NameInRequiredTypeDescription
endpointpathYesstring
url
Supported Azure OpenAI endpoints (protocol and hostname, for example: https://aoairesource.openai.azure.com. Replace “aoairesource” with your Azure OpenAI resource name). https://{your-resource-name}.openai.azure.com
fine-tuning-job-idpathYesstringThe identifier of the fine-tuning job.
api-versionqueryYesstringThe requested API version.

Request Header

Use either token based authentication or API key. Authenticating with token based authentication is recommended and more secure.
NameRequiredTypeDescription
AuthorizationTruestringExample: Authorization: Bearer {Azure_OpenAI_Auth_Token}

To generate an auth token using Azure CLI: az account get-access-token --resource https://cognitiveservices.azure.com

Type: oauth2
Authorization Url: https://login.microsoftonline.com/common/oauth2/v2.0/authorize
scope: https://ai.azure.com/.default
api-keyTruestringProvide Azure OpenAI API key here

Responses

Status Code: 200 Description: The fine tune has been successfully canceled
Content-TypeTypeDescription
application/jsonFineTuningJob
Status Code: default Description: An error occurred.
Content-TypeTypeDescription
application/jsonErrorResponse

Examples

POST {endpoint}/openai/fine_tuning/jobs/{fine-tuning-job-id}/cancel?api-version=2025-04-01-preview

Responses: Status Code: 200
{
  "headers": {},
  "body": {
    "hyperparameters": {
      "n_epochs": -1
    },
    "integrations": [
      {
        "type": "wandb",
        "wandb": {
          "project": "custom-wandb-project",
          "tags": [
            "project:tag",
            "lineage"
          ]
        }
      }
    ],
    "method": {
      "type": "supervised"
    },
    "status": "cancelled",
    "model": "curie",
    "training_file": "file-181a1cbdcdcf4677ada87f63a0928099",
    "finished_at": 1646127311,
    "id": "ft-72a2792ef7d24ba7b82c7fe4a37e379f",
    "created_at": 1646126127,
    "object": "fine_tuning.job"
  }
}

Fine-tuning - Get checkpoints

GET {endpoint}/openai/fine_tuning/jobs/{fine-tuning-job-id}/checkpoints?api-version=2025-04-01-preview
Gets the checkpoints for the fine-tuning job specified by the given fine-tune-id. Checkpoints are created at the end of successful epochs during training.

URI Parameters

NameInRequiredTypeDescription
endpointpathYesstring
url
Supported Azure OpenAI endpoints (protocol and hostname, for example: https://aoairesource.openai.azure.com. Replace “aoairesource” with your Azure OpenAI resource name). https://{your-resource-name}.openai.azure.com
fine-tuning-job-idpathYesstringThe identifier of the fine-tuning job.
afterqueryNostringIdentifier for the last checkpoint ID from the previous pagination request.
limitqueryNointegerNumber of checkpoints to retrieve. Defaults to 10.
api-versionqueryYesstringThe requested API version.

Request Header

Use either token based authentication or API key. Authenticating with token based authentication is recommended and more secure.
NameRequiredTypeDescription
AuthorizationTruestringExample: Authorization: Bearer {Azure_OpenAI_Auth_Token}

To generate an auth token using Azure CLI: az account get-access-token --resource https://cognitiveservices.azure.com

Type: oauth2
Authorization Url: https://login.microsoftonline.com/common/oauth2/v2.0/authorize
scope: https://ai.azure.com/.default
api-keyTruestringProvide Azure OpenAI API key here

Responses

Status Code: 200 Description: Success
Content-TypeTypeDescription
application/jsonFineTuningJobCheckpointList
Status Code: default Description: An error occurred.
Content-TypeTypeDescription
application/jsonErrorResponse

Examples

GET {endpoint}/openai/fine_tuning/jobs/{fine-tuning-job-id}/checkpoints?api-version=2025-04-01-preview

Responses: Status Code: 200
{
  "headers": {},
  "body": {
    "has_more": false,
    "data": [
      {
        "id": "ftckpt_qtZ5Gyk4BLq1SfLFWp3RtO3P",
        "created_at": 1646126127,
        "fine_tuned_model_checkpoint": "gpt-35-turbo-0613.ft-72a2792ef7d24ba7b82c7fe4a37e379f:ckpt-step-10",
        "step_number": 10,
        "metrics": {
          "step": 10,
          "train_loss": 0.478,
          "train_mean_token_accuracy": 0.924,
          "valid_loss": 10.112,
          "valid_mean_token_accuracy": 0.145,
          "full_valid_loss": 0.567,
          "full_valid_mean_token_accuracy": 0.944
        },
        "fine_tuning_job_id": "ftjob-72a2792ef7d24ba7b82c7fe4a37e379f",
        "object": "fine_tuning.job.checkpoint"
      },
      {
        "id": "ftckpt_frtXDR2453C4FG67t03MLPs5",
        "created_at": 1646126137,
        "fine_tuned_model_checkpoint": "gpt-35-turbo-0613.ft-72a2792ef7d24ba7b82c7fe4a37e379f:ckpt-step-20",
        "step_number": 20,
        "metrics": {
          "step": 20,
          "train_loss": 0.355,
          "train_mean_token_accuracy": 0.947,
          "valid_loss": 11.32,
          "valid_mean_token_accuracy": 0.122,
          "full_valid_loss": 0.317,
          "full_valid_mean_token_accuracy": 0.955
        },
        "fine_tuning_job_id": "ftjob-72a2792ef7d24ba7b82c7fe4a37e379f",
        "object": "fine_tuning.job.checkpoint"
      },
      {
        "id": "ftckpt_agLk6Gio560ORp14gl123fgd",
        "created_at": 1646126147,
        "fine_tuned_model_checkpoint": "gpt-35-turbo-0613.ft-72a2792ef7d24ba7b82c7fe4a37e379f:ckpt-step-30",
        "step_number": 30,
        "metrics": {
          "step": 30,
          "train_loss": 0.155,
          "train_mean_token_accuracy": 0.975,
          "valid_loss": 9.31,
          "valid_mean_token_accuracy": 0.092,
          "full_valid_loss": 0.114,
          "full_valid_mean_token_accuracy": 0.963
        },
        "fine_tuning_job_id": "ftjob-72a2792ef7d24ba7b82c7fe4a37e379f",
        "object": "fine_tuning.job.checkpoint"
      }
    ],
    "object": "list"
  }
}

Fine-tuning - Get events

GET {endpoint}/openai/fine_tuning/jobs/{fine-tuning-job-id}/events?api-version=2025-04-01-preview
Gets the events for the fine-tuning job specified by the given fine-tune-id. Events are created when the job status changes, e.g. running or complete, and when results are uploaded.

URI Parameters

NameInRequiredTypeDescription
endpointpathYesstring
url
Supported Azure OpenAI endpoints (protocol and hostname, for example: https://aoairesource.openai.azure.com. Replace “aoairesource” with your Azure OpenAI resource name). https://{your-resource-name}.openai.azure.com
fine-tuning-job-idpathYesstringThe identifier of the fine-tuning job.
afterqueryNostringIdentifier for the last event from the previous pagination request.
limitqueryNointegerNumber of events to retrieve. Defaults to 20.
api-versionqueryYesstringThe requested API version.

Request Header

Use either token based authentication or API key. Authenticating with token based authentication is recommended and more secure.
NameRequiredTypeDescription
AuthorizationTruestringExample: Authorization: Bearer {Azure_OpenAI_Auth_Token}

To generate an auth token using Azure CLI: az account get-access-token --resource https://cognitiveservices.azure.com

Type: oauth2
Authorization Url: https://login.microsoftonline.com/common/oauth2/v2.0/authorize
scope: https://ai.azure.com/.default
api-keyTruestringProvide Azure OpenAI API key here

Responses

Status Code: 200 Description: Success
Content-TypeTypeDescription
application/jsonFineTuningJobEventList
Status Code: default Description: An error occurred.
Content-TypeTypeDescription
application/jsonErrorResponse

Examples

GET {endpoint}/openai/fine_tuning/jobs/{fine-tuning-job-id}/events?api-version=2025-04-01-preview

Responses: Status Code: 200
{
  "headers": {},
  "body": {
    "has_more": false,
    "data": [
      {
        "id": "ftevent-363dcd7cb4c74539bc53293c1dceef05",
        "created_at": 1646126127,
        "level": "info",
        "message": "Job enqueued. Waiting for jobs ahead to complete.",
        "type": "message",
        "object": "fine_tuning.job.event"
      },
      {
        "id": "ftevent-8c2a44999790437cb3230e543fa2cf0f",
        "created_at": 1646126169,
        "level": "info",
        "message": "Job started.",
        "type": "message",
        "object": "fine_tuning.job.event"
      },
      {
        "id": "ftevent-2d47d651d2f3484c8187c88c00078147",
        "created_at": 1646126192,
        "level": "info",
        "message": "Job succeeded.",
        "type": "message",
        "object": "fine_tuning.job.event"
      }
    ],
    "object": "list"
  }
}

Fine-tuning - Pause

POST {endpoint}/openai/fine_tuning/jobs/{fine-tuning-job-id}/pause?api-version=2025-04-01-preview
Pausing the processing of the fine-tuning job specified by the given fine-tune-id.

URI Parameters

NameInRequiredTypeDescription
endpointpathYesstring
url
Supported Azure OpenAI endpoints (protocol and hostname, for example: https://aoairesource.openai.azure.com. Replace “aoairesource” with your Azure OpenAI resource name). https://{your-resource-name}.openai.azure.com
fine-tuning-job-idpathYesstringThe identifier of the fine-tuning job.
api-versionqueryYesstringThe requested API version.

Request Header

Use either token based authentication or API key. Authenticating with token based authentication is recommended and more secure.
NameRequiredTypeDescription
AuthorizationTruestringExample: Authorization: Bearer {Azure_OpenAI_Auth_Token}

To generate an auth token using Azure CLI: az account get-access-token --resource https://cognitiveservices.azure.com

Type: oauth2
Authorization Url: https://login.microsoftonline.com/common/oauth2/v2.0/authorize
scope: https://ai.azure.com/.default
api-keyTruestringProvide Azure OpenAI API key here

Responses

Status Code: 200 Description: The fine tune has been successfully paused.
Content-TypeTypeDescription
application/jsonFineTuningJob
Status Code: default Description: An error occurred.
Content-TypeTypeDescription
application/jsonErrorResponse

Examples

POST {endpoint}/openai/fine_tuning/jobs/{fine-tuning-job-id}/pause?api-version=2025-04-01-preview

Responses: Status Code: 200
{
  "headers": {},
  "body": {
    "hyperparameters": {
      "n_epochs": -1
    },
    "integrations": [
      {
        "type": "wandb",
        "wandb": {
          "project": "custom-wandb-project",
          "tags": [
            "project:tag",
            "lineage"
          ]
        }
      }
    ],
    "method": {
      "type": "supervised"
    },
    "status": "paused",
    "model": "curie",
    "training_file": "file-181a1cbdcdcf4677ada87f63a0928099",
    "finished_at": 1646127311,
    "id": "ft-72a2792ef7d24ba7b82c7fe4a37e379f",
    "created_at": 1646126127,
    "object": "fine_tuning.job"
  }
}

Fine-tuning - Resume

POST {endpoint}/openai/fine_tuning/jobs/{fine-tuning-job-id}/resume?api-version=2025-04-01-preview
Resumes the processing of the fine-tuning job specified by the given fine-tune-id.

URI Parameters

NameInRequiredTypeDescription
endpointpathYesstring
url
Supported Azure OpenAI endpoints (protocol and hostname, for example: https://aoairesource.openai.azure.com. Replace “aoairesource” with your Azure OpenAI resource name). https://{your-resource-name}.openai.azure.com
fine-tuning-job-idpathYesstringThe identifier of the fine-tuning job.
api-versionqueryYesstringThe requested API version.

Request Header

Use either token based authentication or API key. Authenticating with token based authentication is recommended and more secure.
NameRequiredTypeDescription
AuthorizationTruestringExample: Authorization: Bearer {Azure_OpenAI_Auth_Token}

To generate an auth token using Azure CLI: az account get-access-token --resource https://cognitiveservices.azure.com

Type: oauth2
Authorization Url: https://login.microsoftonline.com/common/oauth2/v2.0/authorize
scope: https://ai.azure.com/.default
api-keyTruestringProvide Azure OpenAI API key here

Responses

Status Code: 200 Description: The fine tune has been successfully resumed.
Content-TypeTypeDescription
application/jsonFineTuningJob
Status Code: default Description: An error occurred.
Content-TypeTypeDescription
application/jsonErrorResponse

Examples

POST {endpoint}/openai/fine_tuning/jobs/{fine-tuning-job-id}/resume?api-version=2025-04-01-preview

Responses: Status Code: 200
{
  "headers": {},
  "body": {
    "hyperparameters": {
      "n_epochs": -1
    },
    "integrations": [
      {
        "type": "wandb",
        "wandb": {
          "project": "custom-wandb-project",
          "tags": [
            "project:tag",
            "lineage"
          ]
        }
      }
    ],
    "method": {
      "type": "supervised"
    },
    "status": "resuming",
    "model": "curie",
    "training_file": "file-181a1cbdcdcf4677ada87f63a0928099",
    "finished_at": 1646127311,
    "id": "ft-72a2792ef7d24ba7b82c7fe4a37e379f",
    "created_at": 1646126127,
    "object": "fine_tuning.job"
  }
}

Ingestion jobs - List

GET {endpoint}/openai/ingestion/jobs?api-version=2025-04-01-preview
Lists the ingestion jobs.

URI Parameters

NameInRequiredTypeDescription
endpointpathYesstring
url
Supported Azure OpenAI endpoints (protocol and hostname, for example: https://aoairesource.openai.azure.com. Replace “aoairesource” with your Azure OpenAI resource name). https://{your-resource-name}.openai.azure.com
api-versionqueryYesstringThe requested API version.
mgmt-user-tokenheaderNostringThe token used to access the workspace (needed only for user compute jobs).

Request Header

Use either token based authentication or API key. Authenticating with token based authentication is recommended and more secure.
NameRequiredTypeDescription
AuthorizationTruestringExample: Authorization: Bearer {Azure_OpenAI_Auth_Token}

To generate an auth token using Azure CLI: az account get-access-token --resource https://cognitiveservices.azure.com

Type: oauth2
Authorization Url: https://login.microsoftonline.com/common/oauth2/v2.0/authorize
scope: https://ai.azure.com/.default
api-keyTruestringProvide Azure OpenAI API key here

Responses

Status Code: 200 Description: Success
Content-TypeTypeDescription
application/jsonIngestionJobList
Status Code: default Description: An error occurred.
Content-TypeTypeDescription
application/jsonErrorResponse

Examples

GET {endpoint}/openai/ingestion/jobs?api-version=2025-04-01-preview

Responses: Status Code: 200
{
  "body": {
    "value": [
      {
        "jobId": "usercompute-ingestion-job",
        "kind": "UserCompute",
        "workspaceId": "/subscriptions/f375b912-331c-4fc5-8e9f-2d7205e3e036/resourceGroups/adrama-copilot-demo/providers/Microsoft.MachineLearningServices/workspaces/adrama-rag-dev"
      },
      {
        "jobId": "syscompute-ingestion-job",
        "kind": "SystemCompute"
      }
    ]
  }
}

Ingestion jobs - Create

PUT {endpoint}/openai/ingestion/jobs/{job-id}?api-version=2025-04-01-preview
Creates an ingestion job with the specified job id.

URI Parameters

NameInRequiredTypeDescription
endpointpathYesstring
url
Supported Azure OpenAI endpoints (protocol and hostname, for example: https://aoairesource.openai.azure.com. Replace “aoairesource” with your Azure OpenAI resource name). https://{your-resource-name}.openai.azure.com
api-versionqueryYesstringThe requested API version.
job-idpathYesstringThe id of the job that will be created.
mgmt-user-tokenheaderNostringThe token used to access the workspace (needed only for user compute jobs).
aml-user-tokenheaderNostringThe token used to access the resources within the job in the workspace (needed only for user compute jobs).

Request Header

Use either token based authentication or API key. Authenticating with token based authentication is recommended and more secure.
NameRequiredTypeDescription
AuthorizationTruestringExample: Authorization: Bearer {Azure_OpenAI_Auth_Token}

To generate an auth token using Azure CLI: az account get-access-token --resource https://cognitiveservices.azure.com

Type: oauth2
Authorization Url: https://login.microsoftonline.com/common/oauth2/v2.0/authorize
scope: https://ai.azure.com/.default
api-keyTruestringProvide Azure OpenAI API key here

Request Body

Content-Type: application/json
NameTypeDescriptionRequiredDefault
jobIdstringNo
kindIngestionJobTypeThe job type.Yes

Responses

Status Code: 200 Description: Success
Content-TypeTypeDescription
application/jsonIngestionJob
Status Code: default Description: An error occurred.
Content-TypeTypeDescription
application/jsonErrorResponse

Examples

PUT {endpoint}/openai/ingestion/jobs/{job-id}?api-version=2025-04-01-preview

Responses: Status Code: 200
{
  "headers": {
    "operation-location": "https://aoairesource.openai.azure.com/openai/ingestion/jobs/ingestion-job/runs/72a2792ef7d24ba7b82c7fe4a37e379f?api-version=2025-04-01-preview"
  },
  "body": {
    "kind": "SystemCompute",
    "jobId": "ingestion-job",
    "searchServiceConnection": {
      "kind": "EndpointWithManagedIdentity",
      "endpoint": "https://aykame-dev-search.search.windows.net"
    },
    "datasource": {
      "kind": "Storage",
      "connection": {
        "kind": "EndpointWithManagedIdentity",
        "endpoint": "https://mystorage.blob.core.windows.net/",
        "resourceId": "/subscriptions/1234567-abcd-1234-5678-1234abcd/resourceGroups/my-resource/providers/Microsoft.Storage/storageAccounts/mystorage"
      },
      "containerName": "container",
      "chunking": {
        "maxChunkSizeInTokens": 2048
      },
      "embeddings": [
        {
          "connection": {
            "kind": "RelativeConnection"
          },
          "deploymentName": "Ada"
        }
      ]
    },
    "dataRefreshIntervalInHours": 24,
    "completionAction": "keepAllAssets"
  }
}
PUT {endpoint}/openai/ingestion/jobs/{job-id}?api-version=2025-04-01-preview

Responses: Status Code: 200
{
  "headers": {
    "operation-location": "https://aoairesource.openai.azure.com/openai/ingestion/jobs/ingestion-job/runs/72a2792ef7d24ba7b82c7fe4a37e379f?api-version=2025-04-01-preview"
  },
  "body": {
    "kind": "UserCompute",
    "jobId": "ingestion-job",
    "workspaceId": "/subscriptions/f375b912-331c-4fc5-8e9f-2d7205e3e036/resourceGroups/adrama-copilot-demo/providers/Microsoft.MachineLearningServices/workspaces/adrama-rag-dev",
    "compute": {
      "kind": "ServerlessCompute"
    },
    "target": {
      "kind": "AzureAISearch",
      "connectionId": "/subscriptions/f375b912-331c-4fc5-8e9f-2d7205e3e036/resourceGroups/adrama-copilot-demo/providers/Microsoft.MachineLearningServices/workspaces/adrama-rag-dev/connections/search-connection"
    },
    "datasource": {
      "kind": "Dataset",
      "datasetId": "azureml://locations/centraluseuap/workspaces/83317fe6-efa6-4e4a-b020-d0edd11ec382/data/PlainText/versions/1",
      "datasetType": "uri_folder"
    }
  }
}

Ingestion jobs - Get

GET {endpoint}/openai/ingestion/jobs/{job-id}?api-version=2025-04-01-preview
Gets the details of the specified job id.

URI Parameters

NameInRequiredTypeDescription
endpointpathYesstring
url
Supported Azure OpenAI endpoints (protocol and hostname, for example: https://aoairesource.openai.azure.com. Replace “aoairesource” with your Azure OpenAI resource name). https://{your-resource-name}.openai.azure.com
api-versionqueryYesstringThe requested API version.
job-idpathYesstringThe id of the job.

Request Header

Use either token based authentication or API key. Authenticating with token based authentication is recommended and more secure.
NameRequiredTypeDescription
AuthorizationTruestringExample: Authorization: Bearer {Azure_OpenAI_Auth_Token}

To generate an auth token using Azure CLI: az account get-access-token --resource https://cognitiveservices.azure.com

Type: oauth2
Authorization Url: https://login.microsoftonline.com/common/oauth2/v2.0/authorize
scope: https://ai.azure.com/.default
api-keyTruestringProvide Azure OpenAI API key here

Responses

Status Code: 200 Description: Success
Content-TypeTypeDescription
application/jsonIngestionJob
Status Code: default Description: An error occurred.
Content-TypeTypeDescription
application/jsonErrorResponse

Examples

GET {endpoint}/openai/ingestion/jobs/{job-id}?api-version=2025-04-01-preview

Responses: Status Code: 200
{
  "body": {
    "kind": "UserCompute",
    "jobId": "ingestion-job",
    "workspaceId": "/subscriptions/f375b912-331c-4fc5-8e9f-2d7205e3e036/resourceGroups/adrama-copilot-demo/providers/Microsoft.MachineLearningServices/workspaces/adrama-rag-dev",
    "compute": {
      "kind": "ServerlessCompute"
    },
    "target": {
      "kind": "AzureAISearch",
      "connectionId": "/subscriptions/f375b912-331c-4fc5-8e9f-2d7205e3e036/resourceGroups/adrama-copilot-demo/providers/Microsoft.MachineLearningServices/workspaces/adrama-rag-dev/connections/search-connection"
    },
    "datasource": {
      "kind": "Dataset",
      "datasetId": "azureml://locations/centraluseuap/workspaces/83317fe6-efa6-4e4a-b020-d0edd11ec382/data/PlainText/versions/1",
      "datasetType": "uri_folder"
    }
  }
}

Ingestionjobruns - List

GET {endpoint}/openai/ingestion/jobs/{job-id}/runs?api-version=2025-04-01-preview
Lists the runs of the specified job id.

URI Parameters

NameInRequiredTypeDescription
endpointpathYesstring
url
Supported Azure OpenAI endpoints (protocol and hostname, for example: https://aoairesource.openai.azure.com. Replace “aoairesource” with your Azure OpenAI resource name). https://{your-resource-name}.openai.azure.com
api-versionqueryYesstringThe requested API version.
job-idpathYesstringThe id of the job.
mgmt-user-tokenheaderNostringThe token used to access the workspace (needed only for user compute jobs).

Request Header

Use either token based authentication or API key. Authenticating with token based authentication is recommended and more secure.
NameRequiredTypeDescription
AuthorizationTruestringExample: Authorization: Bearer {Azure_OpenAI_Auth_Token}

To generate an auth token using Azure CLI: az account get-access-token --resource https://cognitiveservices.azure.com

Type: oauth2
Authorization Url: https://login.microsoftonline.com/common/oauth2/v2.0/authorize
scope: https://ai.azure.com/.default
api-keyTruestringProvide Azure OpenAI API key here

Responses

Status Code: 200 Description: Success
Content-TypeTypeDescription
application/jsonIngestionJobRunList
Status Code: default Description: An error occurred.
Content-TypeTypeDescription
application/jsonErrorResponse

Examples

GET {endpoint}/openai/ingestion/jobs/{job-id}/runs?api-version=2025-04-01-preview

Responses: Status Code: 200
{
  "body": {
    "value": [
      {
        "jobId": "ingestion-job",
        "runId": "f375b912-331c-4fc5-8e9f-2d7205e3e036",
        "status": "succeeded"
      },
      {
        "jobId": "ingestion-job",
        "runId": "07f2d192-add7-4202-a2e3-858c2577f4fd",
        "status": "failed"
      },
      {
        "jobId": "ingestion-job",
        "runId": "5ef7a436-1147-4cbb-82e0-3d502bcc6a7b",
        "status": "running"
      }
    ]
  }
}

Ingestionjobruns - Get

GET {endpoint}/openai/ingestion/jobs/{job-id}/runs/{run-id}?api-version=2025-04-01-preview
Gets the details of the specified run id as part of the specified job id.

URI Parameters

NameInRequiredTypeDescription
endpointpathYesstring
url
Supported Azure OpenAI endpoints (protocol and hostname, for example: https://aoairesource.openai.azure.com. Replace “aoairesource” with your Azure OpenAI resource name). https://{your-resource-name}.openai.azure.com
api-versionqueryYesstringThe requested API version.
job-idpathYesstringThe id of the job.
run-idpathYesstringThe id of the run.
mgmt-user-tokenheaderNostringThe token used to access the workspace (needed only for user compute jobs).

Request Header

Use either token based authentication or API key. Authenticating with token based authentication is recommended and more secure.
NameRequiredTypeDescription
AuthorizationTruestringExample: Authorization: Bearer {Azure_OpenAI_Auth_Token}

To generate an auth token using Azure CLI: az account get-access-token --resource https://cognitiveservices.azure.com

Type: oauth2
Authorization Url: https://login.microsoftonline.com/common/oauth2/v2.0/authorize
scope: https://ai.azure.com/.default
api-keyTruestringProvide Azure OpenAI API key here

Responses

Status Code: 200 Description: Success
Content-TypeTypeDescription
application/jsonIngestionJobRun
Status Code: default Description: An error occurred.
Content-TypeTypeDescription
application/jsonErrorResponse

Examples

GET {endpoint}/openai/ingestion/jobs/{job-id}/runs/{run-id}?api-version=2025-04-01-preview

Responses: Status Code: 200
{
  "body": {
    "jobId": "ingestion-job",
    "runId": "5ef7a436-1147-4cbb-82e0-3d502bcc6a7b",
    "status": "running",
    "progress": {
      "stageProgress": [
        {
          "name": "Preprocessing",
          "totalItems": 14,
          "processedItems": 0,
          "state": "notRunning"
        },
        {
          "name": "Indexing",
          "state": "notRunning"
        }
      ]
    }
  }
}

Models - List

GET {endpoint}/openai/models?api-version=2025-04-01-preview
Gets a list of all models that are accessible by the Azure OpenAI resource. These include base models as well as all successfully completed fine-tuned models owned by the Azure OpenAI resource.

URI Parameters

NameInRequiredTypeDescription
endpointpathYesstring
url
Supported Azure OpenAI endpoints (protocol and hostname, for example: https://aoairesource.openai.azure.com. Replace “aoairesource” with your Azure OpenAI resource name). https://{your-resource-name}.openai.azure.com
api-versionqueryYesstringThe requested API version.

Request Header

Use either token based authentication or API key. Authenticating with token based authentication is recommended and more secure.
NameRequiredTypeDescription
AuthorizationTruestringExample: Authorization: Bearer {Azure_OpenAI_Auth_Token}

To generate an auth token using Azure CLI: az account get-access-token --resource https://cognitiveservices.azure.com

Type: oauth2
Authorization Url: https://login.microsoftonline.com/common/oauth2/v2.0/authorize
scope: https://ai.azure.com/.default
api-keyTruestringProvide Azure OpenAI API key here

Responses

Status Code: 200 Description: Success
Content-TypeTypeDescription
application/jsonModelList
Status Code: default Description: An error occurred.
Content-TypeTypeDescription
application/jsonErrorResponse

Examples

GET {endpoint}/openai/models?api-version=2025-04-01-preview

Responses: Status Code: 200
{
  "headers": {},
  "body": {
    "data": [
      {
        "status": "succeeded",
        "capabilities": {
          "fine_tune": true,
          "inference": true,
          "completion": true,
          "chat_completion": false,
          "embeddings": false
        },
        "lifecycle_status": `generally-available`,
        "deprecation": {
          "fine_tune": 1677662127,
          "inference": 1709284527
        },
        "id": "curie",
        "created_at": 1646126127,
        "object": "model"
      },
      {
        "status": "succeeded",
        "model": "curie",
        "fine_tune": "ft-72a2792ef7d24ba7b82c7fe4a37e379f",
        "capabilities": {
          "fine_tune": false,
          "inference": true,
          "completion": true,
          "chat_completion": false,
          "embeddings": false
        },
        "lifecycle_status": `generally-available`,
        "deprecation": {
          "inference": 1709284527
        },
        "id": "curie.ft-72a2792ef7d24ba7b82c7fe4a37e379f",
        "created_at": 1646126127,
        "object": "model"
      }
    ],
    "object": "list"
  }
}

Models - Get

GET {endpoint}/openai/models/{model-id}?api-version=2025-04-01-preview
Gets details for the model specified by the given modelId.

URI Parameters

NameInRequiredTypeDescription
endpointpathYesstring
url
Supported Azure OpenAI endpoints (protocol and hostname, for example: https://aoairesource.openai.azure.com. Replace “aoairesource” with your Azure OpenAI resource name). https://{your-resource-name}.openai.azure.com
model-idpathYesstringThe identifier of the model.
api-versionqueryYesstringThe requested API version.

Request Header

Use either token based authentication or API key. Authenticating with token based authentication is recommended and more secure.
NameRequiredTypeDescription
AuthorizationTruestringExample: Authorization: Bearer {Azure_OpenAI_Auth_Token}

To generate an auth token using Azure CLI: az account get-access-token --resource https://cognitiveservices.azure.com

Type: oauth2
Authorization Url: https://login.microsoftonline.com/common/oauth2/v2.0/authorize
scope: https://ai.azure.com/.default
api-keyTruestringProvide Azure OpenAI API key here

Responses

Status Code: 200 Description: Success
Content-TypeTypeDescription
application/jsonModel
Status Code: default Description: An error occurred.
Content-TypeTypeDescription
application/jsonErrorResponse

Examples

GET {endpoint}/openai/models/{model-id}?api-version=2025-04-01-preview

Responses: Status Code: 200
{
  "headers": {},
  "body": {
    "status": "succeeded",
    "capabilities": {
      "fine_tune": true,
      "inference": true,
      "completion": true,
      "chat_completion": false,
      "embeddings": false
    },
    "lifecycle_status": `generally-available`,
    "deprecation": {
      "fine_tune": 1677662127,
      "inference": 1709284527
    },
    "id": "curie",
    "created_at": 1646126127,
    "object": "model"
  }
}
GET {endpoint}/openai/models/{model-id}?api-version=2025-04-01-preview

Responses: Status Code: 200
{
  "headers": {},
  "body": {
    "status": "succeeded",
    "model": "curie",
    "fine_tune": "ft-72a2792ef7d24ba7b82c7fe4a37e379f",
    "capabilities": {
      "fine_tune": false,
      "inference": true,
      "completion": true,
      "chat_completion": false,
      "embeddings": false
    },
    "lifecycle_status": `generally-available`,
    "deprecation": {
      "inference": 1709284527
    },
    "id": "curie.ft-72a2792ef7d24ba7b82c7fe4a37e379f",
    "created_at": 1646126127,
    "object": "model"
  }
}

Upload file - Start

POST {endpoint}/openai/uploads?api-version=2025-04-01-preview
An intermediate Upload object is created, allowing you to add Parts to it. Currently, an Upload size can be a maximum of 9 GB in total and will expire two hours after being created. After the Upload is completed a File object will be generated, containing all the uploaded parts. This File object can then be used across our platform just like any other file.

URI Parameters

NameInRequiredTypeDescription
endpointpathYesstring
url
Supported Azure OpenAI endpoints (protocol and hostname, for example: https://aoairesource.openai.azure.com. Replace “aoairesource” with your Azure OpenAI resource name). https://{your-resource-name}.openai.azure.com
api-versionqueryYesstringThe requested API version.

Request Header

Use either token based authentication or API key. Authenticating with token based authentication is recommended and more secure.
NameRequiredTypeDescription
AuthorizationTruestringExample: Authorization: Bearer {Azure_OpenAI_Auth_Token}

To generate an auth token using Azure CLI: az account get-access-token --resource https://cognitiveservices.azure.com

Type: oauth2
Authorization Url: https://login.microsoftonline.com/common/oauth2/v2.0/authorize
scope: https://ai.azure.com/.default
api-keyTruestringProvide Azure OpenAI API key here

Request Body

Content-Type: application/json
NameTypeDescriptionRequiredDefault
bytesintegerYes
filenamestringYes
mime_typestringYes
purposePurposeThe intended purpose of the uploaded documents. Use “fine-tune” for fine-tuning. This allows us to validate the format of the uploaded file.Yes

Request Body

Content-Type: text/json
NameTypeDescriptionRequiredDefault
bytesintegerYes
filenamestringYes
mime_typestringYes
purposePurposeThe intended purpose of the uploaded documents. Use “fine-tune” for fine-tuning. This allows us to validate the format of the uploaded file.Yes

Request Body

Content-Type: application/*+json
NameTypeDescriptionRequiredDefault
bytesintegerYes
filenamestringYes
mime_typestringYes
purposePurposeThe intended purpose of the uploaded documents. Use “fine-tune” for fine-tuning. This allows us to validate the format of the uploaded file.Yes

Responses

Status Code: 200 Description: The upload has been successfully created.
Content-TypeTypeDescription
application/jsonUploadResource
Status Code: default Description: An error occurred.
Content-TypeTypeDescription
application/jsonErrorResponse

Examples

POST {endpoint}/openai/uploads?api-version=2025-04-01-preview

{
 "purpose": "fine-tune",
 "filename": "training_data_v21.jsonl",
 "bytes": 2097152,
 "mime_type": "application/json"
}

Responses: Status Code: 200
{
  "headers": {
    "location": "https://aoairesource.openai.azure.com/openai/uploads/runs/fine-tune-72a2792ef7d24ba7b82c7fe4a37e379f"
  },
  "body": {
    "bytes": 2097152,
    "filename": "training_data_v21.jsonl",
    "purpose": "fine-tune",
    "status": "pending",
    "expires_at": 1646133327,
    "file": {
      "status": "pending",
      "bytes": 140,
      "purpose": "fine-tune",
      "filename": "puppy.jsonl",
      "id": "file-181a1cbdcdcf4677ada87f63a0928099",
      "created_at": 1646126127,
      "object": "file"
    },
    "id": "fine-tune-72a2792ef7d24ba7b82c7fe4a37e379f",
    "created_at": 1646126127,
    "object": "upload"
  }
}

Upload file - Cancel

POST {endpoint}/openai/uploads/{upload-id}/cancel?api-version=2025-04-01-preview
Cancels the Upload, and will lead to all uploaded parts to be deleted asynchronously. No Parts may be added after an Upload is cancelled.

URI Parameters

NameInRequiredTypeDescription
endpointpathYesstring
url
Supported Azure OpenAI endpoints (protocol and hostname, for example: https://aoairesource.openai.azure.com. Replace “aoairesource” with your Azure OpenAI resource name). https://{your-resource-name}.openai.azure.com
upload-idpathYesstringThe identifier of the upload.
api-versionqueryYesstringThe requested API version.

Request Header

Use either token based authentication or API key. Authenticating with token based authentication is recommended and more secure.
NameRequiredTypeDescription
AuthorizationTruestringExample: Authorization: Bearer {Azure_OpenAI_Auth_Token}

To generate an auth token using Azure CLI: az account get-access-token --resource https://cognitiveservices.azure.com

Type: oauth2
Authorization Url: https://login.microsoftonline.com/common/oauth2/v2.0/authorize
scope: https://ai.azure.com/.default
api-keyTruestringProvide Azure OpenAI API key here

Responses

Status Code: 200 Description: Success
Content-TypeTypeDescription
application/jsonUploadResource
Status Code: default Description: An error occurred.
Content-TypeTypeDescription
application/jsonErrorResponse

Examples

POST {endpoint}/openai/uploads/{upload-id}/cancel?api-version=2025-04-01-preview

Responses: Status Code: 200
{
  "headers": {},
  "body": {
    "bytes": 2097152,
    "filename": "training_data_v21.jsonl",
    "purpose": "fine-tune",
    "status": "cancelled",
    "expires_at": 1646133327,
    "file": {
      "status": "pending",
      "bytes": 140,
      "purpose": "fine-tune",
      "filename": "puppy.jsonl",
      "id": "file-181a1cbdcdcf4677ada87f63a0928099",
      "created_at": 1646126127,
      "object": "file"
    },
    "id": "fine-tune-72a2792ef7d24ba7b82c7fe4a37e379f",
    "created_at": 1646126127,
    "object": "upload"
  }
}

Upload file - Complete

POST {endpoint}/openai/uploads/{upload-id}/complete?api-version=2025-04-01-preview
This completes the Upload, and the returned Upload object contains a nested File object that is ready for use across the platform. You can define the order of the Parts by providing an ordered list of Part IDs. The total number of bytes uploaded must match the size originally specified when creating the Upload object. After this operation no additional Parts can be added once the Upload is completed.

URI Parameters

NameInRequiredTypeDescription
endpointpathYesstring
url
Supported Azure OpenAI endpoints (protocol and hostname, for example: https://aoairesource.openai.azure.com. Replace “aoairesource” with your Azure OpenAI resource name). https://{your-resource-name}.openai.azure.com
upload-idpathYesstringThe identifier of the upload.
api-versionqueryYesstringThe requested API version.

Request Header

Use either token based authentication or API key. Authenticating with token based authentication is recommended and more secure.
NameRequiredTypeDescription
AuthorizationTruestringExample: Authorization: Bearer {Azure_OpenAI_Auth_Token}

To generate an auth token using Azure CLI: az account get-access-token --resource https://cognitiveservices.azure.com

Type: oauth2
Authorization Url: https://login.microsoftonline.com/common/oauth2/v2.0/authorize
scope: https://ai.azure.com/.default
api-keyTruestringProvide Azure OpenAI API key here

Request Body

Content-Type: application/json
NameTypeDescriptionRequiredDefault
md5stringNo
part_idsarrayYes

Request Body

Content-Type: text/json
NameTypeDescriptionRequiredDefault
md5stringNo
part_idsarrayYes

Request Body

Content-Type: application/*+json
NameTypeDescriptionRequiredDefault
md5stringNo
part_idsarrayYes

Responses

Status Code: 200 Description: Success
Content-TypeTypeDescription
application/jsonUploadResource
Status Code: default Description: An error occurred.
Content-TypeTypeDescription
application/jsonErrorResponse

Examples

POST {endpoint}/openai/uploads/{upload-id}/complete?api-version=2025-04-01-preview

{
 "part_ids": [
  "LnmictL3p0u4LH/ko343nw==",
  "LmmictL3p0u4LH/ko343nw=="
 ]
}

Responses: Status Code: 200
{
  "headers": {},
  "body": {
    "bytes": 2097152,
    "filename": "training_data_v21.jsonl",
    "purpose": "fine-tune",
    "status": "completed",
    "expires_at": 1646133327,
    "file": {
      "status": "processed",
      "bytes": 140,
      "purpose": "fine-tune",
      "filename": "puppy.jsonl",
      "id": "file-181a1cbdcdcf4677ada87f63a0928099",
      "created_at": 1646126127,
      "object": "file"
    },
    "id": "fine-tune-72a2792ef7d24ba7b82c7fe4a37e379f",
    "created_at": 1646126127,
    "object": "upload"
  }
}

Upload file - Part

POST {endpoint}/openai/uploads/{upload-id}/parts?api-version=2025-04-01-preview
Adds a Part to an Upload object, where each Part represents a segment of the file you’re uploading. Each Part can be up to the standard size limit for file upload, based on the File Purpose. You can continue adding Parts until reaching the Upload size limit of 9 GB.

URI Parameters

NameInRequiredTypeDescription
endpointpathYesstring
url
Supported Azure OpenAI endpoints (protocol and hostname, for example: https://aoairesource.openai.azure.com. Replace “aoairesource” with your Azure OpenAI resource name). https://{your-resource-name}.openai.azure.com
upload-idpathYesstringThe identifier of the upload.
api-versionqueryYesstringThe requested API version.

Request Header

Use either token based authentication or API key. Authenticating with token based authentication is recommended and more secure.
NameRequiredTypeDescription
AuthorizationTruestringExample: Authorization: Bearer {Azure_OpenAI_Auth_Token}

To generate an auth token using Azure CLI: az account get-access-token --resource https://cognitiveservices.azure.com

Type: oauth2
Authorization Url: https://login.microsoftonline.com/common/oauth2/v2.0/authorize
scope: https://ai.azure.com/.default
api-keyTruestringProvide Azure OpenAI API key here

Request Body

Content-Type: multipart/form-data
NameTypeDescriptionRequiredDefault
datastringYes

Responses

Status Code: 200 Description: Success
Content-TypeTypeDescription
application/jsonUploadPartResource
Status Code: default Description: An error occurred.
Content-TypeTypeDescription
application/jsonErrorResponse

Examples

POST {endpoint}/openai/uploads/{upload-id}/parts?api-version=2025-04-01-preview

Responses: Status Code: 200
{
  "headers": {},
  "body": {
    "upload_id": "fine-tune-72a2792ef7d24ba7b82c7fe4a37e379f",
    "azure_block_id": "LnmictL3p0u4LH/ko343nw==",
    "id": "uplprt-72a2792ef7d24ba7b82c7fe4a37e379f",
    "created_at": 1646126127,
    "object": "upload.part"
  }
}

Components

AzureAISearchIndex

Azure AI Search Index.
NameTypeDescriptionRequiredDefault
connectionIdstringThe id of the connection pointing to the Azure AI Search Index.No
kindTargetTypeThe target type.Yes

BaseConnection

A connection to a resource.

Discriminator for BaseConnection

This component uses the property kind to discriminate between different types:
Type ValueSchema
NameTypeDescriptionRequiredDefault
kindConnectionTypeThe connection type.Yes

Batch

Defines the values of a batch.
NameTypeDescriptionRequiredDefault
cancelled_atintegerA timestamp when this batch was cancelled (in unix epochs).No
cancelling_atintegerA timestamp when this batch started cancelling (in unix epochs).No
completed_atintegerA timestamp when this batch was completed (in unix epochs).No
completion_windowstringThe time frame within which the batch should be processed.No
created_atintegerA timestamp when this batch was created (in unix epochs).No
endpointstringThe API endpoint used by the batch.No
error_blobstringThe blob url containing outputs of requests with errors.No
error_file_idstringThe ID of the file containing outputs of requests with errors.No
errorsBatchErrorsFor batches that have failed, this will contain more information on the cause of the failures.No
expired_atintegerA timestamp when this batch expired (in unix epochs).No
expires_atintegerA timestamp when this batch will expire (in unix epochs).No
failed_atintegerA timestamp when this batch failed (in unix epochs).No
finalizing_atintegerA timestamp when this batch started finalizing (in unix epochs).No
idstringThe identity of this item.Yes
in_progress_atintegerA timestamp when this batch started progressing (in unix epochs).No
input_blobstringThe blob url containing the input file for the batch.No
input_file_idstringThe ID of the input file for the batch.Yes
metadataobjectA set of key-value pairs that can be attached to the batch. This can be useful for storing additional information about the batch in a structured format.No
objectTypeDiscriminatorDefines the type of an object.No
output_blobstringThe blob url containing outputs of successfully executed requests.No
output_file_idstringThe ID of the file containing outputs of successfully executed requests.No
request_countsBatchRequestCountsThe request counts for different statuses within the batch.No
statusBatchStatusThe status of a batch.No

BatchCreateRequest

Defines the request to create a batch.
NameTypeDescriptionRequiredDefault
completion_windowstringThe time frame within which the batch should be processed.Yes
endpointstringThe API endpoint used by the batch.Yes
input_blobstringThe url of an Azure Storage blob to use as input for the batch.No
input_file_idstringThe ID of the input file for the batch.No
metadataobjectA set of key-value pairs that can be attached to the batch. This can be useful for storing additional information about the batch in a structured format.No
output_expires_afterFileExpiresAfterDefines an expiration for the file.No
output_folderBatchOutputReferenceThe Azure Storage folder to store output.No

BatchErrorData

Error information for a failure in batch.
NameTypeDescriptionRequiredDefault
codestringAn error code identifying the error type.No
linestringThe line number of the input file where the error occurred, if applicable (can be null).No
messagestringA human-readable message providing more details about the error.No
paramstringThe name of the parameter that caused the error, if applicable (can be null).No

BatchErrors

For batches that have failed, this will contain more information on the cause of the failures.
NameTypeDescriptionRequiredDefault
dataBatchErrorDataError information for a failure in batch.No
objectstringThe type of the errors object. This is always ‘list’.No

BatchRequestCounts

The request counts for different statuses within the batch.
NameTypeDescriptionRequiredDefault
completedintegerThe number of requests in the batch that have been completed successfully.No
failedintegerThe number of requests in the batch that have failed.No
totalintegerThe total number of requests in the batch.No

BatchOutputReference

The Azure Storage folder to store output.
NameTypeDescriptionRequiredDefault
delimiterstringOptional. The delimiter used in the folder path, by default /.No
urlstringThe url of the Azure Storage folder where the batch output would be saved.No

BatchStatus

The status of a batch.
PropertyValue
DescriptionThe status of a batch.
Typestring
Valuesvalidating
failed
in_progress
finalizing
completed
expired
cancelling
cancelled

BatchesList

Represents a list of batches.
NameTypeDescriptionRequiredDefault
dataarrayThe list of items.No
first_idstringThe id of the first batch in the list of batches returned.No
has_morebooleanA value indicating whether the list contains more elements than returned.No
last_idstringThe id of the last batch in the list of batches returned.No
objectTypeDiscriminatorDefines the type of an object.No

Capabilities

The capabilities of a base or fine tune model.
NameTypeDescriptionRequiredDefault
chat_completionbooleanA value indicating whether a model supports chat completion.Yes
completionbooleanA value indicating whether a model supports completion.Yes
embeddingsbooleanA value indicating whether a model supports embeddings.Yes
fine_tunebooleanA value indicating whether a model can be used for fine tuning.Yes
inferencebooleanA value indicating whether a model can be deployed.Yes

Choice

NameTypeDescriptionRequiredDefault
finish_reasonstringThe reason the model stopped generating tokens.No
indexintegerThe index of the choice in the list of choices.No
logprobsobjectLog probability information for the choice.No
messageChoiceMessageNo

ChoiceMessage

NameTypeDescriptionRequiredDefault
contentstringThe contents of the message.No
rolestringThe role of the entity that is creating the message.No
tool_callsarrayA list of the relevant tool calls.No

ChunkingSettings

Chunking settings
NameTypeDescriptionRequiredDefault
maxChunkSizeInTokensintegerNo

CompletionAction

The completion action.
PropertyValue
DescriptionThe completion action.
Typestring
ValuescleanUpTempAssets
keepAllAssets

ComputeType

The compute type.
PropertyValue
DescriptionThe compute type.
Typestring
ValuesServerlessCompute
CustomCompute

ConnectionStringConnection

Connection string connection.
NameTypeDescriptionRequiredDefault
connectionStringstringConnection stringNo
kindConnectionTypeThe connection type.Yes

ConnectionType

The connection type.
PropertyValue
DescriptionThe connection type.
Typestring
ValuesEndpointWithKey
ConnectionString
EndpointWithManagedIdentity
WorkspaceConnection
RelativeConnection

CosmosDBIndex

CosmosDB Index.
NameTypeDescriptionRequiredDefault
collectionNamestringThe name of the cosmos DB collection.No
connectionIdstringThe id of the connection pointing to the cosmos DB.No
databaseNamestringThe name of the cosmos DB database.No
kindTargetTypeThe target type.Yes

CrawlingSettings

Crawling settings
NameTypeDescriptionRequiredDefault
maxCrawlDepthintegerNo
maxCrawlTimeInMinsintegerNo
maxDownloadTimeInMinsintegerNo
maxFileSizeintegerNo
maxFilesintegerNo
maxRedirectsintegerNo

CreateEvalCompletionsRunDataSource

A CompletionsRunDataSource object describing a model sampling configuration.
NameTypeDescriptionRequiredDefault
input_messagesobjectNo
└─ item_referencestringA reference to a variable in the ‘item’ namespace, e.g., ‘item.name’.No
└─ templatearrayA list of chat messages forming the prompt or context. May include variable references to the ‘item’ namespace, e.g., {{item.name}}.No
└─ typeenumThe type of input messages. Either template or item_reference.
Possible values: template, item_reference
No
modelstringThe name of the model to use for generating completions (e.g., ‘o3-mini’).No
sampling_paramsobjectNo
└─ max_completion_tokensintegerThe maximum number of tokens in the generated output.No
└─ seedintegerA seed value to initialize the randomness, during sampling.No42
└─ temperaturenumberA higher temperature increases randomness in the outputs.No1
└─ top_pnumberAn alternative to temperature for nucleus sampling; 1.0 includes all tokens.No1
sourceobjectYes
└─ typeenumThe type of source. Can be one of EvalJsonlFileContentSource, EvalJsonlFileIdSource, or EvalStoredCompletionsSource.
Possible values: EvalJsonlFileContentSource, EvalJsonlFileIdSource, EvalStoredCompletionsSource
No
typeenumThe type of run data source. Always completions.
Possible values: completions
Yes

CreateEvalCustomDataSourceConfig

A CustomDataSourceConfig object that defines the schema for the data source used for the evaluation runs. This schema is used to define the shape of the data that will be: - Used to define your testing criteria and - What data is required when creating a run
NameTypeDescriptionRequiredDefault
include_sample_schemabooleanWhether the eval should expect you to populate the sample namespace (ie, by generating responses off of your data source)NoFalse
item_schemaobjectThe json schema for each row in the data source.Yes
typeenumThe type of data source. Always custom.
Possible values: custom
Yes

CreateEvalItem

A chat message that makes up the prompt or context. May include variable references to the “item” namespace, ie {{item.name}}.
NameTypeDescriptionRequiredDefault
content[‘string’, ‘InputTextContent’, ‘object’]Text inputs to the model - can contain template strings.Yes
roleenumThe role of the message input. One of user, assistant, system, or developer.
Possible values: user, assistant, system, developer
Yes
typeenumThe type of the message input. Always message.
Possible values: message
No

CreateEvalJsonlRunDataSource

A JsonlRunDataSource object with that specifies a JSONL file that matches the eval
NameTypeDescriptionRequiredDefault
sourceobjectYes
└─ contentarrayThe content of the jsonl file.No
└─ idstringThe identifier of the file.No
└─ typeenumThe type of jsonl source. Always file_id.
Possible values: file_id
No
typeenumThe type of data source. Always jsonl.
Possible values: jsonl
Yes

CreateEvalLabelModelGrader

A LabelModelGrader object which uses a model to assign labels to each item in the evaluation.
NameTypeDescriptionRequiredDefault
inputarrayA list of chat messages forming the prompt or context. May include variable references to the “item” namespace, ie {{item.name}}.Yes
labelsarrayThe labels to classify to each item in the evaluation.Yes
modelstringThe model to use for the evaluation. Must support structured outputs.Yes
namestringThe name of the grader.Yes
passing_labelsarrayThe labels that indicate a passing result. Must be a subset of labels.Yes
typeenumThe object type, which is always label_model.
Possible values: label_model
Yes

CreateEvalLogsDataSourceConfig

A data source config which specifies the metadata property of your stored completions query. This is usually metadata like usecase=chatbot or prompt-version=v2, etc.
NameTypeDescriptionRequiredDefault
metadataobjectMetadata filters for the logs data source.No
typeenumThe type of data source. Always logs.
Possible values: logs
Yes

CreateEvalRequest

NameTypeDescriptionRequiredDefault
data_source_configobjectA CustomDataSourceConfig object that defines the schema for the data source used for the evaluation runs. This schema is used to define the shape of the data that will be: - Used to define your testing criteria and - What data is required when creating a runYes
└─ include_sample_schemabooleanWhether the eval should expect you to populate the sample namespace (ie, by generating responses off of your data source)NoFalse
└─ item_schemaobjectThe json schema for each row in the data source.No
└─ metadataobjectMetadata filters for the logs data source.No
└─ typeenumThe type of data source. Always logs.
Possible values: logs
No
metadataMetadataSet of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard. Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.No
namestringThe name of the evaluation.No
testing_criteriaarrayA list of graders for all eval runs in this group.Yes

CreateEvalRunRequest

NameTypeDescriptionRequiredDefault
data_sourceobjectA JsonlRunDataSource object with that specifies a JSONL file that matches the evalYes
└─ input_messagesobjectNo
└─ item_referencestringA reference to a variable in the ‘item’ namespace, e.g., ‘item.name’.No
└─ templatearrayA list of chat messages forming the prompt or context. May include variable references to the ‘item’ namespace, e.g., {{item.name}}.No
└─ typeenumThe type of input messages. Either template or item_reference.
Possible values: template, item_reference
No
└─ modelstringThe name of the model to use for generating completions (e.g., ‘o3-mini’).No
└─ sampling_paramsobjectNo
└─ max_completion_tokensintegerThe maximum number of tokens in the generated output.No
└─ seedintegerA seed value to initialize the randomness, during sampling.No42
└─ temperaturenumberA higher temperature increases randomness in the outputs.No1
└─ top_pnumberAn alternative to temperature for nucleus sampling; 1.0 includes all tokens.No1
└─ sourceobjectNo
└─ typeenumThe type of source. Can be one of EvalJsonlFileContentSource, EvalJsonlFileIdSource, or EvalStoredCompletionsSource.
Possible values: EvalJsonlFileContentSource, EvalJsonlFileIdSource, EvalStoredCompletionsSource
No
└─ typeenumThe type of run data source. Always completions.
Possible values: completions
No
metadataMetadataSet of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard. Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.No
namestringThe name of the run.No

CreateEvalStoredCompletionsRunDataSource

A StoredCompletionsRunDataSource configuration describing a set of filters
NameTypeDescriptionRequiredDefault
created_afterintegerAn optional Unix timestamp to filter items created after this time.No
created_beforeintegerAn optional Unix timestamp to filter items created before this time.No
limitintegerAn optional maximum number of items to return.No
metadataMetadataSet of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard. Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.No
modelstringAn optional model to filter by (e.g., ‘gpt-4o’).No
typeenumThe type of data source. Always stored_completions.
Possible values: stored_completions
Yes

CustomCompute

Custom compute.
NameTypeDescriptionRequiredDefault
computeIdstringId of the custom computeNo
kindComputeTypeThe compute type.Yes

DeploymentConnection

Relative deployment connection.
NameTypeDescriptionRequiredDefault
kindConnectionTypeThe connection type.Yes

Deprecation

Defines the dates of deprecation for the different use cases of a model. Usually base models support 1 year of fine tuning after creation. Inference is typically supported 2 years after creation of base or fine tuned models. The exact dates are specified in the properties.
NameTypeDescriptionRequiredDefault
fine_tuneintegerThe end date of fine tune support of this model. Will be null for fine tune models.No
inferenceintegerThe end date of inference support of this model.Yes

DpoHyperparamsRequest

Hyperparameters for DPO method of fine-tuning
NameTypeDescriptionRequiredDefault
batch_sizeintegerThe batch size to use for training. The batch size is the number of training examples used to train a single forward and backward pass. In general, we’ve found that larger batch sizes tend to work better for larger datasets.The default value as well as the maximum value for this property are specific to a base model.No
betanumberDPO beta value.No
l2_multipliernumberL2 regularization multiplierNo
learning_rate_multipliernumberThe learning rate multiplier to use for training. The fine-tuning learning rate is the original learning rate used for pre-training multiplied by this value. Larger learning rates tend to perform better with larger batch sizes. We recommend experimenting with values in the range 0.02 to 0.2 to see what produces the best results.No
n_epochsintegerThe number of epochs to train the model for. An epoch refers to one full cycle through the training dataset.No

DpoMethod

Request for DPO method fine-tuning
NameTypeDescriptionRequiredDefault
dpoDpoMethodConfigRequestConfiguration for dpo fine-tuning method. Includes DPO specific hyperparametersYes
typeFineTuningMethodTypeYes

DpoMethodConfigRequest

Configuration for dpo fine-tuning method. Includes DPO specific hyperparameters
NameTypeDescriptionRequiredDefault
hyperparametersDpoHyperparamsRequestHyperparameters for DPO method of fine-tuningNo

DpoMethodRequest

Request for DPO method fine-tuning
NameTypeDescriptionRequiredDefault
dpoDpoMethodConfigRequestConfiguration for dpo fine-tuning method. Includes DPO specific hyperparametersYes
typeFineTuningMethodTypeYes

EndpointKeyConnection

Endpoint key connection.
NameTypeDescriptionRequiredDefault
endpointstringEndpointNo
keystringKeyNo
kindConnectionTypeThe connection type.Yes

EndpointMIConnection

Endpoint Managed Identity connection.
NameTypeDescriptionRequiredDefault
endpointstringEndpointNo
kindConnectionTypeThe connection type.Yes
resourceIdstringResource IdNo

Error

Error content as defined in the Microsoft REST guidelines.
NameTypeDescriptionRequiredDefault
codeErrorCodeError codes as defined in the Microsoft REST guidelines.Yes
detailsarrayThe error details if available.No
innererrorInnerErrorInner error as defined in the Microsoft REST guidelines.No
messagestringThe message of this error.Yes
targetstringThe location where the error happened if available.No

ErrorCode

Error codes as defined in the Microsoft REST guidelines.
PropertyValue
DescriptionError codes as defined in the Microsoft REST guidelines.
Typestring
Valuesconflict
invalidPayload
forbidden
notFound
unexpectedEntityState
itemDoesAlreadyExist
serviceUnavailable
internalFailure
quotaExceeded
jsonlValidationFailed
fileImportFailed
tooManyRequests
unauthorized
contentFilter

ErrorResponse

Error response as defined in the Microsoft REST guidelines.
NameTypeDescriptionRequiredDefault
errorErrorError content as defined in the Microsoft REST guidelines.Yes

Eval

An Eval object with a data source config and testing criteria. An Eval represents a task to be done for your LLM integration. Like:
  • Improve the quality of my chatbot
  • See how well my chatbot handles customer support
  • Check if o3-mini is better at my use case than gpt-4o
NameTypeDescriptionRequiredDefault
created_atintegerThe Unix timestamp (in seconds) for when the eval was created.Yes
data_source_configobjectA CustomDataSourceConfig which specifies the schema of your item and optionally sample namespaces. The response schema defines the shape of the data that will be: - Used to define your testing criteria and - What data is required when creating a runYes
└─ metadataMetadataSet of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard. Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.No
└─ schemaobjectThe json schema for the run data source items. Learn how to build JSON schemas here.No
└─ typeenumThe type of data source. Always stored_completions.
Possible values: stored_completions
No
idstringUnique identifier for the evaluation.Yes
metadataMetadataSet of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard. Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.Yes
namestringThe name of the evaluation.Yes
objectenumThe object type.
Possible values: eval
Yes
testing_criteriaarrayA list of testing criteria.Yes

EvalApiError

An object representing an error response from the Eval API.
NameTypeDescriptionRequiredDefault
codestringThe error code.Yes
messagestringThe error message.Yes

EvalCustomDataSourceConfig

A CustomDataSourceConfig which specifies the schema of your item and optionally sample namespaces. The response schema defines the shape of the data that will be: - Used to define your testing criteria and - What data is required when creating a run
NameTypeDescriptionRequiredDefault
schemaobjectThe json schema for the run data source items. Learn how to build JSON schemas here.Yes
typeenumThe type of data source. Always custom.
Possible values: custom
Yes

EvalFileRunDataSource

A FileRunDataSource configuration with a file id
NameTypeDescriptionRequiredDefault
file_idstringThe identifier of the file.Yes
typeenumThe type of data source. Always file.
Possible values: file
Yes

EvalItem

A message input to the model with a role indicating instruction following hierarchy. Instructions given with the developer or system role take precedence over instructions given with the user role. Messages with the assistant role are presumed to have been generated by the model in previous interactions.
NameTypeDescriptionRequiredDefault
contentobjectA text input to the model.Yes
└─ textstringThe text output from the model.No
└─ typeenumThe type of the output text. Always output_text.
Possible values: output_text
No
roleenumThe role of the message input. One of user, assistant, system, or developer.
Possible values: user, assistant, system, developer
Yes
typeenumThe type of the message input. Always message.
Possible values: message
No

EvalJsonlFileContentSource

NameTypeDescriptionRequiredDefault
contentarrayThe content of the jsonl file.Yes
typeenumThe type of jsonl source. Always file_content.
Possible values: file_content
Yes

EvalJsonlFileIdSource

NameTypeDescriptionRequiredDefault
idstringThe identifier of the file.Yes
typeenumThe type of jsonl source. Always file_id.
Possible values: file_id
Yes

EvalLabelModelGrader

A LabelModelGrader object which uses a model to assign labels to each item in the evaluation.
NameTypeDescriptionRequiredDefault
inputarrayYes
labelsarrayThe labels to assign to each item in the evaluation.Yes
modelstringThe model to use for the evaluation. Must support structured outputs.Yes
namestringThe name of the grader.Yes
passing_labelsarrayThe labels that indicate a passing result. Must be a subset of labels.Yes
typeenumThe object type, which is always label_model.
Possible values: label_model
Yes

EvalList

An object representing a list of evals.
NameTypeDescriptionRequiredDefault
dataarrayAn array of eval objects.Yes
first_idstringThe identifier of the first eval in the data array.Yes
has_morebooleanIndicates whether there are more evals available.Yes
last_idstringThe identifier of the last eval in the data array.Yes
objectenumThe type of this object. It’s always set to “list”.
Possible values: list
Yes

EvalRun

A schema representing an evaluation run.
NameTypeDescriptionRequiredDefault
created_atintegerUnix timestamp (in seconds) when the evaluation run was created.Yes
data_sourceobjectA JsonlRunDataSource object with that specifies a JSONL file that matches the evalYes
└─ input_messagesobjectNo
└─ item_referencestringA reference to a variable in the ‘item’ namespace, e.g., ‘item.name’.No
└─ templatearrayA list of chat messages forming the prompt or context. May include variable references to the ‘item’ namespace, e.g., {{item.name}}.No
└─ typeenumThe type of input messages. Either template or item_reference.
Possible values: template, item_reference
No
└─ modelstringThe name of the model to use for generating completions (e.g., ‘o3-mini’).No
└─ sampling_paramsobjectNo
└─ max_completion_tokensintegerThe maximum number of tokens in the generated output.No
└─ seedintegerA seed value to initialize the randomness, during sampling.No42
└─ temperaturenumberA higher temperature increases randomness in the outputs.No1
└─ top_pnumberAn alternative to temperature for nucleus sampling; 1.0 includes all tokens.No1
└─ sourceobjectNo
└─ typeenumThe type of source. Can be one of EvalJsonlFileContentSource, EvalJsonlFileIdSource, or EvalStoredCompletionsSource.
Possible values: EvalJsonlFileContentSource, EvalJsonlFileIdSource, EvalStoredCompletionsSource
No
└─ typeenumThe type of run data source. Always completions.
Possible values: completions
No
errorEvalApiErrorAn object representing an error response from the Eval API.Yes
eval_idstringThe identifier of the associated evaluation.Yes
idstringUnique identifier for the evaluation run.Yes
metadataMetadataSet of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard. Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.Yes
modelstringThe model that is evaluated, if applicable.Yes
namestringThe name of the evaluation run.Yes
objectenumThe type of the object. Always “eval.run”.
Possible values: eval.run
Yes
per_model_usagearrayUsage statistics for each model during the evaluation run.Yes
per_testing_criteria_resultsarrayResults per testing criteria applied during the evaluation run.Yes
report_urlstringThe URL to the rendered evaluation run report on the UI dashboard.Yes
result_countsobjectCounters summarizing the outcomes of the evaluation run.Yes
└─ erroredintegerNumber of output items that resulted in an error.No
└─ failedintegerNumber of output items that failed to pass the evaluation.No
└─ passedintegerNumber of output items that passed the evaluation.No
└─ totalintegerTotal number of executed output items.No
statusstringThe status of the evaluation run.Yes

EvalRunList

An object representing a list of runs for an evaluation.
NameTypeDescriptionRequiredDefault
dataarrayAn array of eval run objects.Yes
first_idstringThe identifier of the first eval run in the data array.Yes
has_morebooleanIndicates whether there are more evals available.Yes
last_idstringThe identifier of the last eval run in the data array.Yes
objectenumThe type of this object. It’s always set to “list”.
Possible values: list
Yes

EvalRunOutputItem

A schema representing an evaluation run output item.
NameTypeDescriptionRequiredDefault
created_atintegerUnix timestamp (in seconds) when the evaluation run was created.Yes
datasource_itemobjectDetails of the input data source item.Yes
datasource_item_idintegerThe identifier for the data source item.Yes
eval_idstringThe identifier of the evaluation group.Yes
idstringUnique identifier for the evaluation run output item.Yes
objectenumThe type of the object. Always “eval.run.output_item”.
Possible values: eval.run.output_item
Yes
resultsarrayA list of results from the evaluation run.Yes
run_idstringThe identifier of the evaluation run associated with this output item.Yes
sampleobjectA sample containing the input and output of the evaluation run.Yes
└─ errorEvalApiErrorAn object representing an error response from the Eval API.No
└─ finish_reasonstringThe reason why the sample generation was finished.No
└─ inputarrayAn array of input messages.No
└─ max_completion_tokensintegerThe maximum number of tokens allowed for completion.No
└─ modelstringThe model used for generating the sample.No
└─ outputarrayAn array of output messages.No
└─ seedintegerThe seed used for generating the sample.No
└─ temperaturenumberThe sampling temperature used.No
└─ top_pnumberThe top_p value used for sampling.No
└─ usageobjectToken usage details for the sample.No
└─ cached_tokensintegerThe number of tokens retrieved from cache.No
└─ completion_tokensintegerThe number of completion tokens generated.No
└─ prompt_tokensintegerThe number of prompt tokens used.No
└─ total_tokensintegerThe total number of tokens used.No
statusstringThe status of the evaluation run.Yes

EvalRunOutputItemList

An object representing a list of output items for an evaluation run.
NameTypeDescriptionRequiredDefault
dataarrayAn array of eval run output item objects.Yes
first_idstringThe identifier of the first eval run output item in the data array.Yes
has_morebooleanIndicates whether there are more eval run output items available.Yes
last_idstringThe identifier of the last eval run output item in the data array.Yes
objectenumThe type of this object. It’s always set to “list”.
Possible values: list
Yes

EvalScoreModelGrader

A ScoreModelGrader object that uses a model to assign a score to the input.
NameTypeDescriptionRequiredDefault
inputarrayThe input text. This may include template strings.Yes
modelstringThe model to use for the evaluation.Yes
namestringThe name of the grader.Yes
pass_thresholdnumberThe threshold for the score.No
rangearrayThe range of the score. Defaults to [0, 1].No
sampling_paramsobjectThe sampling parameters for the model.No
typeenumThe object type, which is always score_model.
Possible values: score_model
Yes

EvalStoredCompletionsDataSourceConfig

A StoredCompletionsDataSourceConfig which specifies the metadata property of your stored completions query. This is usually metadata like usecase=chatbot or prompt-version=v2, etc. The schema returned by this data source config is used to defined what variables are available in your evals. item and sample are both defined when using this data source config.
NameTypeDescriptionRequiredDefault
metadataMetadataSet of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard. Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.No
schemaobjectThe json schema for the run data source items. Learn how to build JSON schemas here.Yes
typeenumThe type of data source. Always stored_completions.
Possible values: stored_completions
Yes

EvalStoredCompletionsSource

A StoredCompletionsRunDataSource configuration describing a set of filters
NameTypeDescriptionRequiredDefault
created_afterintegerAn optional Unix timestamp to filter items created after this time.No
created_beforeintegerAn optional Unix timestamp to filter items created before this time.No
limitintegerAn optional maximum number of items to return.No
metadataMetadataSet of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard. Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.No
modelstringAn optional model to filter by (e.g., ‘gpt-4o’).No
typeenumThe type of source. Always stored_completions.
Possible values: stored_completions
Yes

EvalStringCheckGrader

A StringCheckGrader object that performs a string comparison between input and reference using a specified operation.
NameTypeDescriptionRequiredDefault
inputstringThe input text. This may include template strings.Yes
namestringThe name of the grader.Yes
operationenumThe string check operation to perform. One of eq, ne, like, or ilike.
Possible values: eq, ne, like, ilike
Yes
referencestringThe reference text. This may include template strings.Yes
typeenumThe object type, which is always string_check.
Possible values: string_check
Yes

EvalTextSimilarityGrader

A TextSimilarityGrader object which grades text based on similarity metrics.
NameTypeDescriptionRequiredDefault
evaluation_metricenumThe evaluation metric to use. One of fuzzy_match, bleu, gleu, meteor, rouge_1, rouge_2, rouge_3, rouge_4, rouge_5, or rouge_l.
Possible values: fuzzy_match, bleu, gleu, meteor, rouge_1, rouge_2, rouge_3, rouge_4, rouge_5, rouge_l
Yes
inputstringThe text being graded.Yes
namestringThe name of the grader.No
pass_thresholdnumberA float score where a value greater than or equal indicates a passing grade.Yes
referencestringThe text being graded against.Yes
typeenumThe type of grader.
Possible values: text_similarity
Yes

EventType

Defines the severity of a content filter result.
PropertyValue
DescriptionDefines the severity of a content filter result.
Typestring
Valuesmessage
metrics

File

A file is a document usable for training and validation. It can also be a service generated document with result details.
NameTypeDescriptionRequiredDefault
bytesintegerThe size of this file when available (can be null). File sizes larger than 2^53-1 aren’t supported to ensure compatibility with JavaScript integers.No
created_atintegerA timestamp when this job or item was created (in unix epochs).No
expires_atintegerA unix timestamp (the number of seconds that have elapsed since January 1, 1970) when the file is expired.No
filenamestringThe name of the file.Yes
idstringThe identity of this item.No
objectTypeDiscriminatorDefines the type of an object.No
purposePurposeThe intended purpose of the uploaded documents. Use “fine-tune” for fine-tuning. This allows us to validate the format of the uploaded file.Yes
statusFileStateThe state of a file.No
status_detailsstringThe error message with details in case processing of this file failed. Deprecated.No

FileCreate

Defines a document to import from an external content url to be usable with Azure OpenAI.
NameTypeDescriptionRequiredDefault
content_urlstringThe url to download the document from (can be SAS url of a blob or any other external url accessible with a GET request).Yes
purposePurposeThe intended purpose of the uploaded documents. Use “fine-tune” for fine-tuning. This allows us to validate the format of the uploaded file.Yes

FileDelete

Defines the response for File Delete.
NameTypeDescriptionRequiredDefault
deletedbooleanA value indicating whether gets if the file was deleted.Yes
idstringThe file-id that was deleted.Yes
objectstringIf the file was deleted.Yes

FileDetails

A file detail is a document used by batch service to fetch file blob details.
NameTypeDescriptionRequiredDefault
filenamestringThe name of the file.Yes
idstringThe identity of this item.No
pathstringThe the relative path to the file within the container.No
purposePurposeThe intended purpose of the uploaded documents. Use “fine-tune” for fine-tuning. This allows us to validate the format of the uploaded file.Yes
storage_account_uristringThe storage account url of this file.No
storage_container_namestringThe Storage Container Name of this file blob.No

FileExpiresAfter

Defines an expiration for the file.
NameTypeDescriptionRequiredDefault
anchorFileExpiryAnchorDefines the anchor relative to what time the absolute expiration should be generated from.No
secondsintegerThe relative expiration time in seconds. Range: [1209600 - 2592000].No

FileExpiryAnchor

Defines the anchor relative to what time the absolute expiration should be generated from.
PropertyValue
DescriptionDefines the anchor relative to what time the absolute expiration should be generated from.
Typestring
Valuescreated_at

FileImport

Defines a document to import from an external content url to be usable with Azure OpenAI.
NameTypeDescriptionRequiredDefault
content_urlstringThe url to download the document from (can be SAS url of a blob or any other external url accessible with a GET request).Yes
expires_afterFileExpiresAfterDefines an expiration for the file.No
filenamestringThe name of the JSON Lines file to be uploaded. If the purpose is set to “fine-tune”, each line is a JSON record with “prompt” and “completion” fields representing your training examples.Yes
purposePurposeThe intended purpose of the uploaded documents. Use “fine-tune” for fine-tuning. This allows us to validate the format of the uploaded file.Yes

FileList

Represents a list of files.
NameTypeDescriptionRequiredDefault
dataarrayThe list of items.No
objectTypeDiscriminatorDefines the type of an object.No

FileState

The state of a file.
PropertyValue
DescriptionThe state of a file.
Typestring
Valuesuploaded
pending
running
processed
error
deleting
deleted

FineTuneMethod

Discriminator for FineTuneMethod

This component uses the property type to discriminate between different types:
Type ValueSchema
NameTypeDescriptionRequiredDefault
typeFineTuningMethodTypeYes

FineTuneMethodRequest

Discriminator for FineTuneMethodRequest

This component uses the property type to discriminate between different types:
Type ValueSchema
NameTypeDescriptionRequiredDefault
typeFineTuningMethodTypeYes

FineTuningHyperParameters

The hyper parameter settings used in a fine tune job.
NameTypeDescriptionRequiredDefault
batch_sizeintegerThe batch size to use for training. The batch size is the number of training examples used to train a single forward and backward pass. In general, we’ve found that larger batch sizes tend to work better for larger datasets. The default value as well as the maximum value for this property are specific to a base model.No
learning_rate_multipliernumberThe learning rate multiplier to use for training. The fine-tuning learning rate is the original learning rate used for pre-training multiplied by this value. Larger learning rates tend to perform better with larger batch sizes. We recommend experimenting with values in the range 0.02 to 0.2 to see what produces the best results.No
n_epochsintegerThe number of epochs to train the model for. An epoch refers to one full cycle through the training dataset.No

FineTuningJob

Defines the values of a fine tune job.
NameTypeDescriptionRequiredDefault
created_atintegerA timestamp when this job or item was created (in unix epochs).No
errorFineTuningJobErrorFor fine-tuning jobs that have failed, this will contain more information on the cause of the failure.No
estimated_finishintegerThe Unix timestamp (in seconds) for when the fine-tuning job is estimated to finish. The value will be null if the fine-tuning job isn’t running.No
fine_tuned_modelstringThe identifier (model-id) of the resulting fine tuned model. This property is only populated for successfully completed fine-tuning runs. Use this identifier to create a deployment for inferencing.No
finished_atintegerA timestamp when this job or item has finished successfully (in unix epochs).No
hyperparametersFineTuningHyperParametersThe hyper parameter settings used in a fine tune job.No
idstringThe identity of this item.No
integrationsarrayA list of configurations for integrations supporting the fine-tuning job. There are many integrations planned, so make sure to check and act on the integration type.No
methodobjectMethod used for supervised fine-tuningNo
└─ typeFineTuningMethodTypeNo
modelstringThe identifier (model-id) of the base model used for the fine-tune.Yes
objectTypeDiscriminatorDefines the type of an object.No
organisation_idstringThe organization id of this fine tune job. Unused on Azure OpenAI; compatibility for OpenAI only.No
result_filesarrayThe result file identities (file-id) containing training and evaluation metrics in csv format. The file is only available for successfully completed fine-tuning runs.No
seedintegerThe seed used for the fine-tuning job.No
statusFineTuningStateThe state of a fine-tuning object or fine tuning job.No
suffixstringThe suffix used to identify the fine-tuned model. The suffix can contain up to 40 characters (a-z, A-Z, 0-9,- and _) that will be added to your fine-tuned model name.No
trained_tokensintegerThe total number of billable tokens processed by this fine tuning job.No
training_filestringThe file which is used for training.Yes
validation_filestringThe file which is used to evaluate the fine tuned model during training.No

FineTuningJobCheckpoint

NameTypeDescriptionRequiredDefault
created_atintegerThe Unix timestamp (in seconds) for when the checkpoint was created.Yes
fine_tuned_model_checkpointstringThe name of the fine-tuned checkpoint model that is created.Yes
fine_tuning_job_idstringThe name of the fine-tuning job that this checkpoint was created from.Yes
idstringThe identity of this checkpoint.No
metricsobjectThe metrics at the step number during the fine-tuning job.Yes
objectTypeDiscriminatorDefines the type of an object.No
step_numberintegerThe step number that the checkpoint was created at.Yes

FineTuningJobCheckpointList

Represents a list of checkpoints.
NameTypeDescriptionRequiredDefault
dataarrayThe list of items.No
has_morebooleanA value indicating whether the list contains more elements than returned.No
objectTypeDiscriminatorDefines the type of an object.No

FineTuningJobCreation

Defines the values of a fine tune job.
NameTypeDescriptionRequiredDefault
hyperparametersFineTuningHyperParametersThe hyper parameter settings used in a fine tune job.No
integrationsarrayA list of configurations for integrations supporting the fine-tuning job. There are many integrations planned, so make sure to check and act on the integration type.No
methodobjectMethod used for supervised fine-tuningNo
└─ typeFineTuningMethodTypeNo
modelstringThe identifier (model-id) of the base model used for this fine-tune.Yes
seedintegerThe seed used for the fine-tuning job. Passing in the same seed and job parameters should produce the same results, but may differ in rare cases. If a seed isn’t specified, one will be generated for you.No
suffixstringThe suffix used to identify the fine-tuned model. The suffix can contain up to 40 characters (a-z, A-Z, 0-9,- and _) that will be added to your fine-tuned model name.No
training_filestringThe file identity (file-id) that is used for training this fine tuned model.Yes
validation_filestringThe file identity (file-id) that is used to evaluate the fine tuned model during training.No

FineTuningJobError

For fine-tuning jobs that have failed, this will contain more information on the cause of the failure.
NameTypeDescriptionRequiredDefault
codestringThe machine-readable error code.No
messagestringThe human-readable error message.No
paramstringThe parameter that was invalid, usually training_file or validation_file. This field will be null if the failure was not parameter-specific.No

FineTuningJobEvent

NameTypeDescriptionRequiredDefault
created_atintegerA timestamp when this event was created (in unix epochs).Yes
dataMachine readable data of this event.No
idstringThe identity of this event.No
levelLogLevelThe verbosity level of an event.Yes
messagestringThe message describing the event. This can be a change of state, e.g., enqueued, started, failed or completed, or other events like uploaded results.Yes
objectTypeDiscriminatorDefines the type of an object.No
typeEventTypeDefines the severity of a content filter result.Yes

FineTuningJobEventList

Represents a list of events.
NameTypeDescriptionRequiredDefault
dataarrayThe list of items.No
has_morebooleanA value indicating whether the list contains more elements than returned.No
objectTypeDiscriminatorDefines the type of an object.No

FineTuningJobList

Represents a list of fine tunes.
NameTypeDescriptionRequiredDefault
dataarrayThe list of items.No
has_morebooleanA value indicating whether the list contains more elements than returned.No
objectTypeDiscriminatorDefines the type of an object.No

FineTuningMethodType

PropertyValue
Typestring
Valuesdpo
supervised

FineTuningState

The state of a fine-tuning object or fine tuning job.
PropertyValue
DescriptionThe state of a fine-tuning object or fine tuning job.
Typestring
Valuescreated
pending
running
pausing
paused
resuming
succeeded
cancelled
failed

FunctionCallFunction

NameTypeDescriptionRequiredDefault
argumentsstringThe arguments that the model expects you to pass to the function.No
namestringThe name of the function.No

FunctionDefinition

NameTypeDescriptionRequiredDefault
descriptionstringA description of what the function does, used by the model to choose when and how to call the function.No
namestringThe name of the function to be called.No
parametersThe parameters the functions accepts, described as a JSON Schema object.No

GenericEmbeddingSettings

Connection Embedding Settings
NameTypeDescriptionRequiredDefault
connectionBaseConnectionA connection to a resource.No
deploymentNamestringNo
modelNamestringNo

IngestionError

The details of the ingestion error
NameTypeDescriptionRequiredDefault
innerErrorsarrayNo
messagestringNo

IngestionJob

Represents the details of a job.

Discriminator for IngestionJob

This component uses the property kind to discriminate between different types:
Type ValueSchema
NameTypeDescriptionRequiredDefault
jobIdstringNo
kindIngestionJobTypeThe job type.Yes

IngestionJobList

Represents a list of ingestion jobs.
NameTypeDescriptionRequiredDefault
nextLinkstringThe link to the next page.No
valuearrayThe list of items.No

IngestionJobProgress

NameTypeDescriptionRequiredDefault
stageProgressarrayYes

IngestionJobRun

The details of a job run
NameTypeDescriptionRequiredDefault
errorIngestionErrorThe details of the ingestion errorNo
jobIdstringNo
progressIngestionJobProgressNo
runIdstringNo
statusOperationStateThe state of a job or item.No
warningsarrayNo

IngestionJobRunList

Represents a list of ingestion job runs.
NameTypeDescriptionRequiredDefault
nextLinkstringThe link to the next page.No
valuearrayThe list of items.No

IngestionJobStageProgress

NameTypeDescriptionRequiredDefault
namestringNo
processedItemsintegerNo
stateOperationStateThe state of a job or item.No
subStageProgressarrayNo
totalItemsintegerNo

IngestionJobSystemCompute

NameTypeDescriptionRequiredDefault
completionActionCompletionActionThe completion action.No
dataRefreshIntervalInHoursintegerNo
datasourceSystemComputeDatasourceNo
jobIdstringNo
kindIngestionJobTypeThe job type.Yes
searchServiceConnectionBaseConnectionA connection to a resource.No

IngestionJobType

The job type.
PropertyValue
DescriptionThe job type.
Typestring
ValuesSystemCompute
UserCompute

IngestionJobUserCompute

NameTypeDescriptionRequiredDefault
computeJobComputeThe compute settings of the job.No
dataRefreshIntervalInHoursintegerNo
datasourceUserComputeDatasourceNo
jobIdstringNo
kindIngestionJobTypeThe job type.Yes
targetTargetIndexInformation about the index to be created.No
workspaceIdstringNo

InnerError

Inner error as defined in the Microsoft REST guidelines.
NameTypeDescriptionRequiredDefault
codeInnerErrorCodeInner error codes as defined in the Microsoft REST guidelines.No
innererrorInnerErrorInner error as defined in the Microsoft REST guidelines.No

InnerErrorCode

Inner error codes as defined in the Microsoft REST guidelines.
PropertyValue
DescriptionInner error codes as defined in the Microsoft REST guidelines.
Typestring
ValuesinvalidPayload

InputMessage

NameTypeDescriptionRequiredDefault
contentstringThe contents of the message.No
idstringThe identity of message.No
namestringAn optional name for the participant. Provides the model information to differentiate between participants of the same role.No
rolestringThe role of the entity that is creating the message.No

InputTextContent

A text input to the model.
NameTypeDescriptionRequiredDefault
textstringThe text input to the model.Yes
typeenumThe type of the input item. Always input_text.
Possible values: input_text
Yes

IntegrationTypes

List of the fine-tuning integrations that are available.
PropertyValue
DescriptionList of the fine-tuning integrations that are available.
Typestring
Valueswandb

JobCompute

The compute settings of the job.

Discriminator for JobCompute

This component uses the property kind to discriminate between different types:
Type ValueSchema
NameTypeDescriptionRequiredDefault
kindComputeTypeThe compute type.Yes

LifeCycleStatus

The life cycle status of a model. Note: A model can be promoted from preview to generally-available, but never from generally-available to preview.
PropertyValue
DescriptionThe life cycle status of a model. Note: A model can be promoted from preview to generally-available, but never from generally-available to preview.
Typestring
Valuespreview
generally-available
deprecating
deprecated

LogLevel

The verbosity level of an event.
PropertyValue
DescriptionThe verbosity level of an event.
Typestring
Valuesinfo
warning
error

Logprob

NameTypeDescriptionRequiredDefault
logprobnumberThe log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value -9999.0 is used to signify that the token is very unlikely.No
tokenstringThe token.No

Metadata

Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard. Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters. No properties defined for this component.

Model

A model is either a base model or the result of a successful fine tune job.
NameTypeDescriptionRequiredDefault
capabilitiesCapabilitiesThe capabilities of a base or fine tune model.Yes
created_atintegerA timestamp when this job or item was created (in unix epochs).No
deprecationDeprecationDefines the dates of deprecation for the different use cases of a model. Usually base models support 1 year of fine tuning after creation Inference is typically supported 2 years after creation of base or fine tuned models. The exact dates are specified in the properties.Yes
fine_tunestringThe fine tune job identity (fine-tune-id) if this is a fine tune model; otherwise null.No
idstringThe identity of this item.No
lifecycle_statusLifeCycleStatusThe life cycle status of a model. Note: A model can be promoted from “preview” to generally-available, but never from generally-available to “preview”.Yes
modelstringThe base model identity (model-id) if this is a fine tune model; otherwise null.No
objectTypeDiscriminatorDefines the type of an object.No
statusFineTuningStateThe state of a fine-tuning object or fine tuning job.No

ModelList

Represents a list of models.
NameTypeDescriptionRequiredDefault
dataarrayThe list of items.No
objectTypeDiscriminatorDefines the type of an object.No

OperationState

The state of a job or item.
PropertyValue
DescriptionThe state of a job or item.
Typestring
ValuesnotRunning
running
succeeded
failed

Order

Defines the purpose of a file.
PropertyValue
DescriptionDefines the purpose of a file.
Typestring
Valuesdesc
asc

OrderByOrder

PropertyValue
Typestring
Valuesasc
desc

PineconeIndex

Pinecone Index.
NameTypeDescriptionRequiredDefault
connectionIdstringThe id of the connection pointing to the pinecone.No
kindTargetTypeThe target type.Yes

Purpose

The intended purpose of the uploaded documents. Use “fine-tune” for fine-tuning. This allows us to validate the format of the uploaded file.
PropertyValue
DescriptionThe intended purpose of the uploaded documents. Use “fine-tune” for fine-tuning. This allows us to validate the format of the uploaded file.
Typestring
Valuesfine-tune
fine-tune-results
assistants
assistants_output
batch
batch_output
evals
evals_output

ServerlessCompute

Serverless compute.
NameTypeDescriptionRequiredDefault
instanceCountintegerThe count of instances to run the job on.No
kindComputeTypeThe compute type.Yes
skustringSKU LevelNo

StoredCompletion

NameTypeDescriptionRequiredDefault
choicesarrayA list of chat completion choices. Can be more than one if n is greater than 1.No
createdintegerThe Unix timestamp (in seconds) of when the chat completion was created.No
frequency_penaltynumberNumber between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model’s likelihood to repeat the same line verbatim.No
idstringThe identity of stored completion.No
input_userstringThe input user for this request.No
metadataobjectArbitrary key-value pairs for additional information.No
modelstringID of the model to use.No
presence_penaltynumberNumber between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model’s likelihood to talk about new topics.No
request_idstringA unique identifier for the OpenAI API request. Please include this request ID when contacting support.No
seedintegerIf specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism isn’t guaranteed, and you should refer to the
system_fingerprint response parameter to monitor changes in the backend.No
service_tierstringSpecifies the latency tier to use for processing the request.No
system_fingerprintstringThis fingerprint represents the backend configuration that the model runs with. Can be used in conjunction with the seed request parameter to understand when backend changes have been made that might impact determinism.No
temperaturenumberWhat sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or top_p but not both.No
tool_choicestringControls which (if any) tool is called by the model.No
toolsarrayA list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported.No
top_pnumberAn alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or temperature but not both.No
usageUsageNo

StoredCompletionDelete

NameTypeDescriptionRequiredDefault
deletedbooleanA value indicating whether gets if the stored completion was deleted.No
idstringThe stored completion id that was deleted.No
objectstringIf the stored completion was deleted.Yes

StoredCompletionList

NameTypeDescriptionRequiredDefault
dataarrayThe list of retrieved objects.No
first_idstringThe first id in the retrieved listNo
has_morebooleanThe has_more property is used for pagination to indicate there are additional results.No
last_idstringThe last id in the retrieved listNo
objectstringThe object type, which is always listNo
totalintegerTotal number of items.No

StoredCompletionMessages

NameTypeDescriptionRequiredDefault
dataarrayThe list of retrieved objects.No
first_idstringThe first id in the retrieved listNo
has_morebooleanThe has_more property is used for pagination to indicate there are additional results.No
last_idstringThe last id in the retrieved listNo
objectstringThe object type, which is always listNo
totalintegerTotal number of items.No

StoredCompletionResponse

NameTypeDescriptionRequiredDefault
choicesarrayA list of chat completion choices. Can be more than one if n is greater than 1.No
createdintegerThe Unix timestamp (in seconds) of when the chat completion was created.No
frequency_penaltynumberNumber between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model’s likelihood to repeat the same line verbatim.No
idstringThe identity of stored completion.No
input_userstringThe input user for this request.No
metadataobjectArbitrary key-value pairs for additional information.No
modelstringID of the model to use.No
objectstringThe type of this object.No
presence_penaltynumberNumber between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model’s likelihood to talk about new topics.No
request_idstringA unique identifier for the OpenAI API request. Please include this request ID when contacting support.No
seedintegerIf specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seedand parameters should return the same result. Determinism isn’t guaranteed, and you should refer to the system_fingerprint response parameter to monitor changes in the backend.No
service_tierstringSpecifies the latency tier to use for processing the request.No
system_fingerprintstringThis fingerprint represents the backend configuration that the model runs with. Can be used in conjunction with the seed request parameter to understand when backend changes have been made that might impact determinism.No
temperaturenumberWhat sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like0.2 will make it more focused and deterministic. We generally recommend altering this or top_p but not both.No
tool_choicestringControls which (if any) tool is called by the model.No
toolsarrayA list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported.No
top_pnumberAn alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or temperature but not both.No
usageUsageNo

SupervisedMethod

Method used for supervised fine-tuning
NameTypeDescriptionRequiredDefault
typeFineTuningMethodTypeYes

SupervisedMethodRequest

Method used for supervised fine-tuning
NameTypeDescriptionRequiredDefault
typeFineTuningMethodTypeYes

SystemComputeDatasource

Discriminator for SystemComputeDatasource

This component uses the property kind to discriminate between different types:
Type ValueSchema
NameTypeDescriptionRequiredDefault
kindSystemComputeDatasourceTypeThe datasource type.Yes

SystemComputeDatasourceType

The datasource type.
PropertyValue
DescriptionThe datasource type.
Typestring
ValuesStorage
Urls

SystemComputeStorage

Storage account
NameTypeDescriptionRequiredDefault
chunkingChunkingSettingsChunking settingsNo
connectionBaseConnectionA connection to a resource.No
containerNamestringcontainer nameNo
embeddingsarrayNo
kindSystemComputeDatasourceTypeThe datasource type.Yes

SystemComputeUrl

Urls
NameTypeDescriptionRequiredDefault
chunkingChunkingSettingsChunking settingsNo
connectionBaseConnectionA connection to a resource.No
containerNamestringcontainer nameNo
crawlingCrawlingSettingsCrawling settingsNo
embeddingsarrayNo
kindSystemComputeDatasourceTypeThe datasource type.Yes
urlsarrayNo

TargetIndex

Information about the index to be created.

Discriminator for TargetIndex

This component uses the property kind to discriminate between different types:
Type ValueSchema
NameTypeDescriptionRequiredDefault
kindTargetTypeThe target type.Yes

TargetType

The target type.
PropertyValue
DescriptionThe target type.
Typestring
ValuesAzureAISearch
CosmosDB
Pinecone

Tool

NameTypeDescriptionRequiredDefault
functionFunctionDefinitionNo
typestringThe type of tool call. This is always going to be function for this type of tool call.No

ToolCall

NameTypeDescriptionRequiredDefault
functionFunctionCallFunctionNo
idstringThe ID of the tool call.No
typestringThe type of tool call the output is required for. For now, this is always function.No

TypeDiscriminator

Defines the type of an object.
PropertyValue
DescriptionDefines the type of an object.
Typestring
Valueslist
fine_tuning.job
file
fine_tuning.job.event
fine_tuning.job.checkpoint
model
upload
upload.part
batch
wandb

UpdateStoredCompletionRequest

NameTypeDescriptionRequiredDefault
metadataobjectArbitrary key-value pairs for additional information.No

UploadFileCompleteBody

NameTypeDescriptionRequiredDefault
md5stringNo
part_idsarrayYes

UploadFileStartBody

NameTypeDescriptionRequiredDefault
bytesintegerYes
filenamestringYes
mime_typestringYes
purposePurposeThe intended purpose of the uploaded documents. Use “fine-tune” for fine-tuning. This allows us to validate the format of the uploaded file.Yes

UploadPartResource

NameTypeDescriptionRequiredDefault
azure_block_idstringNo
created_atintegerA timestamp when this job or item was created (in unix epochs).No
idstringThe identity of this item.No
objectTypeDiscriminatorDefines the type of an object.No
upload_idstringNo

UploadResource

NameTypeDescriptionRequiredDefault
bytesintegerNo
created_atintegerA timestamp when this job or item was created (in unix epochs).No
expires_atintegerNo
fileFileA file is a document usable for training and validation. It can also be a service generated document with result details.No
filenamestringNo
idstringThe identity of this item.No
objectTypeDiscriminatorDefines the type of an object.No
purposePurposeThe intended purpose of the uploaded documents. Use “fine-tune” for fine-tuning. This allows us to validate the format of the uploaded file.No
statusUploadStatusNo

UploadStatus

PropertyValue
Typestring
Valuespending
expired
completed
cancelled

Usage

NameTypeDescriptionRequiredDefault
completion_tokensintegerNumber of tokens in the generated completion.No
prompt_tokensintegerNumber of tokens in the prompt.No
total_tokensintegerTotal number of tokens used in the request (prompt + completion).No

UserComputeDataset

Storage account
NameTypeDescriptionRequiredDefault
chunkingChunkingSettingsChunking settingsNo
datasetIdstringNo
datasetTypestringNo
embeddingsarrayNo
kindUserComputeDatasourceTypeThe datasource type.Yes

UserComputeDatasource

Discriminator for UserComputeDatasource

This component uses the property kind to discriminate between different types:
Type ValueSchema
NameTypeDescriptionRequiredDefault
kindUserComputeDatasourceTypeThe datasource type.Yes

UserComputeDatasourceType

The datasource type.
PropertyValue
DescriptionThe datasource type.
Typestring
ValuesDataset
Urls

UserComputeUrl

Urls
NameTypeDescriptionRequiredDefault
chunkingChunkingSettingsChunking settingsNo
crawlingCrawlingSettingsCrawling settingsNo
embeddingsarrayNo
kindUserComputeDatasourceTypeThe datasource type.Yes
urlsarrayNo

WandBIntegrationRequest

NameTypeDescriptionRequiredDefault
entitystringNo
namestringNo
projectstringYes
tagsarrayNo

WandBIntegrationRequestWrapper

NameTypeDescriptionRequiredDefault
typeIntegrationTypesList of fine-tuning integrations that are available.Yes
wandbWandBIntegrationRequestYes

WorkspaceConnection

AML Workspace connection.
NameTypeDescriptionRequiredDefault
connectionIdstringConnectionIdNo
kindConnectionTypeThe connection type.Yes

WorkspaceConnectionEmbeddingSettings

Connection id to the embedding model
NameTypeDescriptionRequiredDefault
connectionIdstringNo
deploymentNamestringNo
modelNamestringNo

Next steps

Learn about Models, and fine-tuning with the REST API. Learn more about the underlying models that power Azure OpenAI.