Documentation
API Reference
Playground
Chat completionsResponsesSystem One
Document classificationEmbeddings

Studio API

Upload fileList filesRetrieve fileDelete file
Create jobRetrieve job

Search

Create vector storeList vector storesRetrieve vector storeModify vector storeDelete vector storeAdd file to vector storeList files in vector storeRetrieve file in vector storeRemove file from vector storeCreate file batchRetrieve file batchList files in file batchCancel file batchSearch vector store
Create response

List files in vector store

Returns a paginated list of files in a vector store.

GET
/vector_stores/{vector_store_id}/files
/vector_stores/{vector_store_id}/files

The Authorization access token

Authorization

Authorization
Required
Bearer <token>

In: header

Path Parameters

vector_store_id
Required
string

The ID of the vector store.

Query Parameters

limitnumber

Number of results to return (1-100).

orderstring

Sort order: asc or desc.

afterstring

Cursor for forward pagination.

beforestring

Cursor for backward pagination.

filterstring

Filter by file status: in_progress, completed, failed, or cancelled.


Example

Request

curl https://api.upstage.ai/v2/vector_stores/vs_abc123def456/files?limit=10 \
  -H "Authorization: Bearer $UPSTAGE_API_KEY"

Response

{
  "object": "list",
  "data": [
    {
      "id": "file_xyz789",
      "object": "vector_store.file",
      "created_at": 1711644900,
      "vector_store_id": "vs_abc123def456",
      "status": "completed",
      "last_error": null,
      "usage_bytes": 8421,
      "chunking_strategy": {"type": "auto"},
      "attributes": null
    }
  ],
  "first_id": "file_xyz789",
  "last_id": "file_xyz789",
  "has_more": false
}

Add file to vector store

Add an uploaded file to a vector store for asynchronous indexing. Covers the request body (file_id, chunking_strategy, attributes), the vector store file object returned (status, last_error, usage_bytes), and an example request and response.

Retrieve file in vector store

Check one file in a vector store by vector store ID and file ID. Covers the path parameters, the vector store file object returned (status, last_error, usage_bytes, attributes), and an example request and response.

On this page

List files in vector storeExampleRequestResponse