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

Retrieve file content

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

Returns the contents of the specified file.

ParametersExpand Collapse
file_id: str
ReturnsExpand Collapse
BinaryResponseContent

Retrieve file content

from openai import OpenAI
client = OpenAI()

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