Skip to content
Primary navigation

Retrieve file content

client.files.content(stringfileID, RequestOptionsoptions?): Response
GET/files/{file_id}/content

Returns the contents of the specified file.

ParametersExpand Collapse
fileID: string
ReturnsExpand Collapse
unnamed_schema_0 = Response

Retrieve file content

import OpenAI from "openai";

const openai = new OpenAI();

async function main() {
  const file = await openai.files.content("file-abc123");

  console.log(file);
}

main();
Returns Examples