curl --request GET \
--url https://api.openai.com/v1/files/{file_id} \
--header 'Authorization: Bearer <token>'
{
"id": "<string>",
"bytes": 123,
"created_at": 123,
"expires_at": 123,
"filename": "<string>",
"object": "file",
"purpose": "assistants",
"status": "uploaded",
"status_details": "<string>"
}
curl --request GET \
--url https://api.openai.com/v1/files/{file_id} \
--header 'Authorization: Bearer <token>'
{
"id": "<string>",
"bytes": 123,
"created_at": 123,
"expires_at": 123,
"filename": "<string>",
"object": "file",
"purpose": "assistants",
"status": "uploaded",
"status_details": "<string>"
}
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
The ID of the file to use for this request.
OK
The File
object represents a document that has been uploaded to OpenAI.
Was this page helpful?