v3

OpenAPI 3.1.0MIT2026-07-31192456807.8 KB
Fine-tuning

Preview tokenized data

Preview how sampled rows from a fine-tuning training file will be tokenized before packing.

post/fine-tunes/preview

Request body

modelstring required

Name of the base model whose tokenizer and chat template will be used.

training_filestring required

File-ID of the uploaded JSONL training file to sample for preview.

training_method'sft'

Fine-tuning method to preview. Only supervised fine-tuning is currently supported.

train_on_inputsboolean

Whether prompt or user-message tokens should contribute to training loss in the preview.

top_kinteger

Maximum number of rows from the start of the training file to tokenize.

Response

Tokenized data preview generated successfully

modelstring required

Name of the base model used to tokenize the sampled rows.

dataset_format'general' | 'conversation' | 'instruction' required

Detected SFT dataset format for the sampled rows.

max_seq_lengthinteger required

Maximum sequence length configured for the requested model.

train_on_inputsboolean required

Whether prompt or user-message tokens contribute to training loss.