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

FileContentPage vectorStores().files().content(params, requestOptions = RequestOptions.none())
GET
/vector_stores/{vector_store_id}/files/{file_id}/content

Retrieve the parsed contents of a vector store file.

Retrieve vector store file content

package com.openai.example;

import com.openai.client.OpenAIClient;
import com.openai.client.okhttp.OpenAIOkHttpClient;
import com.openai.models.vectorstores.files.FileContentPage;
import com.openai.models.vectorstores.files.FileContentParams;

public final class Main {
    private Main() {}

    public static void main(String[] args) {
        OpenAIClient client = OpenAIOkHttpClient.fromEnv();

        FileContentParams params = FileContentParams.builder()
            .vectorStoreId("vs_abc123")
            .fileId("file-abc123")
            .build();
        FileContentPage page = client.vectorStores().files().content(params);
    }
}
Response example
{
  "object": "vector_store.file_content.page",
  "data": [
    {"type": "text", "text": "file content"}
  ],
  "has_more": false,
  "next_page": null
}
Parameters
FileContentParams params
String vectorStoreId
Optional<String> fileId
Returns
class FileContentResponse:
Optional<String> text

The text content

Optional<String> type

The content type (currently only "text")

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