What is the Trainer API?
The Trainer API lets you:- Create and upload training datasets
- Submit AI Toolkit LoRA training jobs
- Poll status/results and download training artifacts (checkpoints, config yaml, samples)
Base URL
https://trainer-api.runcomfy.net
Authentication
All requests require a Bearer token:Authorization: Bearer <token>
Get your token from your Profile page.
Minimum working flow
- Create a dataset (metadata)
- Upload dataset files (direct upload for small files, or signed URLs for large files)
- Wait until the dataset becomes
READY - Submit a training job with your AI Toolkit YAML config
- Poll
statusand fetchresultartifacts
Example
1) Create a dataset
dataset_id (you’ll use it in upload and status calls).
2) Upload files
For small dataset files (≤150MB), upload directly:PUT the bytes to object storage. See Get signed upload URLs.
3) Wait until the dataset is READY
DRAFT → UPLOADING → READY (or FAILED)
4) Submit a training job
config_file is a multiline YAML file, you’ll usually want to JSON-escape it with jq and pipe to curl. See Submit a training job.
