Skip to main content

Method Signature

Parameters

str
required
The ID of the file to retrieve information about.

Response

Returns a FileObject:

Examples

Retrieve File Metadata

Check File Processing Status

Get File Information with Date Formatting

Retrieve and Download File Content

Async Usage

Download File Content

To retrieve the actual file contents (not just metadata):

Wait for File Processing

Error Handling

Notes

  • This method only returns file metadata, not the actual file contents
  • Use client.files.content(file_id) to download the actual file data
  • The status field indicates whether the file has been processed:
    • uploaded - File has been uploaded but not yet processed
    • processed - File is ready to use
    • error - File processing failed (check status_details)
  • Files uploaded for fine-tuning are validated asynchronously
  • Check the expires_at field to see if the file has an expiration date