Send a Modaic bearer token in the Authorization header.
Headers
Idempotency-Keystring
Optional, 8–255 characters. Reuse only for the identical request.
Body
modelstringrequired
mo/mo-1.3.1, or an existing workspace/model using that base. Mo Fast returns 422 fine_tune_base_model_unsupported.
training_filestringrequired
Completed uploaded dataset name. Training datasets are limited to 8 GiB and 1,000,000 rows. Rows may contain named image assets; a referenced image requires a vision-capable base, and the current text-only mo base returns fine_tune_modality_unsupported.
training_typehead_only | loradefault: head_only
Training mode.
destinationstring
Required with a base model: workspace/model. For an existing model, omit or match its name.
branchstringdefault: main
Existing destination branch. Omit it to publish to main.
tagstring
Optional immutable name created at the completed checkpoint.
Optional uploaded dataset used for validation. When omitted, validation rows are selected deterministically from training_file.
eval_only_datasetstring
Optional uploaded eval-only-dataset used for final held-out evaluation. When omitted, evaluation rows are selected deterministically from training_file.
from_checkpointstring
Checkpoint reference to continue compatible training.
suffixstring
Optional label, 1–64 letters, digits, underscores, or hyphens.
lora_rinteger
LoRA rank; only admitted recipes are accepted.
lora_alphanumber
LoRA scaling.
lora_dropoutnumber
LoRA dropout.
max_seq_lengthintegerdefault: 262144
1–262144.
n_epochsintegerdefault: 1
1–100.
max_stepsinteger | nulldefault: null
Optional 1–1000000 optimizer-step ceiling. Sampling is deterministic for the same dataset and random seed.
max_eval_examplesinteger | nulldefault: null
Optional 1–1000000 per-partition evaluation-example ceiling. Selection is deterministic for the same dataset and random seed.
lr_scheduler_type: constant (default), linear, or cosine. Optional lr_scheduler_args: min_lr_ratio (0–1, default 0) and num_cycles (positive, at most 100, default 0.5).
Metrics, evaluation, advisory qualityGate, readinessAssessment,
servingQualification, and publication when available. Readiness checks use
passed, warning, or unknown; unavailable evaluation does not unpublish
valid trained weights. Serving qualification identifies the training data as
datasetSha256; it has no task ID. Publication includes commitSha,
branch, and the optional immutable tag.
errorobject | null
Failure code and message. fine_tune_modality_unsupported means the dataset
references an image but the selected base is text-only.