Files:

Creates a new file entity by uploading data from a local machine. Uploaded files can, for example, be used for training or evaluating fine-tuned models.

post/files

Query parameters

api-versionstring required

The requested API version.

Response

The file has been successfully created.

object'list' | 'fine_tuning.job' | 'file' | 'fine_tuning.job.event' | 'fine_tuning.job.checkpoint' | 'model' | 'upload' | 'upload.part' | 'batch' | 'wandb'

Defines the type of an object.

created_atinteger

A timestamp when this job or item was created (in unix epochs).

idstring

The identity of this item.

status'uploaded' | 'pending' | 'running' | 'processed' | 'error' | 'deleting' | 'deleted'

The state of a file.

bytesinteger

The size of this file when available (can be null). File sizes larger than 2^53-1 are not supported to ensure compatibility with JavaScript integers.

purpose'fine-tune' | 'fine-tune-results' | 'assistants' | 'assistants_output' | 'batch' | 'batch_output' | 'evals' | 'evals_output' required

The intended purpose of the uploaded documents. Use "fine-tune" for fine-tuning. This allows us to validate the format of the uploaded file.

filenamestring required

The name of the file.

expires_atinteger

A unix timestamp (the number of seconds that have elapsed since January 1, 1970) when the file is expired.

status_detailsstring

The error message with details in case processing of this file failed. Deprecated.

Changes

Changed in 2 of the 26 revisions of this API.42

  • 2022-03-01-previewb177dc430e3912See the full diff
    • added required request body

      request-body-added-required

    • added the media type application/json for the response with the status 201

      response-media-type-added

    • added the media type application/json for the response with the status default

      response-media-type-added

    This revision also has 2 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

  • 2022-03-01-preview9d525b5caa313See the full diff
    • removed the request body

      request-body-removed

    • removed the media type application/json for the response with the status 201

      response-media-type-removed

    • removed the media type application/json for the response with the status default

      response-media-type-removed

    This revision also has 149 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog