{
  "swagger": "2.0",
  "info": {
    "title": "Intelligence Foundry API",
    "description": "The Intelligence Foundry REST API. Please see https://docs.crusoecloud.com/ for more details.",
    "version": "1.0.0"
  },
  "basePath": "/v1",
  "paths": {
    "/fine_tuning/jobs": {
      "post": {
        "operationId": "createFineTuningJob",
        "summary": "Create fine-tuning job",
        "description": "Creates a fine-tuning job which begins the process of creating a new model from a given dataset.\n\nResponse includes details of the enqueued job including job status and the name of the fine-tuned models once complete.\n\n[Learn more about fine-tuning](https://platform.openai.com/docs/guides/model-optimization)\n",
        "tags": [
          "Fine-tuning"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/FineTuningJob"
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/CreateFineTuningJobRequest"
            }
          }
        ],
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ]
      },
      "get": {
        "operationId": "listPaginatedFineTuningJobs",
        "summary": "List fine-tuning jobs",
        "description": "List your organization's fine-tuning jobs\n",
        "tags": [
          "Fine-tuning"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/ListPaginatedFineTuningJobsResponse"
            }
          }
        },
        "parameters": [
          {
            "name": "model",
            "in": "query",
            "description": "Filter to jobs for these base model registry IDs.",
            "required": false,
            "type": "array",
            "items": {
              "type": "string"
            },
            "collectionFormat": "multi"
          },
          {
            "name": "suffix",
            "in": "query",
            "description": "Filter to jobs with these suffixes.",
            "required": false,
            "type": "array",
            "items": {
              "type": "string"
            },
            "collectionFormat": "multi"
          },
          {
            "name": "status",
            "in": "query",
            "description": "Filter to jobs in these statuses.",
            "required": false,
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "validating_files",
                "queued",
                "running",
                "succeeded",
                "failed",
                "cancelled"
              ]
            },
            "collectionFormat": "multi"
          }
        ],
        "produces": [
          "application/json"
        ]
      }
    },
    "/fine_tuning/jobs/{fine_tuning_job_id}": {
      "get": {
        "operationId": "retrieveFineTuningJob",
        "summary": "Retrieve fine-tuning job",
        "description": "Get info about a fine-tuning job.\n\n[Learn more about fine-tuning](https://platform.openai.com/docs/guides/model-optimization)\n",
        "tags": [
          "Fine-tuning"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/FineTuningJob"
            }
          }
        },
        "parameters": [
          {
            "name": "fine_tuning_job_id",
            "in": "path",
            "description": "The ID of the fine-tuning job.\n",
            "required": true,
            "type": "string"
          }
        ],
        "produces": [
          "application/json"
        ]
      }
    },
    "/fine_tuning/jobs/{fine_tuning_job_id}/checkpoints": {
      "get": {
        "operationId": "listFineTuningJobCheckpoints",
        "summary": "List fine-tuning checkpoints",
        "description": "List checkpoints for a fine-tuning job.\n",
        "tags": [
          "Fine-tuning"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/ListFineTuningJobCheckpointsResponse"
            }
          }
        },
        "parameters": [
          {
            "name": "fine_tuning_job_id",
            "in": "path",
            "description": "The ID of the fine-tuning job to get checkpoints for.\n",
            "required": true,
            "type": "string"
          },
          {
            "name": "after",
            "in": "query",
            "description": "Identifier for the last checkpoint ID from the previous pagination request.",
            "required": false,
            "type": "string"
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Number of checkpoints to retrieve.",
            "required": false,
            "type": "integer",
            "default": 10
          }
        ],
        "produces": [
          "application/json"
        ]
      }
    },
    "/fine_tuning/jobs/{fine_tuning_job_id}/cancel": {
      "post": {
        "operationId": "cancelFineTuningJob",
        "summary": "Cancel fine-tuning",
        "description": "Immediately cancel a fine-tune job.\n",
        "tags": [
          "Fine-tuning"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/FineTuningJob"
            }
          }
        },
        "parameters": [
          {
            "name": "fine_tuning_job_id",
            "in": "path",
            "description": "The ID of the fine-tuning job to cancel.\n",
            "required": true,
            "type": "string"
          }
        ],
        "produces": [
          "application/json"
        ]
      }
    },
    "/fine_tuning/jobs/{fine_tuning_job_id}/events": {
      "get": {
        "operationId": "listFineTuningEvents",
        "summary": "List fine-tuning events",
        "description": "Get status updates for a fine-tuning job.\n",
        "tags": [
          "Fine-tuning"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/ListFineTuningJobEventsResponse"
            }
          }
        },
        "parameters": [
          {
            "name": "fine_tuning_job_id",
            "in": "path",
            "description": "The ID of the fine-tuning job to get events for.\n",
            "required": true,
            "type": "string"
          },
          {
            "name": "after",
            "in": "query",
            "description": "Identifier for the last event from the previous pagination request.",
            "required": false,
            "type": "string"
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Number of events to retrieve.",
            "required": false,
            "type": "integer",
            "default": 20
          }
        ],
        "produces": [
          "application/json"
        ]
      }
    },
    "/files": {
      "get": {
        "operationId": "listFiles",
        "summary": "List files",
        "description": "Returns a list of files.",
        "tags": [
          "Files"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/ListFilesResponse"
            }
          }
        },
        "parameters": [
          {
            "name": "purpose",
            "in": "query",
            "description": "Only return files with the given purpose.",
            "required": false,
            "type": "string"
          },
          {
            "name": "limit",
            "in": "query",
            "description": "A limit on the number of objects to be returned. Limit can range between 1 and 10,000, and the default is 10,000.\n",
            "required": false,
            "type": "integer",
            "default": 10000
          },
          {
            "name": "order",
            "in": "query",
            "description": "Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for descending order.\n",
            "type": "string",
            "enum": [
              "asc",
              "desc"
            ],
            "default": "desc"
          },
          {
            "name": "after",
            "in": "query",
            "description": "A 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.\n",
            "type": "string"
          }
        ],
        "produces": [
          "application/json"
        ]
      },
      "post": {
        "operationId": "createFile",
        "summary": "Upload file",
        "description": "Upload a file that can be used across various endpoints. Individual files\ncan be up to 512 MB, and the size of all files uploaded by one organization\ncan be up to 1 TB.\n\n- The Assistants API supports files up to 2 million tokens and of specific\n  file types. See the [Assistants Tools guide](https://platform.openai.com/docs/assistants/tools) for\n  details.\n- The Fine-tuning API only supports `.jsonl` files. The input also has\n  certain required formats for fine-tuning\n  [chat](https://platform.openai.com/docs/api-reference/fine-tuning/chat-input) or\n  [completions](https://platform.openai.com/docs/api-reference/fine-tuning/completions-input) models.\n- The Batch API only supports `.jsonl` files up to 200 MB in size. The input\n  also has a specific required\n  [format](https://platform.openai.com/docs/api-reference/batch/request-input).\n\nPlease [contact us](https://help.openai.com/) if you need to increase these\nstorage limits.\n",
        "tags": [
          "Files"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/OpenAIFile"
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/CreateFileRequest"
            }
          }
        ],
        "consumes": [
          "multipart/form-data"
        ],
        "produces": [
          "application/json"
        ]
      }
    },
    "/files/{file_id}": {
      "get": {
        "operationId": "retrieveFile",
        "summary": "Retrieve file",
        "description": "Returns information about a specific file.",
        "tags": [
          "Files"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/OpenAIFile"
            }
          }
        },
        "parameters": [
          {
            "name": "file_id",
            "in": "path",
            "description": "The ID of the file to use for this request.",
            "required": true,
            "type": "string"
          }
        ],
        "produces": [
          "application/json"
        ]
      },
      "delete": {
        "operationId": "deleteFile",
        "summary": "Delete file",
        "description": "Delete a file and remove it from all vector stores.",
        "tags": [
          "Files"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/DeleteFileResponse"
            }
          }
        },
        "parameters": [
          {
            "name": "file_id",
            "in": "path",
            "description": "The ID of the file to use for this request.",
            "required": true,
            "type": "string"
          }
        ],
        "produces": [
          "application/json"
        ]
      }
    },
    "/files/{file_id}/content": {
      "get": {
        "operationId": "downloadFile",
        "summary": "Retrieve file content",
        "description": "Returns the contents of the specified file.",
        "tags": [
          "Files"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "string"
            }
          }
        },
        "parameters": [
          {
            "name": "file_id",
            "in": "path",
            "description": "The ID of the file to use for this request.",
            "required": true,
            "type": "string"
          }
        ],
        "produces": [
          "application/json"
        ]
      }
    },
    "/models": {
      "get": {
        "operationId": "listModels",
        "summary": "List available models",
        "description": "Lists the currently available models, and provides basic information\nabout each one such as the owner and availability.\n",
        "tags": [
          "Models"
        ],
        "responses": {
          "200": {
            "description": "List of models",
            "schema": {
              "$ref": "#/definitions/ListIntelligenceModelsResponse"
            }
          }
        },
        "produces": [
          "application/json"
        ]
      }
    },
    "/models/{model}": {
      "get": {
        "operationId": "retrieveModel",
        "summary": "Retrieve a model",
        "description": "Retrieves a model instance, providing basic information about the\nmodel such as the owner and availability.\n",
        "tags": [
          "Models"
        ],
        "responses": {
          "200": {
            "description": "Model details",
            "schema": {
              "$ref": "#/definitions/IntelligenceModel"
            }
          },
          "404": {
            "description": "Model not found"
          }
        },
        "parameters": [
          {
            "name": "model",
            "in": "path",
            "description": "The encoded ID of the model (returned in the `id` field from list)",
            "required": true,
            "type": "string"
          }
        ],
        "produces": [
          "application/json"
        ]
      },
      "delete": {
        "operationId": "deleteModel",
        "summary": "Delete a fine-tuned model",
        "description": "Delete a fine-tuned model owned by the caller's project. Refuses\ndeletion of globally available models, models not solely owned by the\ncaller's project, or models referenced by any non-terminal fine-tuning\njob in the project.\n",
        "tags": [
          "Models"
        ],
        "responses": {
          "200": {
            "description": "Deletion confirmation",
            "schema": {
              "$ref": "#/definitions/DeleteIntelligenceModelResponse"
            }
          },
          "403": {
            "description": "Caller is not the sole owner, or the model is globally available"
          },
          "404": {
            "description": "Model not found"
          },
          "409": {
            "description": "Model is referenced by a non-terminal fine-tuning job"
          }
        },
        "parameters": [
          {
            "name": "model",
            "in": "path",
            "description": "The encoded ID of the model (returned in the `id` field from list)",
            "required": true,
            "type": "string"
          }
        ],
        "produces": [
          "application/json"
        ]
      }
    },
    "/models/{model}/download": {
      "get": {
        "operationId": "downloadModel",
        "summary": "Download an adapter model",
        "description": "Download an adapter model as a zip archive containing\nadapter_model.safetensors and adapter_config.json.\nRequires ProjectReader permission.\n",
        "tags": [
          "Models"
        ],
        "responses": {
          "200": {
            "description": "The adapter model files as a zip archive",
            "schema": {
              "type": "string",
              "format": "binary"
            }
          },
          "400": {
            "description": "Base model downloads are not supported"
          },
          "403": {
            "description": "Access denied to the model or its artifact"
          },
          "404": {
            "description": "Model not found or has no downloadable artifact"
          }
        },
        "parameters": [
          {
            "name": "model",
            "in": "path",
            "description": "The ID of the adapter model to download",
            "required": true,
            "type": "string"
          }
        ],
        "produces": [
          "application/zip"
        ]
      }
    },
    "/public/models": {
      "get": {
        "operationId": "listModelsPublic",
        "summary": "List available fine-tuning models (public)",
        "description": "Lists the currently available fine-tuning models without requiring\nauthentication.\n",
        "tags": [
          "Public"
        ],
        "responses": {
          "200": {
            "description": "List of models",
            "schema": {
              "$ref": "#/definitions/ListIntelligenceModelsResponse"
            }
          }
        },
        "produces": [
          "application/json"
        ]
      }
    },
    "/fine_tuning/jobs/{fine_tuning_job_id}/metrics": {
      "get": {
        "operationId": "getFineTuningJobMetrics",
        "summary": "Get fine-tuning job metrics",
        "description": "Get time-series training metrics for a fine-tuning job.\n",
        "tags": [
          "Fine-tuning"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/FineTuningJobMetricsResponse"
            }
          }
        },
        "parameters": [
          {
            "name": "fine_tuning_job_id",
            "in": "path",
            "description": "The ID of the fine-tuning job to get metrics for.\n",
            "required": true,
            "type": "string"
          },
          {
            "name": "metric_names",
            "in": "query",
            "description": "Filter to specific metric names.",
            "required": false,
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "ev_loss",
                "ev_eval_loss",
                "ev_current_step",
                "ev_total_steps",
                "ev_learning_rate",
                "ev_grad_norm",
                "ev_num_input_tokens_seen",
                "ev_eval_samples_per_second",
                "ev_eval_steps_per_second",
                "ev_estimated_finish",
                "ev_train_loss",
                "ev_train_runtime",
                "ev_train_samples_per_second",
                "ev_train_steps_per_second",
                "ev_train_tokens_per_second",
                "ev_total_flos"
              ]
            },
            "collectionFormat": "csv"
          },
          {
            "name": "cursor",
            "in": "query",
            "description": "Epoch timestamp cursor for pagination.",
            "required": false,
            "type": "string"
          },
          {
            "name": "step",
            "in": "query",
            "description": "Step duration for aggregation (e.g. 1m, 30s).",
            "required": false,
            "type": "string"
          },
          {
            "name": "x_axis",
            "in": "query",
            "description": "X-axis type for returned data points (default timestamp).",
            "required": false,
            "type": "string",
            "enum": [
              "timestamp",
              "step_count"
            ]
          }
        ],
        "produces": [
          "application/json"
        ]
      }
    }
  },
  "definitions": {
    "CreateFineTuningJobRequest": {
      "type": "object",
      "required": [
        "model",
        "training_file"
      ],
      "properties": {
        "model": {
          "description": "The name of the model to fine-tune. You can select one of the\n[supported models](https://platform.openai.com/docs/guides/fine-tuning#which-models-can-be-fine-tuned).\n",
          "example": "gpt-4o-mini",
          "x-anyOf": [
            {
              "type": "string"
            },
            {
              "type": "string",
              "title": "Preset",
              "enum": [
                "babbage-002",
                "davinci-002",
                "gpt-3.5-turbo",
                "gpt-4o-mini"
              ]
            }
          ],
          "x-oaiTypeLabel": "string"
        },
        "training_file": {
          "type": "string",
          "description": "The ID of an uploaded file that contains training data.\n\nSee [upload file](https://platform.openai.com/docs/api-reference/files/create) for how to upload a file.\n\nYour dataset must be formatted as a JSONL file. Additionally, you must upload your file with the purpose `fine-tune`.\n\nThe contents of the file should differ depending on if the model uses the [chat](https://platform.openai.com/docs/api-reference/fine-tuning/chat-input), [completions](https://platform.openai.com/docs/api-reference/fine-tuning/completions-input) format, or if the fine-tuning method uses the [preference](https://platform.openai.com/docs/api-reference/fine-tuning/preference-input) format.\n\nSee the [fine-tuning guide](https://platform.openai.com/docs/guides/model-optimization) for more details.\n",
          "example": "file-abc123"
        },
        "suffix": {
          "type": "string",
          "x-nullable": true,
          "description": "A string of up to 64 characters that will be added to your fine-tuned model name.\n\nFor example, a `suffix` of \"custom-model-name\" would produce a model name like `ft:gpt-4o-mini:openai:custom-model-name:7p4lURel`.\n",
          "minLength": 1,
          "maxLength": 64,
          "pattern": "^[a-zA-Z0-9][a-zA-Z0-9-]*$"
        },
        "validation_file": {
          "type": "string",
          "x-nullable": true,
          "description": "The ID of an uploaded file that contains validation data.\n\nIf you provide this file, the data is used to generate validation\nmetrics periodically during fine-tuning. These metrics can be viewed in\nthe fine-tuning results file.\nThe same data should not be present in both train and validation files.\n\nYour dataset must be formatted as a JSONL file. You must upload your file with the purpose `fine-tune`.\n\nSee the [fine-tuning guide](https://platform.openai.com/docs/guides/model-optimization) for more details.\n",
          "example": "file-abc123"
        },
        "seed": {
          "type": "integer",
          "x-nullable": true,
          "description": "The seed controls the reproducibility of the job. Passing in the same seed and job parameters should produce the same results, but may differ in rare cases.\nIf a seed is not specified, one will be generated for you.\n",
          "minimum": 0,
          "maximum": 2147483647,
          "example": 42
        },
        "method": {
          "$ref": "#/definitions/FineTuneMethod"
        },
        "metadata": {
          "$ref": "#/definitions/Metadata"
        }
      }
    },
    "FineTuningJob": {
      "type": "object",
      "title": "FineTuningJob",
      "description": "The `fine_tuning.job` object represents a fine-tuning job that has been created through the API.\n",
      "required": [
        "created_at",
        "error",
        "finished_at",
        "fine_tuned_model",
        "id",
        "model",
        "object",
        "organization_id",
        "result_files",
        "status",
        "trained_tokens",
        "training_file",
        "validation_file",
        "seed"
      ],
      "properties": {
        "id": {
          "type": "string",
          "description": "The object identifier, which can be referenced in the API endpoints."
        },
        "created_at": {
          "type": "integer",
          "description": "The Unix timestamp (in seconds) for when the fine-tuning job was created."
        },
        "error": {
          "type": "object",
          "description": "For fine-tuning jobs that have `failed`, this will contain more information on the cause of the failure.",
          "required": [
            "code",
            "message",
            "param"
          ],
          "properties": {
            "code": {
              "type": "string",
              "description": "A machine-readable error code."
            },
            "message": {
              "type": "string",
              "description": "A human-readable error message."
            },
            "param": {
              "type": "string",
              "description": "The parameter that was invalid, usually `training_file` or `validation_file`. This field will be null if the failure was not parameter-specific.",
              "x-nullable": true,
              "x-anyOf": [
                {
                  "type": "string",
                  "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": "null"
                }
              ]
            }
          },
          "x-nullable": true,
          "x-anyOf": [
            {
              "type": "object",
              "description": "For fine-tuning jobs that have `failed`, this will contain more information on the cause of the failure.",
              "required": [
                "code",
                "message",
                "param"
              ],
              "properties": {
                "code": {
                  "type": "string",
                  "description": "A machine-readable error code."
                },
                "message": {
                  "type": "string",
                  "description": "A human-readable error message."
                },
                "param": {
                  "type": "string",
                  "description": "The parameter that was invalid, usually `training_file` or `validation_file`. This field will be null if the failure was not parameter-specific.",
                  "x-nullable": true,
                  "x-anyOf": [
                    {
                      "type": "string",
                      "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": "null"
                    }
                  ]
                }
              }
            },
            {
              "type": "null"
            }
          ]
        },
        "fine_tuned_model": {
          "type": "string",
          "description": "The name of the fine-tuned model that is being created. The value will be null if the fine-tuning job is still running.",
          "x-nullable": true,
          "x-anyOf": [
            {
              "type": "string",
              "description": "The name of the fine-tuned model that is being created. The value will be null if the fine-tuning job is still running."
            },
            {
              "type": "null"
            }
          ]
        },
        "finished_at": {
          "type": "integer",
          "description": "The Unix timestamp (in seconds) for when the fine-tuning job was finished. The value will be null if the fine-tuning job is still running.",
          "x-nullable": true,
          "x-anyOf": [
            {
              "type": "integer",
              "description": "The Unix timestamp (in seconds) for when the fine-tuning job was finished. The value will be null if the fine-tuning job is still running."
            },
            {
              "type": "null"
            }
          ]
        },
        "model": {
          "type": "string",
          "description": "The base model that is being fine-tuned."
        },
        "object": {
          "$ref": "#/definitions/FineTuningJobObject"
        },
        "organization_id": {
          "type": "string",
          "description": "The organization that owns the fine-tuning job."
        },
        "result_files": {
          "type": "array",
          "description": "The compiled results file ID(s) for the fine-tuning job. You can retrieve the results with the [Files API](https://platform.openai.com/docs/api-reference/files/retrieve-contents).",
          "items": {
            "type": "string",
            "example": "file-abc123"
          }
        },
        "status": {
          "$ref": "#/definitions/FineTuningJobStatus"
        },
        "trained_tokens": {
          "type": "integer",
          "description": "The total number of billable tokens processed by this fine-tuning job. The value will be null if the fine-tuning job is still running.",
          "x-nullable": true,
          "x-anyOf": [
            {
              "type": "integer",
              "description": "The total number of billable tokens processed by this fine-tuning job. The value will be null if the fine-tuning job is still running."
            },
            {
              "type": "null"
            }
          ]
        },
        "training_file": {
          "type": "string",
          "description": "The file ID used for training. You can retrieve the training data with the [Files API](https://platform.openai.com/docs/api-reference/files/retrieve-contents)."
        },
        "validation_file": {
          "type": "string",
          "description": "The file ID used for validation. You can retrieve the validation results with the [Files API](https://platform.openai.com/docs/api-reference/files/retrieve-contents).",
          "x-nullable": true,
          "x-anyOf": [
            {
              "type": "string",
              "description": "The file ID used for validation. You can retrieve the validation results with the [Files API](https://platform.openai.com/docs/api-reference/files/retrieve-contents)."
            },
            {
              "type": "null"
            }
          ]
        },
        "seed": {
          "type": "integer",
          "description": "The seed used for the fine-tuning job."
        },
        "estimated_finish": {
          "type": "integer",
          "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.",
          "x-nullable": true,
          "x-anyOf": [
            {
              "type": "integer",
              "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": "null"
            }
          ]
        },
        "method": {
          "$ref": "#/definitions/FineTuneMethod"
        },
        "metadata": {
          "$ref": "#/definitions/Metadata"
        }
      },
      "x-oaiMeta": {
        "name": "The fine-tuning job object",
        "example": "{\n  \"object\": \"fine_tuning.job\",\n  \"id\": \"ftjob-abc123\",\n  \"model\": \"davinci-002\",\n  \"created_at\": 1692661014,\n  \"finished_at\": 1692661190,\n  \"fine_tuned_model\": \"ft:davinci-002:my-org:custom_suffix:7q8mpxmy\",\n  \"organization_id\": \"org-123\",\n  \"result_files\": [\n      \"file-abc123\"\n  ],\n  \"status\": \"succeeded\",\n  \"validation_file\": null,\n  \"training_file\": \"file-abc123\",\n  \"hyperparameters\": {\n      \"n_epochs\": 4,\n      \"batch_size\": 1,\n      \"learning_rate_multiplier\": 1.0\n  },\n  \"trained_tokens\": 5768,\n  \"integrations\": [],\n  \"seed\": 0,\n  \"estimated_finish\": 0,\n  \"method\": {\n    \"type\": \"supervised\",\n    \"supervised\": {\n      \"hyperparameters\": {\n        \"n_epochs\": 4,\n        \"batch_size\": 1,\n        \"learning_rate_multiplier\": 1.0\n      }\n    }\n  },\n  \"metadata\": {\n    \"key\": \"value\"\n  }\n}\n"
      }
    },
    "ListPaginatedFineTuningJobsResponse": {
      "type": "object",
      "required": [
        "object",
        "data",
        "has_more"
      ],
      "properties": {
        "data": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/FineTuningJob"
          }
        },
        "has_more": {
          "type": "boolean"
        },
        "object": {
          "$ref": "#/definitions/ListPaginatedFineTuningJobsResponseObject"
        }
      }
    },
    "ListFineTuningJobCheckpointsResponse": {
      "type": "object",
      "required": [
        "object",
        "data",
        "has_more"
      ],
      "properties": {
        "data": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/FineTuningJobCheckpoint"
          }
        },
        "object": {
          "$ref": "#/definitions/ListFineTuningJobCheckpointsResponseObject"
        },
        "first_id": {
          "type": "string",
          "x-nullable": true,
          "x-anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "last_id": {
          "type": "string",
          "x-nullable": true,
          "x-anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "has_more": {
          "type": "boolean"
        }
      }
    },
    "ListFineTuningJobEventsResponse": {
      "type": "object",
      "required": [
        "object",
        "data",
        "has_more"
      ],
      "properties": {
        "data": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/FineTuningJobEvent"
          }
        },
        "object": {
          "$ref": "#/definitions/ListFineTuningJobEventsResponseObject"
        },
        "has_more": {
          "type": "boolean"
        }
      }
    },
    "ListFilesResponse": {
      "type": "object",
      "required": [
        "object",
        "data",
        "first_id",
        "last_id",
        "has_more"
      ],
      "properties": {
        "object": {
          "type": "string",
          "example": "list"
        },
        "data": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/OpenAIFile"
          }
        },
        "first_id": {
          "type": "string",
          "example": "file-abc123"
        },
        "last_id": {
          "type": "string",
          "example": "file-abc456"
        },
        "has_more": {
          "type": "boolean",
          "example": false
        }
      }
    },
    "CreateFileRequest": {
      "type": "object",
      "required": [
        "file",
        "purpose"
      ],
      "properties": {
        "file": {
          "type": "string",
          "format": "binary",
          "description": "The File object (not file name) to be uploaded.\n",
          "x-oaiMeta": {
            "exampleFilePath": "fine-tune.jsonl"
          }
        },
        "purpose": {
          "$ref": "#/definitions/FilePurpose"
        },
        "expires_after": {
          "$ref": "#/definitions/FileExpirationAfter"
        }
      }
    },
    "OpenAIFile": {
      "title": "OpenAIFile",
      "description": "The `File` object represents a document that has been uploaded to OpenAI.",
      "required": [
        "id",
        "object",
        "bytes",
        "created_at",
        "filename",
        "purpose",
        "status"
      ],
      "properties": {
        "id": {
          "type": "string",
          "description": "The file identifier, which can be referenced in the API endpoints."
        },
        "bytes": {
          "type": "integer",
          "description": "The size of the file, in bytes."
        },
        "created_at": {
          "type": "integer",
          "description": "The Unix timestamp (in seconds) for when the file was created."
        },
        "expires_at": {
          "type": "integer",
          "description": "The Unix timestamp (in seconds) for when the file will expire."
        },
        "filename": {
          "type": "string",
          "description": "The name of the file."
        },
        "object": {
          "$ref": "#/definitions/OpenAIFileObject"
        },
        "purpose": {
          "type": "string",
          "description": "The intended purpose of the file. Supported values are `assistants`, `assistants_output`, `batch`, `batch_output`, `fine-tune`, `fine-tune-results`, `vision`, and `user_data`.",
          "enum": [
            "assistants",
            "assistants_output",
            "batch",
            "batch_output",
            "fine-tune",
            "fine-tune-results",
            "vision",
            "user_data"
          ]
        },
        "status": {
          "$ref": "#/definitions/OpenAIFileStatus"
        },
        "status_details": {
          "type": "string",
          "description": "Deprecated. For details on why a fine-tuning training file failed validation, see the `error` field on `fine_tuning.job`."
        },
        "is_cmek_encrypted": {
          "type": "boolean",
          "description": "Whether the file's contents carry an additional layer of encryption with a customer-managed key (CMEK), on top of the storage-native encryption applied to all objects.",
          "default": false
        }
      },
      "x-oaiMeta": {
        "name": "The file object",
        "example": "{\n  \"id\": \"file-abc123\",\n  \"object\": \"file\",\n  \"bytes\": 120000,\n  \"created_at\": 1677610602,\n  \"expires_at\": 1680202602,\n  \"filename\": \"salesOverview.pdf\",\n  \"purpose\": \"assistants\",\n}\n"
      }
    },
    "DeleteFileResponse": {
      "type": "object",
      "required": [
        "id",
        "object",
        "deleted"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "object": {
          "$ref": "#/definitions/DeleteFileResponseObject"
        },
        "deleted": {
          "type": "boolean"
        }
      }
    },
    "ListIntelligenceModelsResponse": {
      "type": "object",
      "required": [
        "object",
        "data"
      ],
      "properties": {
        "object": {
          "$ref": "#/definitions/ListIntelligenceModelsResponseObject"
        },
        "data": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/IntelligenceModel"
          }
        }
      }
    },
    "IntelligenceModel": {
      "type": "object",
      "required": [
        "id",
        "object",
        "owned_by",
        "model_source",
        "model_name",
        "model_revision",
        "globally_available",
        "project_ids",
        "inference_available",
        "fine_tuning_available",
        "model_type",
        "created"
      ],
      "properties": {
        "id": {
          "type": "string",
          "description": "Unique identifier for the model",
          "example": "admin-model-abc123"
        },
        "object": {
          "$ref": "#/definitions/IntelligenceModelObject"
        },
        "owned_by": {
          "type": "string",
          "description": "The organization that owns the model",
          "example": "org-123"
        },
        "model_source": {
          "$ref": "#/definitions/IntelligenceModelModelSource"
        },
        "model_name": {
          "type": "string",
          "description": "Model identifier within the source registry",
          "example": "meta-llama/Llama-2-7b-hf"
        },
        "model_revision": {
          "type": "string",
          "description": "Git revision or branch",
          "example": "main"
        },
        "globally_available": {
          "type": "boolean",
          "description": "Whether the model is available to all projects",
          "example": false
        },
        "project_ids": {
          "type": "array",
          "description": "Project IDs that can access this model (empty when globally_available is true)",
          "example": [
            "proj-123"
          ],
          "items": {
            "type": "string"
          }
        },
        "inference_available": {
          "type": "boolean",
          "description": "Whether the model is available for inference",
          "example": true
        },
        "fine_tuning_available": {
          "type": "boolean",
          "description": "Whether the model is available for fine-tuning",
          "example": false
        },
        "model_type": {
          "$ref": "#/definitions/ModelType"
        },
        "base_model_id": {
          "type": "string",
          "x-nullable": true,
          "description": "Registry ID of the parent base model (set for adapters, null for base models)",
          "example": "model-abc123"
        },
        "created": {
          "type": "integer",
          "description": "Unix timestamp of when the model was registered",
          "example": 1700000000
        }
      }
    },
    "DeleteIntelligenceModelResponse": {
      "type": "object",
      "required": [
        "id",
        "object",
        "deleted"
      ],
      "properties": {
        "id": {
          "type": "string",
          "description": "The ID of the deleted model."
        },
        "object": {
          "$ref": "#/definitions/DeleteIntelligenceModelResponseObject"
        },
        "deleted": {
          "type": "boolean",
          "description": "Always `true` on success."
        }
      }
    },
    "MetricName": {
      "type": "string",
      "title": "MetricName",
      "description": "Supported fine-tuning metric names.",
      "enum": [
        "ev_loss",
        "ev_eval_loss",
        "ev_current_step",
        "ev_total_steps",
        "ev_learning_rate",
        "ev_grad_norm",
        "ev_num_input_tokens_seen",
        "ev_eval_samples_per_second",
        "ev_eval_steps_per_second",
        "ev_estimated_finish",
        "ev_train_loss",
        "ev_train_runtime",
        "ev_train_samples_per_second",
        "ev_train_steps_per_second",
        "ev_train_tokens_per_second",
        "ev_total_flos"
      ]
    },
    "FineTuningJobMetricsResponse": {
      "type": "object",
      "title": "FineTuningJobMetricsResponse",
      "description": "Time-series training metrics for a fine-tuning job.",
      "required": [
        "object",
        "fine_tuning_job_id",
        "x_axis",
        "metrics"
      ],
      "properties": {
        "object": {
          "$ref": "#/definitions/FineTuningJobMetricsResponseObject"
        },
        "fine_tuning_job_id": {
          "type": "string",
          "description": "The ID of the fine-tuning job these metrics belong to."
        },
        "x_axis": {
          "type": "string",
          "description": "The x-axis type for the data points.",
          "enum": [
            "timestamp",
            "step_count"
          ]
        },
        "metrics": {
          "type": "array",
          "description": "List of metric time series.",
          "items": {
            "$ref": "#/definitions/MetricSeries"
          }
        }
      }
    },
    "FineTuneMethod": {
      "type": "object",
      "description": "The method used for fine-tuning. Only `supervised` is supported.",
      "required": [
        "type"
      ],
      "properties": {
        "type": {
          "$ref": "#/definitions/FineTuneMethodType"
        },
        "supervised": {
          "$ref": "#/definitions/FineTuneSupervisedMethod"
        }
      }
    },
    "Metadata": {
      "type": "object",
      "description": "Set of 16 key-value pairs that can be attached to an object. This can be\nuseful for storing additional information about the object in a structured\nformat, and querying for objects via API or the dashboard.\n\nKeys are strings with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.\n",
      "additionalProperties": {
        "type": "string"
      },
      "x-oaiTypeLabel": "map",
      "x-nullable": true,
      "x-anyOf": [
        {
          "type": "object",
          "description": "Set of 16 key-value pairs that can be attached to an object. This can be\nuseful for storing additional information about the object in a structured\nformat, and querying for objects via API or the dashboard.\n\nKeys are strings with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.\n",
          "additionalProperties": {
            "type": "string"
          },
          "x-oaiTypeLabel": "map"
        },
        {
          "type": "null"
        }
      ]
    },
    "FineTuningJobObject": {
      "type": "string",
      "description": "The object type, which is always \"fine_tuning.job\".",
      "enum": [
        "fine_tuning.job"
      ],
      "x-stainless-const": true
    },
    "FineTuningJobStatus": {
      "type": "string",
      "description": "The current status of the fine-tuning job, which can be either `validating_files`, `queued`, `running`, `succeeded`, `failed`, or `cancelled`.",
      "enum": [
        "validating_files",
        "queued",
        "running",
        "succeeded",
        "failed",
        "cancelled"
      ]
    },
    "ListPaginatedFineTuningJobsResponseObject": {
      "type": "string",
      "enum": [
        "list"
      ],
      "x-stainless-const": true
    },
    "FineTuningJobCheckpoint": {
      "type": "object",
      "title": "FineTuningJobCheckpoint",
      "description": "The `fine_tuning.job.checkpoint` object represents a model checkpoint for a fine-tuning job that is ready to use.\n",
      "required": [
        "created_at",
        "fine_tuning_job_id",
        "fine_tuned_model_checkpoint",
        "id",
        "metrics",
        "object",
        "step_number"
      ],
      "properties": {
        "id": {
          "type": "string",
          "description": "The checkpoint identifier, which can be referenced in the API endpoints."
        },
        "created_at": {
          "type": "integer",
          "description": "The Unix timestamp (in seconds) for when the checkpoint was created."
        },
        "fine_tuned_model_checkpoint": {
          "type": "string",
          "description": "The name of the fine-tuned checkpoint model that is created."
        },
        "step_number": {
          "type": "integer",
          "description": "The step number that the checkpoint was created at."
        },
        "metrics": {
          "type": "object",
          "description": "Metrics at the step number during the fine-tuning job.",
          "properties": {
            "step": {
              "type": "number"
            },
            "train_loss": {
              "type": "number"
            },
            "train_mean_token_accuracy": {
              "type": "number"
            },
            "valid_loss": {
              "type": "number"
            },
            "valid_mean_token_accuracy": {
              "type": "number"
            },
            "full_valid_loss": {
              "type": "number"
            },
            "full_valid_mean_token_accuracy": {
              "type": "number"
            }
          }
        },
        "fine_tuning_job_id": {
          "type": "string",
          "description": "The name of the fine-tuning job that this checkpoint was created from."
        },
        "object": {
          "$ref": "#/definitions/FineTuningJobCheckpointObject"
        },
        "fine_tuned_model_id": {
          "type": "string",
          "x-nullable": true,
          "description": "The model registry ID of the registered adapter for this checkpoint, usable as the `model` for inference. Null until the checkpoint has been registered.",
          "default": null,
          "x-anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "x-oaiMeta": {
        "name": "The fine-tuning job checkpoint object",
        "example": "{\n  \"object\": \"fine_tuning.job.checkpoint\",\n  \"id\": \"ftckpt_qtZ5Gyk4BLq1SfLFWp3RtO3P\",\n  \"created_at\": 1712211699,\n  \"fine_tuned_model_checkpoint\": \"ft:gpt-4o-mini-2024-07-18:my-org:custom_suffix:9ABel2dg:ckpt-step-88\",\n  \"fine_tuning_job_id\": \"ftjob-fpbNQ3H1GrMehXRf8cO97xTN\",\n  \"metrics\": {\n    \"step\": 88,\n    \"train_loss\": 0.478,\n    \"train_mean_token_accuracy\": 0.924,\n    \"valid_loss\": 10.112,\n    \"valid_mean_token_accuracy\": 0.145,\n    \"full_valid_loss\": 0.567,\n    \"full_valid_mean_token_accuracy\": 0.944\n  },\n  \"step_number\": 88\n}\n"
      }
    },
    "ListFineTuningJobCheckpointsResponseObject": {
      "type": "string",
      "enum": [
        "list"
      ],
      "x-stainless-const": true
    },
    "FineTuningJobEvent": {
      "type": "object",
      "description": "Fine-tuning job event object",
      "required": [
        "id",
        "object",
        "created_at",
        "level",
        "message"
      ],
      "properties": {
        "object": {
          "$ref": "#/definitions/FineTuningJobEventObject"
        },
        "id": {
          "type": "string",
          "description": "The object identifier."
        },
        "created_at": {
          "type": "integer",
          "description": "The Unix timestamp (in seconds) for when the fine-tuning job was created."
        },
        "level": {
          "type": "string",
          "description": "The log level of the event.",
          "enum": [
            "info",
            "warn",
            "error"
          ]
        },
        "message": {
          "type": "string",
          "description": "The message of the event."
        },
        "type": {
          "$ref": "#/definitions/FineTuningJobEventType"
        },
        "data": {
          "type": "object",
          "description": "The data associated with the event."
        }
      },
      "x-oaiMeta": {
        "name": "The fine-tuning job event object",
        "example": "{\n  \"object\": \"fine_tuning.job.event\",\n  \"id\": \"ftevent-abc123\"\n  \"created_at\": 1677610602,\n  \"level\": \"info\",\n  \"message\": \"Created fine-tuning job\",\n  \"data\": {},\n  \"type\": \"message\"\n}\n"
      }
    },
    "ListFineTuningJobEventsResponseObject": {
      "type": "string",
      "enum": [
        "list"
      ],
      "x-stainless-const": true
    },
    "FilePurpose": {
      "type": "string",
      "description": "The intended purpose of the file. Supported values are `fine-tune` and `batch`.",
      "enum": [
        "fine-tune",
        "batch"
      ]
    },
    "FileExpirationAfter": {
      "type": "object",
      "title": "File expiration policy",
      "description": "The expiration policy for a file. By default, files with `purpose=batch` expire after 30 days and all other files are persisted until they are manually deleted.",
      "required": [
        "anchor",
        "seconds"
      ],
      "properties": {
        "anchor": {
          "type": "string",
          "description": "Anchor timestamp after which the expiration policy applies. Supported anchors: `created_at`.",
          "enum": [
            "created_at"
          ],
          "x-stainless-const": true
        },
        "seconds": {
          "type": "integer",
          "description": "The number of seconds after the anchor time that the file will expire. Must be between 3600 (1 hour) and 2592000 (30 days).",
          "minimum": 3600,
          "maximum": 2592000
        }
      }
    },
    "OpenAIFileObject": {
      "type": "string",
      "description": "The object type, which is always `file`.",
      "enum": [
        "file"
      ],
      "x-stainless-const": true
    },
    "OpenAIFileStatus": {
      "type": "string",
      "description": "Deprecated. The current status of the file, which can be either `uploaded`, `processed`, or `error`.",
      "enum": [
        "uploaded",
        "processed",
        "error"
      ]
    },
    "DeleteFileResponseObject": {
      "type": "string",
      "enum": [
        "file"
      ],
      "x-stainless-const": true
    },
    "ListIntelligenceModelsResponseObject": {
      "type": "string",
      "enum": [
        "list"
      ],
      "example": "list"
    },
    "IntelligenceModelObject": {
      "type": "string",
      "description": "The object type, which is always \"model\"",
      "enum": [
        "model"
      ],
      "example": "model"
    },
    "IntelligenceModelModelSource": {
      "type": "string",
      "description": "Registry the model originates from",
      "enum": [
        "huggingface",
        "evolution"
      ],
      "example": "huggingface"
    },
    "ModelType": {
      "type": "string",
      "description": "Whether the model is a base model or a fine-tuned adapter",
      "enum": [
        "base_model",
        "adapter"
      ]
    },
    "DeleteIntelligenceModelResponseObject": {
      "type": "string",
      "enum": [
        "model"
      ],
      "example": "model"
    },
    "FineTuningJobMetricsResponseObject": {
      "type": "string",
      "description": "The object type, which is always \"fine_tuning.job.metrics\".",
      "enum": [
        "fine_tuning.job.metrics"
      ]
    },
    "MetricSeries": {
      "type": "object",
      "title": "MetricSeries",
      "description": "A named metric with its time-series data points.",
      "required": [
        "metric_name",
        "data"
      ],
      "properties": {
        "metric_name": {
          "$ref": "#/definitions/MetricName"
        },
        "data": {
          "type": "array",
          "description": "Ordered list of data points for this metric.",
          "items": {
            "$ref": "#/definitions/MetricDataPoint"
          }
        }
      }
    },
    "FineTuneMethodType": {
      "type": "string",
      "description": "The type of method. Only `supervised` is supported.",
      "enum": [
        "supervised"
      ]
    },
    "FineTuneSupervisedMethod": {
      "type": "object",
      "description": "Configuration for the supervised fine-tuning method.",
      "properties": {
        "hyperparameters": {
          "$ref": "#/definitions/FineTuneSupervisedHyperparameters"
        }
      }
    },
    "FineTuningJobCheckpointObject": {
      "type": "string",
      "description": "The object type, which is always \"fine_tuning.job.checkpoint\".",
      "enum": [
        "fine_tuning.job.checkpoint"
      ],
      "x-stainless-const": true
    },
    "FineTuningJobEventObject": {
      "type": "string",
      "description": "The object type, which is always \"fine_tuning.job.event\".",
      "enum": [
        "fine_tuning.job.event"
      ],
      "x-stainless-const": true
    },
    "FineTuningJobEventType": {
      "type": "string",
      "description": "The type of event.",
      "enum": [
        "message",
        "metrics"
      ]
    },
    "MetricDataPoint": {
      "type": "object",
      "title": "MetricDataPoint",
      "description": "A single metric data point.",
      "required": [
        "x",
        "value"
      ],
      "properties": {
        "x": {
          "type": "number",
          "description": "X-axis value \u2014 either a Unix timestamp (seconds) or a step count, depending on x_axis."
        },
        "value": {
          "type": "number",
          "description": "The metric value at this point."
        }
      }
    },
    "FineTuneSupervisedHyperparameters": {
      "type": "object",
      "description": "The hyperparameters used for the fine-tuning job.",
      "properties": {
        "batch_size": {
          "description": "Number of examples in each batch. A larger batch size means that model parameters are updated less frequently, but with lower variance. Must be a power of 2 between 16 and 1024.\n",
          "default": "auto",
          "x-anyOf": [
            {
              "type": "string",
              "enum": [
                "auto"
              ],
              "x-stainless-const": true
            },
            {
              "type": "integer",
              "enum": [
                16,
                32,
                64,
                128,
                256,
                512,
                1024
              ]
            }
          ]
        },
        "learning_rate_multiplier": {
          "description": "Scaling factor for the learning rate. A smaller learning rate may be useful to avoid overfitting.\n",
          "x-anyOf": [
            {
              "type": "string",
              "enum": [
                "auto"
              ],
              "x-stainless-const": true
            },
            {
              "type": "number",
              "exclusiveMinimum": 0
            }
          ]
        },
        "n_epochs": {
          "description": "The number of epochs to train the model for. An epoch refers to one full cycle through the training dataset.\n",
          "default": "auto",
          "x-anyOf": [
            {
              "type": "string",
              "enum": [
                "auto"
              ],
              "x-stainless-const": true
            },
            {
              "type": "integer",
              "minimum": 1,
              "maximum": 50
            }
          ]
        },
        "lora_variant": {
          "type": "string",
          "description": "LoRA variant to use. \"lora\" uses standard LoRA scaling (1/rank); \"rslora\" uses rank-stabilized LoRA scaling (1/sqrt(rank)).",
          "default": "lora",
          "enum": [
            "lora",
            "rslora"
          ]
        },
        "lora_rank": {
          "type": "integer",
          "enum": [
            2,
            4,
            8,
            16,
            32,
            64,
            128,
            256
          ],
          "x-nullable": true,
          "description": "LoRA attention dimension (r parameter). Must be a power of 2.",
          "x-anyOf": [
            {
              "type": "integer",
              "enum": [
                2,
                4,
                8,
                16,
                32,
                64,
                128,
                256
              ]
            },
            {
              "type": "null"
            }
          ]
        },
        "lora_alpha": {
          "type": "integer",
          "enum": [
            1,
            2,
            4,
            8,
            16,
            32,
            64,
            128,
            256,
            512
          ],
          "x-nullable": true,
          "description": "LoRA scaling parameter (alpha). Must be a power of 2.",
          "x-anyOf": [
            {
              "type": "integer",
              "enum": [
                1,
                2,
                4,
                8,
                16,
                32,
                64,
                128,
                256,
                512
              ]
            },
            {
              "type": "null"
            }
          ]
        },
        "lora_dropout": {
          "type": "number",
          "minimum": 0,
          "maximum": 1,
          "x-nullable": true,
          "description": "LoRA dropout probability. Must be between 0 and 1.",
          "x-anyOf": [
            {
              "type": "number",
              "minimum": 0,
              "maximum": 1
            },
            {
              "type": "null"
            }
          ]
        },
        "early_stopping_patience": {
          "type": "integer",
          "minimum": 1,
          "x-nullable": true,
          "description": "Number of evaluation calls without improvement before stopping training. Set to null (default) to disable early stopping.",
          "x-anyOf": [
            {
              "type": "integer",
              "minimum": 1
            },
            {
              "type": "null"
            }
          ]
        },
        "warmup_ratio": {
          "type": "number",
          "minimum": 0,
          "maximum": 1,
          "x-nullable": true,
          "description": "Fraction of total training steps used for linear warmup",
          "x-anyOf": [
            {
              "type": "number",
              "minimum": 0,
              "maximum": 1
            },
            {
              "type": "null"
            }
          ]
        },
        "learning_rate": {
          "description": "Absolute learning rate for training",
          "x-anyOf": [
            {
              "type": "string",
              "enum": [
                "auto"
              ]
            },
            {
              "type": "number"
            }
          ]
        },
        "weight_decay": {
          "type": "number",
          "minimum": 0,
          "x-nullable": true,
          "description": "Weight decay (L2 regularization) coefficient",
          "x-anyOf": [
            {
              "type": "number",
              "minimum": 0
            },
            {
              "type": "null"
            }
          ]
        },
        "top_k_gating": {
          "type": "integer",
          "enum": [
            1,
            2,
            4,
            8,
            16
          ],
          "x-nullable": true,
          "description": "Number of experts activated per token (top-k). Must be a power of 2.",
          "x-anyOf": [
            {
              "type": "integer",
              "enum": [
                1,
                2,
                4,
                8,
                16
              ]
            },
            {
              "type": "null"
            }
          ]
        },
        "checkpoint_steps": {
          "type": "number",
          "minimum": 20,
          "x-nullable": true,
          "description": "Number of update steps between two checkpoint saves.",
          "x-anyOf": [
            {
              "type": "number",
              "minimum": 20
            },
            {
              "type": "null"
            }
          ]
        },
        "eval_steps_per_epoch": {
          "type": "number",
          "minimum": 1,
          "x-nullable": true,
          "description": "Number of evaluation steps per epoch.",
          "x-anyOf": [
            {
              "type": "number",
              "minimum": 1
            },
            {
              "type": "null"
            }
          ]
        },
        "overlong_row_behavior": {
          "type": "string",
          "description": "How to handle training rows that exceed the maximum sequence length. \"error\" (default) raises an error; \"drop\" silently discards overlong rows before training.",
          "default": "error",
          "enum": [
            "error",
            "drop"
          ]
        },
        "lr_scheduler": {
          "type": "string",
          "description": "Learning rate scheduler type. See https://huggingface.co/docs/transformers/en/main_classes/optimizer_schedules#transformers.SchedulerType for details on each option.",
          "default": "cosine",
          "enum": [
            "cosine",
            "constant",
            "constant_with_warmup",
            "linear"
          ]
        }
      }
    }
  },
  "securityDefinitions": {
    "ApiKeyAuth": {
      "type": "apiKey",
      "name": "Authorization",
      "in": "header",
      "description": ""
    }
  },
  "security": [
    {
      "ApiKeyAuth": []
    }
  ]
}
