For the complete documentation index, see llms.txt. This page is also available as Markdown.

Create Job

Now you can create a fine-tuning job using a previously uploaded file and one of the supported models. Use "id" from the reponse of "/v1/files" and "name" from the reponse of "/v1/fine-tuning/template"

Replace {{API_TOKEN}} with your actual token.

Example Request:

curl --location 'https://api.netmind.ai/v1/fine-tuning/job' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {{API_TOKEN}}' \
--data '{
    "model": "llama-3-8b",
    "training_file_id": "file-KVvi...",
    "hyperparameters": {
        "per_device_train_batch_size": 1,
        "learning_rate": 0.0001,
        "num_train_epochs": 30
    }
}'
import requests
import json

url = "https://api.netmind.ai/v1/fine-tuning/job"

payload = json.dumps({
  "model": "llama-3-8b",
  "training_file_id": "file-KVvi...",
  "hyperparameters": {
    "per_device_train_batch_size": 1,
    "learning_rate": 0.0001,
    "num_train_epochs": 30
  }
})
headers = {
  'Content-Type': 'application/json',
  'Authorization': 'Bearer {{API_TOKEN}}'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

Example Response:

{
    "id": "ftjob-0mlf..."
}

Last updated