specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2023-12-01-preview/azureopenai.yaml [360:718]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  /fine_tuning/jobs:
    get:
      tags:
        - 'Fine-tuning:'
      summary: "Gets a list of all fine-tune jobs owned by the Azure OpenAI resource.\r\nThe details that are returned for each fine-tune job contain besides its identifier\r\nthe base model, training and validation files, hyper parameters, time stamps, status and events.\r\nEvents are created when the job status changes, e.g. running or complete, and when results are uploaded."
      operationId: FineTuning_List
      produces:
        - application/json
      parameters:
        - in: query
          name: after
          description: Identifier for the last event from the previous pagination request.
          type: string
        - in: query
          name: limit
          description: Number of events to retrieve. Defaults to 20.
          type: integer
          format: int32
          default: 20
        - $ref: '#/parameters/apiVersionQueryParameter'
      responses:
        '200':
          description: Success
          schema:
            $ref: '#/definitions/FineTuningJobList'
        default:
          description: An error occurred.
          schema:
            $ref: '#/definitions/ErrorResponse'
      x-ms-examples:
        Getting all fine tune jobs owned by this account.:
          $ref: ./examples/get_finetuning_jobs.json
    post:
      tags:
        - 'Fine-tuning:'
      summary: "Creates a job that fine-tunes a specified model from a given training file.\r\nResponse includes details of the enqueued job including job status and hyper parameters.\r\nThe name of the fine-tuned model is added to the response once complete."
      operationId: FineTuning_Create
      consumes:
        - application/json
      produces:
        - application/json
      parameters:
        - $ref: '#/parameters/apiVersionQueryParameter'
        - in: body
          name: fineTuningJob
          description: "The specification of the fine-tuned model to create.\r\nRequired parameters are the base model and the training file to use.\r\nOptionally a validation file can be specified to compute validation metrics during training.\r\nHyper parameters will be set to default values or can by optionally specified.\r\nThese include batch size, learning rate multiplier, number of epochs and others."
          required: true
          schema:
            $ref: '#/definitions/FineTuningJobCreation'
      responses:
        '201':
          description: The fine tune has been successfully created.
          schema:
            $ref: '#/definitions/FineTuningJob'
          headers:
            Location:
              description: The location of the newly created item.
              type: string
              format: url
        default:
          description: An error occurred.
          schema:
            $ref: '#/definitions/ErrorResponse'
      x-ms-examples:
        Creating a fine tune job.:
          $ref: ./examples/post_finetuning_job.json
  /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.\r\nThe details contain the base model, training and validation files, hyper parameters, time stamps, status and events.\r\nEvents are created when the job status changes, e.g. running or complete, and when results are uploaded."
      operationId: FineTuning_Get
      produces:
        - application/json
      parameters:
        - in: path
          name: fine-tuning-job-id
          description: The identifier of the fine-tune job.
          required: true
          type: string
        - $ref: '#/parameters/apiVersionQueryParameter'
      responses:
        '200':
          description: Success
          schema:
            $ref: '#/definitions/FineTuningJob'
        default:
          description: An error occurred.
          schema:
            $ref: '#/definitions/ErrorResponse'
      x-ms-examples:
        Getting a fine tune job.:
          $ref: ./examples/get_finetuning_job.json
    delete:
      tags:
        - 'Fine-tuning:'
      summary: Deletes the fine-tune job specified by the given fine-tune-id.
      operationId: FineTuning_Delete
      produces:
        - application/json
      parameters:
        - in: path
          name: fine-tuning-job-id
          description: The identifier of the fine-tune job.
          required: true
          type: string
        - $ref: '#/parameters/apiVersionQueryParameter'
      responses:
        '204':
          description: The fine tune was successfully deleted.
        default:
          description: An error occurred.
          schema:
            $ref: '#/definitions/ErrorResponse'
      x-ms-examples:
        Deleting a fine tune job.:
          $ref: ./examples/delete_finetuning_job.json
  /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.\r\nEvents are created when the job status changes, e.g. running or complete, and when results are uploaded."
      operationId: FineTuning_GetEvents
      produces:
        - application/json
      parameters:
        - in: path
          name: fine-tuning-job-id
          description: The identifier of the fine-tune job.
          required: true
          type: string
        - in: query
          name: after
          description: Identifier for the last event from the previous pagination request.
          type: string
        - in: query
          name: limit
          description: Number of events to retrieve. Defaults to 20.
          type: integer
          format: int32
          default: 20
        - $ref: '#/parameters/apiVersionQueryParameter'
      responses:
        '200':
          description: Success
          schema:
            $ref: '#/definitions/FineTuningJobEventList'
        default:
          description: An error occurred.
          schema:
            $ref: '#/definitions/ErrorResponse'
      x-ms-examples:
        Getting events of a fine tune job.:
          $ref: ./examples/get_finetuning_job_events.json
  /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
      produces:
        - application/json
      parameters:
        - in: path
          name: fine-tuning-job-id
          description: The identifier of the fine-tune job.
          required: true
          type: string
        - $ref: '#/parameters/apiVersionQueryParameter'
      responses:
        '200':
          description: The fine tune has been successfully canceled
          schema:
            $ref: '#/definitions/FineTuningJob'
        default:
          description: An error occurred.
          schema:
            $ref: '#/definitions/ErrorResponse'
      x-ms-examples:
        Canceling a fine tune job.:
          $ref: ./examples/cancel_finetuning_job.json
  /models:
    get:
      tags:
        - 'Models:'
      summary: "Gets a list of all models that are accessible by the Azure OpenAI resource.\r\nThese include base models as well as all successfully completed fine-tuned models owned by the Azure OpenAI resource."
      operationId: Models_List
      produces:
        - application/json
      parameters:
        - $ref: '#/parameters/apiVersionQueryParameter'
      responses:
        '200':
          description: Success
          schema:
            $ref: '#/definitions/ModelList'
        default:
          description: An error occurred.
          schema:
            $ref: '#/definitions/ErrorResponse'
      x-ms-examples:
        Getting all models owned by account.:
          $ref: ./examples/get_models.json
  /models/{model-id}:
    get:
      tags:
        - 'Models:'
      summary: Gets details for the model specified by the given modelId.
      operationId: Models_Get
      produces:
        - application/json
      parameters:
        - in: path
          name: model-id
          description: The identifier of the model.
          required: true
          type: string
        - $ref: '#/parameters/apiVersionQueryParameter'
      responses:
        '200':
          description: Success
          schema:
            $ref: '#/definitions/Model'
        default:
          description: An error occurred.
          schema:
            $ref: '#/definitions/ErrorResponse'
      x-ms-examples:
        Getting a base model.:
          $ref: ./examples/get_model_base.json
        Getting a fine-tuned model.:
          $ref: ./examples/get_model_finetune.json  
definitions:
  Capabilities:
    title: Capabilities
    description: The capabilities of a base or fine tune model.
    required:
      - chat_completion
      - completion
      - embeddings
      - fine_tune
      - inference
    type: object
    properties:
      fine_tune:
        description: A value indicating whether a model can be used for fine tuning.
        type: boolean
      inference:
        description: A value indicating whether a model can be deployed.
        type: boolean
      completion:
        description: A value indicating whether a model supports completion.
        type: boolean
      chat_completion:
        description: A value indicating whether a model supports chat completion.
        type: boolean
      embeddings:
        description: A value indicating whether a model supports embeddings.
        type: boolean
  Deprecation:
    title: Deprecation
    description: "Defines the dates of deprecation for the different use cases of a model.\r\nUsually base models support 1 year of fine tuning after creation. Inference is typically supported 2 years after creation of base or\r\nfine tuned models. The exact dates are specified in the properties."
    required:
      - inference
    type: object
    properties:
      fine_tune:
        format: unixtime
        description: The end date of fine tune support of this model. Will be `null` for fine tune models.
        type: integer
      inference:
        format: unixtime
        description: The end date of inference support of this model.
        type: integer
  Error:
    title: Error
    description: "Error content as defined in the Microsoft REST guidelines\r\n(https://github.com/microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses)."
    required:
      - code
      - message
    type: object
    properties:
      code:
        $ref: '#/definitions/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: '#/definitions/Error'
      innererror:
        $ref: '#/definitions/InnerError'
    readOnly: true
  ErrorCode:
    title: ErrorCode
    description: "Error codes as defined in the Microsoft REST guidelines\r\n(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.
  ErrorResponse:
    title: ErrorResponse
    description: "Error response as defined in the Microsoft REST guidelines\r\n(https://github.com/microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses)."
    required:
      - error
    type: object
    properties:
      error:
        $ref: '#/definitions/Error'
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



specification/cognitiveservices/data-plane/AzureOpenAI/authoring/stable/2024-02-01/azureopenai.yaml [207:565]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  /fine_tuning/jobs:
    get:
      tags:
        - 'Fine-tuning:'
      summary: "Gets a list of all fine-tune jobs owned by the Azure OpenAI resource.\r\nThe details that are returned for each fine-tune job contain besides its identifier\r\nthe base model, training and validation files, hyper parameters, time stamps, status and events.\r\nEvents are created when the job status changes, e.g. running or complete, and when results are uploaded."
      operationId: FineTuning_List
      produces:
        - application/json
      parameters:
        - in: query
          name: after
          description: Identifier for the last event from the previous pagination request.
          type: string
        - in: query
          name: limit
          description: Number of events to retrieve. Defaults to 20.
          type: integer
          format: int32
          default: 20
        - $ref: '#/parameters/apiVersionQueryParameter'
      responses:
        '200':
          description: Success
          schema:
            $ref: '#/definitions/FineTuningJobList'
        default:
          description: An error occurred.
          schema:
            $ref: '#/definitions/ErrorResponse'
      x-ms-examples:
        Getting all fine tune jobs owned by this account.:
          $ref: ./examples/get_finetuning_jobs.json
    post:
      tags:
        - 'Fine-tuning:'
      summary: "Creates a job that fine-tunes a specified model from a given training file.\r\nResponse includes details of the enqueued job including job status and hyper parameters.\r\nThe name of the fine-tuned model is added to the response once complete."
      operationId: FineTuning_Create
      consumes:
        - application/json
      produces:
        - application/json
      parameters:
        - $ref: '#/parameters/apiVersionQueryParameter'
        - in: body
          name: fineTuningJob
          description: "The specification of the fine-tuned model to create.\r\nRequired parameters are the base model and the training file to use.\r\nOptionally a validation file can be specified to compute validation metrics during training.\r\nHyper parameters will be set to default values or can by optionally specified.\r\nThese include batch size, learning rate multiplier, number of epochs and others."
          required: true
          schema:
            $ref: '#/definitions/FineTuningJobCreation'
      responses:
        '201':
          description: The fine tune has been successfully created.
          schema:
            $ref: '#/definitions/FineTuningJob'
          headers:
            Location:
              description: The location of the newly created item.
              type: string
              format: url
        default:
          description: An error occurred.
          schema:
            $ref: '#/definitions/ErrorResponse'
      x-ms-examples:
        Creating a fine tune job.:
          $ref: ./examples/post_finetuning_job.json
  /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.\r\nThe details contain the base model, training and validation files, hyper parameters, time stamps, status and events.\r\nEvents are created when the job status changes, e.g. running or complete, and when results are uploaded."
      operationId: FineTuning_Get
      produces:
        - application/json
      parameters:
        - in: path
          name: fine-tuning-job-id
          description: The identifier of the fine-tune job.
          required: true
          type: string
        - $ref: '#/parameters/apiVersionQueryParameter'
      responses:
        '200':
          description: Success
          schema:
            $ref: '#/definitions/FineTuningJob'
        default:
          description: An error occurred.
          schema:
            $ref: '#/definitions/ErrorResponse'
      x-ms-examples:
        Getting a fine tune job.:
          $ref: ./examples/get_finetuning_job.json
    delete:
      tags:
        - 'Fine-tuning:'
      summary: Deletes the fine-tune job specified by the given fine-tune-id.
      operationId: FineTuning_Delete
      produces:
        - application/json
      parameters:
        - in: path
          name: fine-tuning-job-id
          description: The identifier of the fine-tune job.
          required: true
          type: string
        - $ref: '#/parameters/apiVersionQueryParameter'
      responses:
        '204':
          description: The fine tune was successfully deleted.
        default:
          description: An error occurred.
          schema:
            $ref: '#/definitions/ErrorResponse'
      x-ms-examples:
        Deleting a fine tune job.:
          $ref: ./examples/delete_finetuning_job.json
  /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.\r\nEvents are created when the job status changes, e.g. running or complete, and when results are uploaded."
      operationId: FineTuning_GetEvents
      produces:
        - application/json
      parameters:
        - in: path
          name: fine-tuning-job-id
          description: The identifier of the fine-tune job.
          required: true
          type: string
        - in: query
          name: after
          description: Identifier for the last event from the previous pagination request.
          type: string
        - in: query
          name: limit
          description: Number of events to retrieve. Defaults to 20.
          type: integer
          format: int32
          default: 20
        - $ref: '#/parameters/apiVersionQueryParameter'
      responses:
        '200':
          description: Success
          schema:
            $ref: '#/definitions/FineTuningJobEventList'
        default:
          description: An error occurred.
          schema:
            $ref: '#/definitions/ErrorResponse'
      x-ms-examples:
        Getting events of a fine tune job.:
          $ref: ./examples/get_finetuning_job_events.json
  /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
      produces:
        - application/json
      parameters:
        - in: path
          name: fine-tuning-job-id
          description: The identifier of the fine-tune job.
          required: true
          type: string
        - $ref: '#/parameters/apiVersionQueryParameter'
      responses:
        '200':
          description: The fine tune has been successfully canceled
          schema:
            $ref: '#/definitions/FineTuningJob'
        default:
          description: An error occurred.
          schema:
            $ref: '#/definitions/ErrorResponse'
      x-ms-examples:
        Canceling a fine tune job.:
          $ref: ./examples/cancel_finetuning_job.json
  /models:
    get:
      tags:
        - 'Models:'
      summary: "Gets a list of all models that are accessible by the Azure OpenAI resource.\r\nThese include base models as well as all successfully completed fine-tuned models owned by the Azure OpenAI resource."
      operationId: Models_List
      produces:
        - application/json
      parameters:
        - $ref: '#/parameters/apiVersionQueryParameter'
      responses:
        '200':
          description: Success
          schema:
            $ref: '#/definitions/ModelList'
        default:
          description: An error occurred.
          schema:
            $ref: '#/definitions/ErrorResponse'
      x-ms-examples:
        Getting all models owned by account.:
          $ref: ./examples/get_models.json
  /models/{model-id}:
    get:
      tags:
        - 'Models:'
      summary: Gets details for the model specified by the given modelId.
      operationId: Models_Get
      produces:
        - application/json
      parameters:
        - in: path
          name: model-id
          description: The identifier of the model.
          required: true
          type: string
        - $ref: '#/parameters/apiVersionQueryParameter'
      responses:
        '200':
          description: Success
          schema:
            $ref: '#/definitions/Model'
        default:
          description: An error occurred.
          schema:
            $ref: '#/definitions/ErrorResponse'
      x-ms-examples:
        Getting a base model.:
          $ref: ./examples/get_model_base.json
        Getting a fine-tuned model.:
          $ref: ./examples/get_model_finetune.json  
definitions:
  Capabilities:
    title: Capabilities
    description: The capabilities of a base or fine tune model.
    required:
      - chat_completion
      - completion
      - embeddings
      - fine_tune
      - inference
    type: object
    properties:
      fine_tune:
        description: A value indicating whether a model can be used for fine tuning.
        type: boolean
      inference:
        description: A value indicating whether a model can be deployed.
        type: boolean
      completion:
        description: A value indicating whether a model supports completion.
        type: boolean
      chat_completion:
        description: A value indicating whether a model supports chat completion.
        type: boolean
      embeddings:
        description: A value indicating whether a model supports embeddings.
        type: boolean
  Deprecation:
    title: Deprecation
    description: "Defines the dates of deprecation for the different use cases of a model.\r\nUsually base models support 1 year of fine tuning after creation. Inference is typically supported 2 years after creation of base or\r\nfine tuned models. The exact dates are specified in the properties."
    required:
      - inference
    type: object
    properties:
      fine_tune:
        format: unixtime
        description: The end date of fine tune support of this model. Will be `null` for fine tune models.
        type: integer
      inference:
        format: unixtime
        description: The end date of inference support of this model.
        type: integer
  Error:
    title: Error
    description: "Error content as defined in the Microsoft REST guidelines\r\n(https://github.com/microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses)."
    required:
      - code
      - message
    type: object
    properties:
      code:
        $ref: '#/definitions/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: '#/definitions/Error'
      innererror:
        $ref: '#/definitions/InnerError'
    readOnly: true
  ErrorCode:
    title: ErrorCode
    description: "Error codes as defined in the Microsoft REST guidelines\r\n(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.
  ErrorResponse:
    title: ErrorResponse
    description: "Error response as defined in the Microsoft REST guidelines\r\n(https://github.com/microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses)."
    required:
      - error
    type: object
    properties:
      error:
        $ref: '#/definitions/Error'
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



