{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure-openai/json-schema/microsoft-azure-openai-fine-tuning-job-schema.json",
  "title": "FineTuningJob",
  "description": "Defines the values of a fine tune job.",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-azure-openai-fine-tuning-api-openapi.yml#/components/schemas/FineTuningJob",
  "required": [
    "model",
    "training_file"
  ],
  "type": "object",
  "properties": {
    "object": {
      "$ref": "#/$defs/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": "#/$defs/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.\nUse 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.\nThe 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": "#/$defs/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": "#/$defs/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"
    }
  },
  "$defs": {
    "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.\nIn general, we've found that larger batch sizes tend to work better for larger datasets.\nThe 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.\nLarger learning rates tend to perform better with larger batch sizes.\nWe recommend experimenting with values in the range 0.02 to 0.2 to see what produces the best results.",
          "type": "number"
        }
      }
    },
    "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"
        }
      }
    },
    "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."
          }
        ]
      }
    },
    "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."
          }
        ]
      }
    }
  }
}