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) -> StringIO
GET
/files/{file_id}/content

Returns a response containing the contents of the specified file.

Retrieve file content

require "openai"

openai = OpenAI::Client.new(api_key: "My API Key")

response = openai.files.content("file_id")

puts(response)
Parameters
file_id: String
Returns
StringIO
Returns Examples