Skip to main content
POST
/
fine-tunes
Create job
curl --request POST \
  --url https://api.together.xyz/v1/fine-tunes \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{
  "training_file": "<string>",
  "model": "<string>",
  "n_epochs": 1,
  "n_checkpoints": 1,
  "batch_size": 32,
  "learning_rate": 0.00001,
  "suffix": "<string>",
  "wandb_api_key": "<string>"
}'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "training_file": "<string>",
  "validation_file": "<string>",
  "model": "<string>",
  "model_output_name": "<string>",
  "model_output_path": "<string>",
  "TrainingFileNumLines": 123,
  "TrainingFileSize": 123,
  "created_at": "<string>",
  "updated_at": "<string>",
  "n_epochs": 123,
  "n_checkpoints": 123,
  "batch_size": 123,
  "learning_rate": 123,
  "eval_steps": 123,
  "lora": true,
  "lora_r": 123,
  "lora_alpha": 123,
  "lora_dropout": 123,
  "status": "pending",
  "job_id": "<string>",
  "events": [
    {
      "object": "FinetuneEvent",
      "created_at": "<string>",
      "level": "info",
      "message": "<string>",
      "type": "job_pending",
      "param_count": 123,
      "token_count": 123,
      "wandb_url": "<string>",
      "hash": "<string>"
    }
  ],
  "token_count": 123,
  "param_count": 123,
  "total_price": 123,
  "epochs_completed": 123,
  "queue_depth": 123,
  "wandb_project_name": "<string>",
  "wandb_url": "<string>"
}

Authorizations

Authorization
string
header
default:default
required

Body

application/json
training_file
string
required

File-ID of a file uploaded to the Together API

model
string
required

Name of the base model to run fine-tune job on

n_epochs
integer
default:1

Number of epochs for fine-tuning

n_checkpoints
integer
default:1

Number of checkpoints to save during fine-tuning

batch_size
integer
default:32

Batch size for fine-tuning

learning_rate
number
default:0.00001

Learning rate multiplier to use for training

suffix
string

Suffix that will be added to your fine-tuned model name

wandb_api_key
string

API key for Weights & Biases integration

Response

200 - application/json

Fine-tuning job initiated successfully

id
string<uuid>
required
status
enum<string>
required
Available options:
pending,
queued,
running,
compressing,
uploading,
cancel_requested,
cancelled,
error,
completed
training_file
string
validation_file
string
model
string
model_output_name
string
model_output_path
string
TrainingFileNumLines
integer
TrainingFileSize
integer
created_at
string
updated_at
string
n_epochs
integer
n_checkpoints
integer
batch_size
integer
learning_rate
number
eval_steps
integer
lora
boolean
lora_r
integer
lora_alpha
integer
lora_dropout
integer
job_id
string
events
object[]
token_count
integer
param_count
integer
total_price
integer
epochs_completed
integer
queue_depth
integer
wandb_project_name
string
wandb_url
string