upload training file
upload_training_fileUpload a JSONL training or validation file to receive a provider_file_id for referencing in fine-tuning job creation.
Instructions
Upload a JSONL training (or validation) file for fine-tuning; the returned provider_file_id is what a job creation references. POST /v1/fine_tuning/files (API-key scope: platform:write). Returns: 201 {id, provider_file_id, filename, bytes, purpose:"fine-tune", created_at}. Use provider_file_id (not id) as training.file_id / training_file_id / validation_file_id in POST /v1/fine_tuning/jobs. Notes: Request must be multipart/form-data with a 'file' field — 400 "Expected multipart/form-data with a 'file' field" / "Missing 'file' field" otherwise. Requires OWNER/ADMIN minting user (403). Rate limited per workspace: 20 uploads per 60s → 429 with Retry-After. Feature-flag gated (404 when fineTuning is off). Storage is billable; the upload itself does not charge the wallet. Scopes are not enforced on this route today (see list_training_files).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | multipart/form-data field named "file" (NOT JSON). The file's own name is used as the filename (falls back to "training.jsonl" when empty). Empty files are refused (400 "File is empty"). |