READY status can be mounted and used by a training job.
Quickstart (minimum working flow)
POST /prod/v1/trainers/datasets→ create a dataset (getdataset_id+dataset_name)- Upload files
- ≤150MB per file:
POST /prod/v1/trainers/datasets/{dataset_id}/upload - >150MB per file:
POST /prod/v1/trainers/datasets/{dataset_id}/get-upload-endpoint→PUTeach file to the returnedupload_url
- ≤150MB per file:
GET /prod/v1/trainers/datasets/{dataset_id}/status→ poll untilREADY- Use
dataset_namein training job requests
Dataset status lifecycle
Datasets move through these statuses:DRAFT: dataset resource created, but it contains no uploaded files yetUPLOADING: dataset is currently receiving files (either direct upload or signed URL uploads)READY: all uploaded files are complete and validation passed; the duration depends on file count, file size, and whether all uploads complete successfully; when it is READY, the dataset can be mounted by a training jobFAILED: upload/validation failed;errorfield is present
Endpoints
Base URL:https://trainer-api.runcomfy.net
| Endpoint | Method | Description |
|---|---|---|
/prod/v1/trainers/datasets | POST | Create a dataset resource (metadata only) |
/prod/v1/trainers/datasets/{dataset_id}/upload | POST | Upload a dataset file (≤150MB) |
/prod/v1/trainers/datasets/{dataset_id}/get-upload-endpoint | POST | Get signed upload URLs (for larger/multi-file uploads) |
/prod/v1/trainers/datasets/{dataset_id}/status | GET | Get a dataset status |
/prod/v1/trainers/datasets | GET | List datasets |
/prod/v1/trainers/datasets/{dataset_id} | DELETE | Delete a dataset |
Common Parameters
| Field | Type | Description |
|---|---|---|
id | string | Stable identifier for this dataset (used as dataset_id in API paths for upload/status/delete) |
name | string | Human-readable dataset name (used as dataset_name in training job requests; must be unique within your account) |
status | string | One of: DRAFT, UPLOADING, READY, FAILED |
created_at | string | ISO 8601 timestamp (microsecond precision, e.g. 2025-07-22T13:05:16.143086) |
updated_at | string | ISO 8601 timestamp (microsecond precision, e.g. 2025-07-22T13:05:16.143086) |
error | object | Present when status = FAILED |
Create a dataset
Create a new dataset resource (metadata only) that you will upload training files into. Right after creation, the dataset is empty (no files uploaded yet) and itsstatus is DRAFT.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | no | Optional. Human-readable dataset name. Must be unique within your account. This value is used as dataset_name in training job requests. If omitted, RunComfy generates one (e.g. ds_...). |
Request example
Response example
Upload a dataset file (≤150MB)
Use this endpoint for small files. For larger uploads or multi-file batches, use Get signed upload URLs. Rules (important):- Size limit: ≤150MB per file (150,000,000 bytes). For larger files, use signed URLs.
-
Supported file types: images, videos, and caption
.txtfiles. -
Caption naming rule (critical for LoRA / AI Toolkit): each image/video must have a caption file with the same base filename.
- Example:
img_0001.jpg↔img_0001.txt - Example:
clip_0001.mp4↔clip_0001.txt
- Example:
- Track upload success per file: check the response for each upload request. If an upload fails, the response returns an error and the file is not added to the dataset.
-
If the same filename is uploaded multiple times within the same
dataset_id, the latest upload overwrites the previous one. -
In
curl --form "file=@./path/to/file", the@./path/to/fileis a local path on the machine runningcurl(relative to your current directory or an absolute path).
Request
file(required): the file to upload
Request example
Response example
Get signed upload URLs (file size > 150MB)
RunComfy returns short-lived signed URLs you can upload to (typically object storage). Use this when a file is >150MB.Request body
For multi-file uploads, provide a map offilename -> size_in_bytes.
Notes: size_in_bytes must exactly match the actual file size in bytes.
RunComfy generates signed upload URLs based on the byte size you provide. If the size is incorrect (larger or smaller than the real file), the upload may be rejected by the storage service and fail.
Request example
Response example
Upload bytes to the signed URL
Use themethod and headers returned in the response.
Note:
- If a signed URL expires, call
get-upload-endpointagain to get a fresh URL. - Track upload success per file: your client should record whether each
PUTsucceeded. A successfulPUTtypically returns HTTP 200 or 204. If aPUTfails, the response returns an error and the file is not added to the dataset. - After all files have uploaded successfully, poll
GET /prod/v1/trainers/datasets/{dataset_id}/statusuntilREADY.
Get a dataset status
After you finish uploading your dataset (direct upload or signed URLs), poll this endpoint until the dataset becomesREADY. If it becomes FAILED, check the error field, fix the issue, and re-upload (or create a new dataset).
The response includes a files array so you can see which files are currently available in the dataset. Only successfully uploaded files appear in files—files that are still uploading or that failed to upload are not listed.
Request example
Response example
List datasets
List all datasets in your account, including their currentstatus. Use this to find the dataset name and id you’ll reference in training requests.
Request example
Response example
Delete a dataset
Permanently delete a dataset bydataset_id. This is irreversible—only delete datasets you no longer need for training.
