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

      Upload File

      Develop Env
      https://dev.your-api-server.com
      Develop Env
      https://dev.your-api-server.com
      POST
      /files
      Upload a file that can be used across various endpoints.
      The size of individual files can be a maximum of 512 MB. The Fine-tuning API only supports .jsonl files.
      Please contact us if you need to increase these storage limits.
      Request Request Example
      Shell
      JavaScript
      Java
      Swift
      curl --location --request POST 'https://dev.your-api-server.com/files' \
      --form 'purpose="fine-tune"' \
      --form 'file=@""'
      Response Response Example
      {
          "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
          "object": "file",
          "bytes": 12000,
          "created_at": 1717491627,
          "filename": "train.jsonl",
          "purpose": "fine-tune"
      }

      Request

      Body Params multipart/form-data
      purpose
      Purpose
      required
      The intended purpose of the uploaded file. Only accepts fine-tuning (fine-tune) for now.
      Allowed value:
      fine-tune
      Example:
      fine-tune
      file
      file 
      required
      The File object (not file name) to be uploaded.
      To upload a file and specify a custom file name you should format your request as such:
      file=@path/to/your/file.jsonl;filename=custom_name.jsonl
      Otherwise, you can just keep the original file name:
      file=@path/to/your/file.jsonl

      Responses

      🟢200OK
      application/json
      Body
      id
      string <uuid>
      Id
      required
      The ID of the created file.
      object
      string 
      Object
      required
      Example:
      file
      bytes
      integer 
      Bytes
      required
      The size (in bytes) of the created file.
      Example:
      12000
      created_at
      integer 
      Created At
      required
      The UNIX timestamp (in seconds) for the creation time of the file.
      Example:
      1717491627
      filename
      string 
      Filename
      required
      The name of the file that was uploaded.
      Example:
      train.jsonl
      purpose
      Purpose
      required
      Allowed value:
      fine-tune
      Modified at 2024-07-29 08:30:19
      Previous
      Delete Model
      Next
      List Files
      Built with