Skip to main content

FileObject

OpenAI-shaped file object. Field names match OpenAI's FileObject, plus a mime_type extension carrying the byte-sniffed content type.

idstringrequired

Opaque file id, always prefixed file_. Referenced from a Responses-API request as an input_file content part.

Example: file_8pauo0KQA-g_Bi7LHx5RA
objectstringrequired

OpenAI discriminator; always the literal file.

Constant value: file
bytesintegerrequired

Size of the file in bytes.

Example: 18342
created_atintegerrequired

Unix timestamp (seconds) at which the file was created.

Example: 1718900000
filenamestringrequired

The (sanitized) original filename.

Example: quarterly-report.docx
purposeFilePurpose (string)required

Intended use of the file. Mirrors OpenAI's Files API purpose. Only user_data is accepted in v1; the other OpenAI purposes (assistants, batch, fine-tune, vision) are reserved and rejected.

Possible values: [user_data]

Example: user_data
mime_typestringrequired

The MIME type detected from the file's magic-number bytes (not the upload's Content-Type header).

Example: application/vnd.openxmlformats-officedocument.wordprocessingml.document
FileObject
{
"id": "file_8pauo0KQA-g_Bi7LHx5RA",
"object": "file",
"bytes": 18342,
"created_at": 1718900000,
"filename": "quarterly-report.docx",
"purpose": "user_data",
"mime_type": "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
}