Retrieve vector store file content

GEThttps:/api.openai.com/v1/vector_stores/{vector_store_id}/files/{file_id}/content

Retrieve the parsed contents of a vector store file.

Path parameters

  • vector_store_id
    string
    Required
    The ID of the vector store.
  • file_id
    string
    Required
    The ID of the file within the vector store.

Response

The parsed contents of the specified vector store file.

Example request
1
curl \
2
https://api.openai.com/v1/vector_stores/vs_abc123/files/file-abc123/content \
3
-H "Authorization: Bearer $OPENAI_API_KEY"
Example response
1
{
2
"file_id": "file-abc123",
3
"filename": "example.txt",
4
"attributes": {"key": "value"},
5
"content": [
6
{"type": "text", "text": "..."},
7
...
8
]
9
}
Built with