Retrieve File
GET/files/:file_id
Returns information about a specific file.
Request
Path Parameters
file_id stringrequired
The ID of the file to retrieve.
Responses
- 200
OK, returns the file object.
- application/json
- Schema
- Example (from schema)
- Example
Schema
id stringrequired
The file identifier, of the form file-api-..., which can be referenced in chat completion requests.
object stringrequired
Possible values: [file]
The object type, which is always file.
bytes integerrequired
The size of the file in bytes.
created_at integerrequired
The Unix timestamp (in seconds) of when the file was created.
filename stringrequired
The name of the file.
purpose stringrequired
Possible values: [user_data]
The intended purpose of the file.
expires_at integer
The Unix timestamp (in seconds) of when the file expires. Only present when an expiration was set at upload time.
{
"id": "string",
"object": "file",
"bytes": 0,
"created_at": 0,
"filename": "string",
"purpose": "user_data",
"expires_at": 0
}
{
"id": "file-api-0a1b2c3d4e5f60718293a4b5c6d7e8f9",
"object": "file",
"bytes": 102400,
"created_at": 1700000000,
"filename": "image.jpg",
"purpose": "user_data"
}
Loading...