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 container file content

containers.files.content.retrieve(file_id, **kwargs) -> BinaryResponseContent
GET
/containers/{container_id}/files/{file_id}/content

Retrieve Container File Content

Parameters
container_id: str
file_id: str
Returns
BinaryResponseContent

Retrieve container file content

import os
from openai import OpenAI

client = OpenAI(
    api_key=os.environ.get("OPENAI_API_KEY"),  # This is the default and can be omitted
)
content = client.containers.files.content.retrieve(
    file_id="file_id",
    container_id="container_id",
)
print(content)
data = content.read()
print(data)
Response example
<binary content of the file>
Returns Examples
Response example
<binary content of the file>