Fine tuning

Estimate price

POST
/fine-tunes/estimate-price

Estimate the price of a fine-tuning job.

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Request Body

application/json

training_file*string

File-ID of a training file uploaded to the Together API

validation_file?string

File-ID of a validation file uploaded to the Together API

model?string

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

n_epochs?integer

Number of complete passes through the training dataset (higher values may improve results but increase cost and risk of overfitting)

Default1
n_evals?integer

Number of evaluations to be run on a given validation set during training

Default0
training_method?|

The training method to use. 'sft' for Supervised Fine-Tuning or 'dpo' for Direct Preference Optimization.

training_type?|

The training type to use. Defaults to LoRA if not provided.

Defaultnull
from_checkpoint?string

The checkpoint identifier to continue training from a previous fine-tuning job. Format is {$JOB_ID} or {$OUTPUT_MODEL_NAME} or {$JOB_ID}:{$STEP} or {$OUTPUT_MODEL_NAME}:{$STEP}. The step value is optional; without it, uses the final checkpoint.

Response Body

application/json

application/json

curl -X POST "https://example.com/fine-tunes/estimate-price" \  -H "Content-Type: application/json" \  -d '{    "training_file": "string"  }'
{  "estimation_available": true,  "estimated_total_price": 0,  "allowed_to_proceed": true,  "user_limit": 0,  "estimated_train_token_count": 0,  "estimated_eval_token_count": 0}