Skip to main content

Create File

Upload a file that can be used across various endpoints/features. The size of all the files uploaded by one organization can be up to 100 GB.

The size of individual files for can be a maximum of 512MB. See the Assistants Tools guide to learn more about the types of files supported. The Fine-tuning API only supports .jsonl files.

Please contact us if you need to increase these storage limits.

Request Body — REQUIRED
file binary — REQUIRED
purpose Purpose — REQUIRED
Responses
200

Successful Response

Schema — OPTIONAL
_id Id — OPTIONAL

MongoDB document ObjectID

id Id

The file identifier, which can be referenced in the API endpoints.

bytes Bytes

The size of the file, in bytes.

created_at Created At

The Unix timestamp (in seconds) for when the file was created.

filename Filename

The name of the file.

object Object14

Possible values: [file]

The object type, which is always file.

purpose Purpose1

Possible values: [fine_tune, fine_tune_results, assistants, assistants_output]

The intended purpose of the file. Supported values are fine-tune, fine-tune-results, assistants, and assistants_output.

status Status

Possible values: [uploaded, processed, error]

Deprecated. The current status of the file, which can be either uploaded, processed, or error.

status_details Status Details — OPTIONAL

Deprecated. For details on why a fine-tuning training file failed validation, see the error field on fine_tuning.job.

422

Validation Error

Schema — OPTIONAL
detail object[] — OPTIONAL
loc undefined[]
msg Message
type Error Type