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 vector store file content

$ openai vector-stores:files content
GET
/vector_stores/{vector_store_id}/files/{file_id}/content

Retrieve the parsed contents of a vector store file.

Retrieve vector store file content

openai vector-stores:files content \
  --api-key 'My API Key' \
  --vector-store-id vs_abc123 \
  --file-id file-abc123
Response example
{
  "object": "vector_store.file_content.page",
  "data": [
    {"type": "text", "text": "file content"}
  ],
  "has_more": false,
  "next_page": null
}
Parameters
--vector-store-id: string

The ID of the vector store.

--file-id: string

The ID of the file within the vector store.

Returns
VectorStoreFileContentResponse: object { data, has_more, next_page, object }

Represents the parsed content of a vector store file.

data: array of object { text, type }

Parsed content of the file.

has_more: boolean

Indicates if there are more content pages to fetch.

next_page: string

The token for the next page, if any.

object: "vector_store.file_content.page"

The object type, which is always vector_store.file_content.page

Returns Examples
Response example
{
  "object": "vector_store.file_content.page",
  "data": [
    {"type": "text", "text": "file content"}
  ],
  "has_more": false,
  "next_page": null
}