Mistral AI
    Mistral AI
    • Create Chat Completions
      POST
    • Create FIM Completions
      POST
    • Create Embeddings
      POST
    • List Available Models
      GET
    • Delete Model
      DELETE
    • Upload File
      POST
    • List Files
      GET
    • Retrieve File
      GET
    • Delete File
      DELETE
    • List Fine Tuning Jobs
      GET
    • Create Fine Tuning Job
      POST
    • Get Fine Tuning Job
      GET
    • Cancel Fine Tuning Job
      POST

      Create Fine Tuning Job

      Develop Env
      https://dev.your-api-server.com
      Develop Env
      https://dev.your-api-server.com
      POST
      /fine_tuning/jobs
      Create a new fine tuning job, it will be queued for processing.
      Request Request Example
      Shell
      JavaScript
      Java
      Swift
      curl --location --request POST 'https://dev.your-api-server.com/fine_tuning/jobs' \
      --header 'Content-Type: application/json' \
      --data-raw '{
          "model": "open-mistral-7b",
          "training_files": [
              "497f6eca-6276-4993-bfeb-53cbbbba6f08"
          ],
          "validation_files": [
              "497f6eca-6276-4993-bfeb-53cbbbba6f08"
          ],
          "hyperparameters": {
              "training_steps": 1,
              "learning_rate": 0.0001
          },
          "suffix": "string",
          "integrations": [
              {
                  "type": "wandb",
                  "project": "string",
                  "name": "string",
                  "api_key": "string"
              }
          ]
      }'
      Response Response Example
      {
          "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
          "hyperparameters": {
              "training_steps": 1,
              "learning_rate": 0.0001
          },
          "model": "open-mistral-7b",
          "status": "QUEUED",
          "job_type": "string",
          "created_at": 0,
          "modified_at": 0,
          "training_files": [
              "497f6eca-6276-4993-bfeb-53cbbbba6f08"
          ],
          "validation_files": [],
          "object": "job",
          "fine_tuned_model": "string",
          "integrations": [
              {
                  "type": "wandb",
                  "project": "string",
                  "name": "string"
              }
          ]
      }

      Request

      Query Params
      dry_run
      string 
      optional
      Body Params application/json
      model
      enum<string> 
      required
      The name of the model to fine-tune.
      Allowed values:
      open-mistral-7bmistral-small-latest
      training_files
      array[string <uuid>]
      Training Files
      required
      A list containing the IDs of uploaded files that contain training data.
      >= 1 items
      validation_files
      array[string <uuid>]
      Validation Files
      optional
      A list containing the IDs of uploaded files that contain validation data.
      If you provide these files, the data is used to generate validation metrics
      periodically during fine-tuning. These metrics can be viewed in checkpoints
      when getting the status of a running fine-tuning job.
      The same data should not be present in both train and validation files.
      hyperparameters
      object (TrainingParameters) 
      required
      The fine-tuning hyperparameter settings used in a fine-tune job.
      training_steps
      integer 
      Training Steps
      required
      The number of training steps to perform. A training step refers to
      a single update of the model weights during the fine-tuning process.
      This update is typically calculated using a batch of samples from the
      training dataset.
      >= 1
      learning_rate
      number 
      Learning Rate
      optional
      A parameter describing how much to adjust the pre-trained model's weights
      in response to the estimated error each time the weights are updated during
      the fine-tuning process.
      >= 1e-8<= 1
      Default:
      0.0001
      suffix
      string 
      Suffix
      optional
      A string that will be added to your fine-tuning model name.
      For example, a suffix of "my-great-model" would produce a model
      name like ft:open-mistral-7b:my-great-model:xxx...
      <= 18 characters
      integrations
      array[object (WandbIntegration) {4}] 
      Integrations
      optional
      A list of integrations to enable for your fine-tuning job.
      type
      Type
      optional
      Allowed value:
      wandb
      Default:
      wandb
      project
      string 
      Project
      required
      The name of the project that the new run will be created under.
      name
      string 
      Name
      optional
      A display name to set for the run. If not set, will use the job ID as the name.
      api_key
      string 
      Api Key
      required
      The WandB API key to use for authentication.
      Examples

      Responses

      🟢200OK
      application/json
      Body
      optional
      One of
      id
      string <uuid>
      Id
      required
      The ID of the job.
      hyperparameters
      object (TrainingParameters) 
      required
      The fine-tuning hyperparameter settings used in a fine-tune job.
      model
      enum<string> 
      required
      The name of the model to fine-tune.
      Allowed values:
      open-mistral-7bmistral-small-latest
      status
      enum<string> 
      Status
      required
      The current status of the fine-tuning job.
      Allowed values:
      QUEUEDSTARTEDRUNNINGFAILEDSUCCESSCANCELLEDCANCELLATION_REQUESTED
      job_type
      string 
      Job Type
      required
      The type of job (FT for fine-tuning).
      created_at
      integer 
      Created At
      required
      The UNIX timestamp (in seconds) for when the fine-tuning job was created.
      modified_at
      integer 
      Modified At
      required
      The UNIX timestamp (in seconds) for when the fine-tuning job was last modified.
      training_files
      array[string <uuid>]
      Training Files
      required
      A list containing the IDs of uploaded files that contain training data.
      validation_files
      array[string <uuid>]
      Validation Files
      optional
      A list containing the IDs of uploaded files that contain validation data.
      object
      Object
      optional
      Allowed value:
      job
      Default:
      job
      fine_tuned_model
      string 
      Fine Tuned Model
      optional
      The name of the fine-tuned model that is being created. The value will be null if the fine-tuning job is still running.
      integrations
      array[object (WandbIntegrationOut) {3}] 
      Integrations
      optional
      A list of integrations enabled for your fine-tuning job.
      Modified at 2024-07-29 08:30:19
      Previous
      List Fine Tuning Jobs
      Next
      Get Fine Tuning Job
      Built with