Use fine-tuning when you want to adapt a base model to your own training examples and operational style. The fine-tuning endpoints create an asynchronous job from uploaded JSONL files and return a model ID when training succeeds. Fine-tuning endpoints are marked ADMIN ONLY in the generated API reference. Use an API key with the required permissions.Documentation Index
Fetch the complete documentation index at: https://docs.mka1.com/llms.txt
Use this file to discover all available pages before exploring further.
Before you start
Prepare:| Input | Description |
|---|---|
| Training file | A JSONL file with your training examples. Upload it with purpose: "fine-tune". |
| Validation file | Optional JSONL validation data. Upload it with purpose: "fine-tune". |
| Base model | The model ID you want to fine-tune, for example meetkai:functionary-medium. |
Step 1 - Upload your training files
Upload each JSONL file with the Files API andpurpose: "fine-tune".
Step 2 - Create a fine-tuning job
Callmka1.llm.fineTuning.create with the base model and your uploaded training file ID.
Add a validation file, suffix, metadata, and method settings when you need them.
Step 3 - Poll job status
Retrieve the job until it reachessucceeded, failed, or cancelled.
mka1.llm.fineTuning.list({ limit, after }).
Step 4 - Inspect training events and checkpoints
Use events for training logs and metrics updates. Use checkpoints to inspect intermediate model checkpoints and their metrics.train_loss, train_mean_token_accuracy, valid_loss, valid_mean_token_accuracy, full_valid_loss, and full_valid_mean_token_accuracy.
Step 5 - Pause, resume, or cancel a job
Usepause when you need to temporarily stop a running job.
Use resume to continue it.
Use cancel to stop it permanently.
Step 6 - Use the fine-tuned model
When the job reachessucceeded, job.fineTunedModel contains the new model ID.
Pass that model ID to a Responses request.