v3

OpenAPI 3.1.0MIT2026-07-31192456807.8 KB
Files

Upload a file

Upload a file with specified purpose, file name, and file type.

post/files/upload

Response

File uploaded successfully

idstring required

ID of the file.

object'file' required

The object type, which is always file.

created_atinteger required

The timestamp when the file was created.

filenamestring required

The name of the file as it was uploaded.

bytesinteger required

The number of bytes in the file.

purpose'fine-tune' | 'eval' | 'batch-api' required

The purpose of the file

Processedboolean required

Deprecated. Whether file has been fully uploaded.

FileType'csv' | 'jsonl' | 'parquet' required

The type of the file

processing_status'PENDING' | 'QUEUED' | 'RUNNING' | 'COMPLETED' | 'FAILED' | 'INVALID_FORMAT'

Lifecycle state of a file in the validation pipeline. The typical progression is PENDINGQUEUEDRUNNINGCOMPLETED / FAILED. INVALID_FORMAT is a terminal state for files whose contents failed validation in a user-correctable way.

Example response

{
  "filename": "my_file.jsonl",
  "purpose": "fine-tune",
  "FileType": "jsonl"
}