SpyBara
Go Premium

resources/files/methods/content/index.md 2026-07-10 23:02 UTC to 2026-07-12 06:58 UTC

1 added, 1 removed.

2026
Tue 14 06:58 Mon 13 15:59 Sun 12 06:58 Fri 10 23:02 Thu 9 20:58 Tue 7 08:02

Retrieve file content

get /files/{file_id}/content

Returns the contents of the specified file.

Path Parameters

  • file_id: string

Example

curl https://api.openai.com/v1/files/$FILE_ID/content \
    -H "Authorization: Bearer $OPENAI_API_KEY"

Example

curl https://api.openai.com/v1/files/file-abc123/content \
  -H "Authorization: Bearer $OPENAI_API_KEY" > file.jsonl