Skip to main content

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

  1. Create a dataset (metadata)
  2. Upload dataset files (direct upload for small files, or signed URLs for large files)
  3. Wait until the dataset becomes READY
  4. Submit a training job with your AI Toolkit YAML config
  5. Poll status and fetch result artifacts

Example

1) Create a dataset

Save the returned dataset_id (you’ll use it in upload and status calls).

2) Upload files

For small dataset files (≤150MB), upload directly:
For larger uploads, request signed upload URLs and PUT the bytes to object storage. See Get signed upload URLs.

3) Wait until the dataset is READY

Typical dataset lifecycle: DRAFTUPLOADINGREADY (or FAILED)

4) Submit a training job

Because 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.

6) Poll status and fetch results