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

Add file to vector store

Add a file to a vector store. The file will be asynchronously indexed.

POST
/vector_stores/{vector_store_id}/files
/vector_stores/{vector_store_id}/files

The Authorization access token

chunking_strategy
object

attributes
object

Authorization

Authorization
Required
Bearer <token>

In: header

Request Body

application/jsonRequired

file_id
Required
string

The ID of the file to add (from the Files API).

chunking_strategyobject

Only {"type": "auto"} is supported.

attributesobject

Key-value attributes for the file (max 16 keys, key max 64 chars, values: string max 512 chars, number, or boolean).

Path Parameters

vector_store_id
Required
string

The ID of the vector store.


Example

Request

curl -X POST https://api.upstage.ai/v2/vector_stores/vs_abc123def456/files \
  -H "Authorization: Bearer $UPSTAGE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "file_id": "file_xyz789"
  }'

Response

{
  "id": "file_xyz789",
  "object": "vector_store.file",
  "created_at": 1711644900,
  "vector_store_id": "vs_abc123def456",
  "status": "in_progress",
  "last_error": null,
  "usage_bytes": 0,
  "chunking_strategy": {"type": "auto"},
  "attributes": null
}

Delete vector store

Delete a vector store and every file and vector indexed in it. Covers the path parameter, the deletion confirmation object (id, object, deleted), and an example request and response.

List files in vector store

List the files in a vector store. Covers the pagination and status filter parameters (limit, order, after, before, filter), the list object returned, and an example request and response.

On this page

Add file to vector storeExampleRequestResponse