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

client.containers.files.content.retrieve(stringfileID, ContentRetrieveParams { container_id } params, RequestOptionsoptions?): Response
GET/containers/{container_id}/files/{file_id}/content

Retrieve Container File Content

ParametersExpand Collapse
fileID: string
params: ContentRetrieveParams { container_id }
ReturnsExpand Collapse
unnamed_schema_2 = Response

Retrieve container file content

import OpenAI from 'openai';

const client = new OpenAI({
  apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted
});

const content = await client.containers.files.content.retrieve('file_id', {
  container_id: 'container_id',
});

console.log(content);

const data = await content.blob();
console.log(data);
<binary content of the file>
Returns Examples
<binary content of the file>