Azure OpenAI Service Fine Tuning: API

The Fine-tuning: API from Azure OpenAI Service — 5 operation(s) for fine-tuning:.

GitHub OpenAPI

Operations 7

GET /fine_tuning/jobs Gets a list of all fine-tune jobs owned by the Azure OpenAI resource. #
POST /fine_tuning/jobs Creates a job that fine-tunes a specified model from a given training file. #
GET /fine_tuning/jobs/{fine-tuning-job-id} Gets details for a single fine-tune job specified by the given fine-tune-id. #
DELETE /fine_tuning/jobs/{fine-tuning-job-id} Deletes the fine-tune job specified by the given fine-tune-id #
GET /fine_tuning/jobs/{fine-tuning-job-id}/events Gets the events for the fine-tune job specified by the given fine-tune-id. #
GET /fine_tuning/jobs/{fine-tuning-job-id}/checkpoints Gets the checkpoints for the fine-tune job specified by the given fine-tune-id. #
POST /fine_tuning/jobs/{fine-tuning-job-id}/cancel Cancels the processing of the fine-tune job specified by the given fine-tune-id #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/microsoft-azure-openai:microsoft-azure-openai-fine-tuning-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

microsoft-azure-openai-fine-tuning-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: 'Azure OpenAI API version 2024-10-21 Fine Tuning: API'
  description: APIs for fine-tuning and managing deployments of OpenAI models.
  version: '2024-10-21'
security:
- api-key: []
tags:
- name: 'Fine-tuning:'
paths:
  /fine_tuning/jobs:
    get:
      tags:
      - 'Fine-tuning:'
      summary: Gets a list of all fine-tune jobs owned by the Azure OpenAI resource.
      operationId: FineTuning_List
      parameters:
      - in: query
        name: after
        description: Identifier for the last event from the previous pagination request.
        schema:
          type: string
      - in: query
        name: limit
        description: Number of events to retrieve. Defaults to 20.
        schema:
          type: integer
          format: int32
          default: 20
      - $ref: '#/components/parameters/apiVersionQueryParameter'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FineTuningJobList'
        default:
          description: An error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    post:
      tags:
      - 'Fine-tuning:'
      summary: Creates a job that fine-tunes a specified model from a given training file.
      operationId: FineTuning_Create
      parameters:
      - $ref: '#/components/parameters/apiVersionQueryParameter'
      responses:
        '201':
          description: The fine tune has been successfully created.
          headers:
            Location:
              description: The location of the newly created item.
              schema:
                type: string
                format: url
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FineTuningJob'
        default:
          description: An error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FineTuningJobCreation'
        description: 'The specification of the fine-tuned model to create.

          Required parameters are the base model and the training file to use.

          Optionally a validation file can be specified to compute validation metrics during training.

          Hyper parameters will be set to default values or can be optionally specified.

          These include batch size, learning rate multiplier, number of epochs and others.'
        required: true
  /fine_tuning/jobs/{fine-tuning-job-id}:
    get:
      tags:
      - 'Fine-tuning:'
      summary: Gets details for a single fine-tune job specified by the given fine-tune-id.
      operationId: FineTuning_Get
      parameters:
      - in: path
        name: fine-tuning-job-id
        description: The identifier of the fine-tune job.
        required: true
        schema:
          type: string
      - $ref: '#/components/parameters/apiVersionQueryParameter'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FineTuningJob'
        default:
          description: An error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    delete:
      tags:
      - 'Fine-tuning:'
      summary: Deletes the fine-tune job specified by the given fine-tune-id
      operationId: FineTuning_Delete
      parameters:
      - in: path
        name: fine-tuning-job-id
        description: The identifier of the fine-tune job.
        required: true
        schema:
          type: string
      - $ref: '#/components/parameters/apiVersionQueryParameter'
      responses:
        '204':
          description: The fine tune was successfully deleted.
        default:
          description: An error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /fine_tuning/jobs/{fine-tuning-job-id}/events:
    get:
      tags:
      - 'Fine-tuning:'
      summary: Gets the events for the fine-tune job specified by the given fine-tune-id.
      operationId: FineTuning_GetEvents
      parameters:
      - in: path
        name: fine-tuning-job-id
        description: The identifier of the fine-tune job.
        required: true
        schema:
          type: string
      - in: query
        name: after
        description: Identifier for the last event from the previous pagination request.
        schema:
          type: string
      - in: query
        name: limit
        description: Number of events to retrieve. Defaults to 20.
        schema:
          type: integer
          format: int32
          default: 20
      - $ref: '#/components/parameters/apiVersionQueryParameter'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FineTuningJobEventList'
        default:
          description: An error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /fine_tuning/jobs/{fine-tuning-job-id}/checkpoints:
    get:
      tags:
      - 'Fine-tuning:'
      summary: Gets the checkpoints for the fine-tune job specified by the given fine-tune-id.
      operationId: FineTuning_GetCheckpoints
      parameters:
      - in: path
        name: fine-tuning-job-id
        description: The identifier of the fine-tune job.
        required: true
        schema:
          type: string
      - in: query
        name: after
        description: Identifier for the last checkpoint ID from the previous pagination request.
        schema:
          type: string
      - in: query
        name: limit
        description: Number of checkpoints to retrieve. Defaults to 10.
        schema:
          type: integer
          format: int32
          default: 10
      - $ref: '#/components/parameters/apiVersionQueryParameter'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FineTuningJobCheckpointList'
        default:
          description: An error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /fine_tuning/jobs/{fine-tuning-job-id}/cancel:
    post:
      tags:
      - 'Fine-tuning:'
      summary: Cancels the processing of the fine-tune job specified by the given fine-tune-id
      operationId: FineTuning_Cancel
      parameters:
      - in: path
        name: fine-tuning-job-id
        description: The identifier of the fine-tune job.
        required: true
        schema:
          type: string
      - $ref: '#/components/parameters/apiVersionQueryParameter'
      responses:
        '200':
          description: The fine tune has been successfully canceled
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FineTuningJob'
        default:
          description: An error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    FineTuningJobCheckpoint:
      title: FineTuningJobCheckpoint
      required:
      - created_at
      - fine_tuned_model_checkpoint
      - fine_tuning_job_id
      - metrics
      - step_number
      type: object
      properties:
        object:
          $ref: '#/components/schemas/TypeDiscriminator'
        id:
          description: The identity of this checkpoint.
          type: string
          readOnly: true
        created_at:
          format: unixtime
          description: The Unix timestamp (in seconds) for when the checkpoint was created.
          type: integer
        fine_tuned_model_checkpoint:
          description: The name of the fine-tuned checkpoint model that is created.
          minLength: 1
          type: string
        step_number:
          format: int32
          description: The step number that the checkpoint was created at.
          type: integer
        metrics:
          title: Dictionary`2
          description: The metrics at the step number during the fine-tuning job.
          type: object
          additionalProperties:
            format: double
            type: number
        fine_tuning_job_id:
          description: The name of the fine-tuning job that this checkpoint was created from..
          minLength: 1
          type: string
    TypeDiscriminator:
      title: TypeDiscriminator
      description: Defines the type of an object.
      enum:
      - list
      - fine_tuning.job
      - file
      - fine_tuning.job.event
      - fine_tuning.job.checkpoint
      - model
      - batch
      - upload
      - upload.part
      type: string
      readOnly: true
      x-ms-enum:
        name: TypeDiscriminator
        modelAsString: true
        values:
        - value: list
          description: This object represents a list of other objects.
        - value: fine_tuning.job
          description: This object represents a fine tune job.
        - value: file
          description: This object represents a file.
        - value: fine_tuning.job.event
          description: This object represents an event of a fine tuning job.
        - value: fine_tuning.job.checkpoint
          description: This object represents a checkpoint of a fine tuning job.
        - value: model
          description: This object represents a model (can be a base model or fine tune job result).
        - value: batch
          description: This object represents a batch.
        - value: upload
          description: This object represents a file upload.
        - value: upload.part
          description: This object represents part of a file upload.
    FineTuningHyperParameters:
      title: FineTuningHyperParameters
      description: The hyper parameter settings used in a fine tune job.
      type: object
      properties:
        n_epochs:
          format: int32
          description: The number of epochs to train the model for. An epoch refers to one full cycle through the training dataset.
          type: integer
        batch_size:
          format: int32
          description: 'The 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.'
          type: integer
        learning_rate_multiplier:
          format: double
          description: 'The 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.'
          type: number
    FineTuningJob:
      title: FineTuningJob
      description: Defines the values of a fine tune job.
      required:
      - model
      - training_file
      type: object
      properties:
        object:
          $ref: '#/components/schemas/TypeDiscriminator'
        created_at:
          format: unixtime
          description: A timestamp when this job or item was created (in unix epochs).
          type: integer
          readOnly: true
        id:
          description: The identity of this item.
          type: string
          readOnly: true
        status:
          $ref: '#/components/schemas/FineTuningState'
        model:
          description: The identifier (model-id) of the base model used for the fine-tune.
          minLength: 1
          type: string
        fine_tuned_model:
          description: 'The identifier (model-id) of the resulting fine tuned model. This property is only populated for successfully completed fine-tune runs.

            Use this identifier to create a deployment for inferencing.'
          type: string
        training_file:
          description: The file which is used for training.
          minLength: 1
          type: string
        validation_file:
          description: The file which is used to evaluate the fine tuned model during training.
          type: string
        result_files:
          description: 'The result file identities (file-id) containing training and evaluation metrics in csv format.

            The file is only available for successfully completed fine-tune runs.'
          type: array
          items:
            type: string
        finished_at:
          format: int32
          description: A timestamp when this job or item has finished successfully (in unix epochs).
          type: integer
          readOnly: true
        organisation_id:
          description: The organisation id of this fine tune job. Unused on Azure OpenAI; compatibility for OpenAI only.
          type: string
        trained_tokens:
          format: int32
          description: The total number of billable tokens processed by this fine tuning job.
          type: integer
          readOnly: true
        error:
          $ref: '#/components/schemas/FineTuningJobError'
        estimated_finish:
          format: int32
          description: The Unix timestamp (in seconds) for when the fine-tuning job is estimated to finish. The value will be null if the fine-tuning job is not running.
          type: integer
        hyperparameters:
          $ref: '#/components/schemas/FineTuningHyperParameters'
        suffix:
          description: The 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.
          type: string
        seed:
          format: int32
          description: The seed used for the finetuning job.
          type: integer
    Error:
      title: Error
      description: 'Error content as defined in the Microsoft REST guidelines

        (https://github.com/microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses).'
      required:
      - code
      - message
      type: object
      properties:
        code:
          $ref: '#/components/schemas/ErrorCode'
        message:
          description: The message of this error.
          minLength: 1
          type: string
        target:
          description: The location where the error happened if available.
          type: string
        details:
          description: The error details if available.
          type: array
          items:
            $ref: '#/components/schemas/Error'
        innererror:
          $ref: '#/components/schemas/InnerError'
      readOnly: true
    FineTuningJobError:
      title: FineTuningJobError
      description: For fine-tuning jobs that have failed, this will contain more information on the cause of the failure.
      type: object
      properties:
        code:
          description: The machine-readable error code..
          type: string
        message:
          description: The human-readable error message.
          type: string
        param:
          description: The parameter that was invalid, usually training_file or validation_file. This field will be null if the failure was not parameter-specific.
          type: string
    InnerError:
      title: InnerError
      description: 'Inner error as defined in the Microsoft REST guidelines

        (https://github.com/microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses).'
      type: object
      properties:
        code:
          $ref: '#/components/schemas/InnerErrorCode'
        innererror:
          $ref: '#/components/schemas/InnerError'
    ErrorResponse:
      title: ErrorResponse
      description: 'Error response as defined in the Microsoft REST guidelines

        (https://github.com/microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses).'
      required:
      - error
      type: object
      properties:
        error:
          $ref: '#/components/schemas/Error'
    EventType:
      title: EventType
      description: Defines the severity of a content filter result.
      enum:
      - message
      - metrics
      type: string
      x-ms-enum:
        name: EventType
        modelAsString: true
        values:
        - value: message
          description: Event only contains human readable messages.
        - value: metrics
          description: Event contains metrics.
    LogLevel:
      title: LogLevel
      description: The verbosity level of an event.
      enum:
      - info
      - warning
      - error
      type: string
      x-ms-enum:
        name: LogLevel
        modelAsString: true
        values:
        - value: info
          description: This event is for information only.
        - value: warning
          description: This event represents a mitigated issue.
        - value: error
          description: This message represents a non recoverable issue.
    InnerErrorCode:
      title: InnerErrorCode
      description: 'Inner error codes as defined in the Microsoft REST guidelines

        (https://github.com/microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses).'
      enum:
      - invalidPayload
      type: string
      x-ms-enum:
        name: InnerErrorCode
        modelAsString: true
        values:
        - value: invalidPayload
          description: The request data is invalid for this operation.
    FineTuningState:
      title: FineTuningState
      description: The state of a finetunes object or fine tuning job.
      enum:
      - created
      - pending
      - running
      - succeeded
      - cancelled
      - failed
      type: string
      readOnly: true
      x-ms-enum:
        name: FineTuningState
        modelAsString: true
        values:
        - value: created
          description: The operation was created. This state is not returned by Azure OpenAI and exposed only for compatibility. It can be categorized as an inactive state.
        - value: pending
          description: The operation is not yet queued to be processed in the future. It can be categorized as an inactive state.
        - value: running
          description: The operation has started to be processed. It can be categorized as an active state.
        - value: succeeded
          description: The operation has successfully be processed and is ready for consumption. It can be categorized as a terminal state.
        - value: cancelled
          description: The operation has been cancelled and is incomplete. It can be categorized as a terminal state.
        - value: failed
          description: The operation has completed processing with a failure and cannot be further consumed. It can be categorized as a terminal state.
    FineTuningJobCreation:
      title: FineTuningJobCreation
      description: Defines the values of a fine tune job.
      required:
      - model
      - training_file
      type: object
      properties:
        model:
          description: The identifier (model-id) of the base model used for this fine-tune.
          minLength: 1
          type: string
        training_file:
          description: The file identity (file-id) that is used for training this fine tuned model.
          minLength: 1
          type: string
        validation_file:
          description: The file identity (file-id) that is used to evaluate the fine tuned model during training.
          type: string
        hyperparameters:
          $ref: '#/components/schemas/FineTuningHyperParameters'
        suffix:
          description: The 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.
          type: string
        seed:
          format: int32
          description: The seed used for the finetuning job. Passing in the same seed and job parameters should produce the same results, but may differ in rare cases. If a seed is not specified, one will be generated for you.
          type: integer
    FineTuningJobCheckpointList:
      title: FineTuningJobCheckpointList
      description: Represents a list of checkpoints.
      type: object
      properties:
        object:
          $ref: '#/components/schemas/TypeDiscriminator'
        data:
          description: The list of items.
          type: array
          items:
            $ref: '#/components/schemas/FineTuningJobCheckpoint'
        has_more:
          description: A value indicating whether the list contains more elements than returned.
          type: boolean
    FineTuningJobEventList:
      title: FineTuningJobEventList
      description: Represents a list of events.
      type: object
      properties:
        object:
          $ref: '#/components/schemas/TypeDiscriminator'
        data:
          description: The list of items.
          type: array
          items:
            $ref: '#/components/schemas/FineTuningJobEvent'
        has_more:
          description: A value indicating whether the list contains more elements than returned.
          type: boolean
    FineTuningJobEvent:
      title: FineTuningJobEvent
      required:
      - created_at
      - level
      - message
      - type
      type: object
      properties:
        object:
          $ref: '#/components/schemas/TypeDiscriminator'
        id:
          description: The identity of this event.
          type: string
          readOnly: true
        created_at:
          format: unixtime
          description: A timestamp when this event was created (in unix epochs).
          type: integer
        level:
          $ref: '#/components/schemas/LogLevel'
        message:
          description: The message describing the event. This can be a change of state, e.g., enqueued, started, failed or completed, or other events like uploaded results.
          minLength: 1
          type: string
        type:
          $ref: '#/components/schemas/EventType'
        data:
          description: Machine readable data of this event.
    ErrorCode:
      title: ErrorCode
      description: 'Error codes as defined in the Microsoft REST guidelines

        (https://github.com/microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses).'
      enum:
      - conflict
      - invalidPayload
      - forbidden
      - notFound
      - unexpectedEntityState
      - itemDoesAlreadyExist
      - serviceUnavailable
      - internalFailure
      - quotaExceeded
      - jsonlValidationFailed
      - fileImportFailed
      - tooManyRequests
      - unauthorized
      - contentFilter
      type: string
      x-ms-enum:
        name: ErrorCode
        modelAsString: true
        values:
        - value: conflict
          description: The requested operation conflicts with the current resource state.
        - value: invalidPayload
          description: The request data is invalid for this operation.
        - value: forbidden
          description: The operation is forbidden for the current user/api key.
        - value: notFound
          description: The resource is not found.
        - value: unexpectedEntityState
          description: The operation cannot be executed in the current resource's state.
        - value: itemDoesAlreadyExist
          description: The item does already exist.
        - value: serviceUnavailable
          description: The service is currently not available.
        - value: internalFailure
          description: Internal error. Please retry.
        - value: quotaExceeded
          description: Quota exceeded.
        - value: jsonlValidationFailed
          description: Validation of jsonl data failed.
        - value: fileImportFailed
          description: Import of file failed.
        - value: tooManyRequests
          description: Too many requests. Please retry later.
        - value: unauthorized
          description: The current user/api key is not authorized for the operation.
        - value: contentFilter
          description: Image generation failed as a result of our safety system.
    FineTuningJobList:
      title: FineTuningJobList
      description: Represents a list of fine tunes.
      type: object
      properties:
        object:
          $ref: '#/components/schemas/TypeDiscriminator'
        data:
          description: The list of items.
          type: array
          items:
            $ref: '#/components/schemas/FineTuningJob'
        has_more:
          description: A value indicating whether the list contains more elements than returned.
          type: boolean
  parameters:
    apiVersionQueryParameter:
      in: query
      name: api-version
      description: The requested API version.
      required: true
      x-ms-client-default: '2024-10-21'
      x-ms-parameter-location: client
      schema:
        type: string
  securitySchemes:
    api-key:
      type: apiKey
      name: api-key
      in: header
      description: Provide your Cognitive Services Azure OpenAI account key here.
x-ms-parameterized-host:
  hostTemplate: '{endpoint}/openai'
  useSchemePrefix: false
  parameters:
  - $ref: '#/components/parameters/endpoint'