The File object represents a document that has been uploaded to OpenAI.

interface FileObject {
    bytes: number;
    created_at: number;
    filename: string;
    id: string;
    object: "file";
    purpose: "fine-tune" | "assistants" | "fine-tune-results" | "assistants_output";
    status: "uploaded" | "processed" | "error";
    status_details?: string;
}

Properties

bytes: number

The size of the file, in bytes.

created_at: number

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

filename: string

The name of the file.

id: string

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

object: "file"

The object type, which is always file.

purpose: "fine-tune" | "assistants" | "fine-tune-results" | "assistants_output"

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

status: "uploaded" | "processed" | "error"

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

status_details?: string

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

Generated using TypeDoc