Skip to content
For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to the page URL.
Primary navigation
Theme

Retrieve file content

files.content(file_id) -> BinaryResponseContent
GET
/files/{file_id}/content

Returns a response containing the contents of the specified file.

Parameters
file_id: str
Returns
BinaryResponseContent

Retrieve file content

from openai import OpenAI
client = OpenAI()

content = client.files.content("file-abc123")
Returns Examples