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

Create file batch

Create a file batch to add multiple files to a vector store at once. All files will be asynchronously indexed. A maximum of 50 files can be added per batch.


Example

Request

curl -X POST https://api.upstage.ai/v2/vector_stores/vs_abc123def456/file_batches \
  -H "Authorization: Bearer $UPSTAGE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "file_ids": ["file_001", "file_002", "file_003"]
  }'

Response

{
  "id": "vsfb_abc123def456",
  "object": "vector_store.files_batch",
  "created_at": 1711644900,
  "vector_store_id": "vs_abc123def456",
  "status": "in_progress",
  "file_counts": {
    "in_progress": 3,
    "completed": 0,
    "failed": 0,
    "cancelled": 0,
    "total": 3
  }
}

Remove file from vector store

Remove a file and its vectors from a vector store. Covers the path parameters, the deletion confirmation object (id, object, deleted), and an example request and response.

Retrieve file batch

Check a file batch by batch ID to see how indexing is progressing. Covers the path parameters, the file batch object returned (status, file_counts), and an example request and response.

On this page

Create file batchExampleRequestResponse
    POST
    /vector_stores/{vector_store_id}/file_batches
    /vector_stores/{vector_store_id}/file_batches

    The Authorization access token

    file_ids*
    array

    chunking_strategy
    object

    attributes
    object

    Authorization

    Authorization
    Required
    Bearer <token>

    In: header

    Request Body

    application/jsonRequired

    file_ids
    Required
    array<string>

    List of file IDs to add (max 50 per batch).

    chunking_strategyobject

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

    attributesobject

    Key-value attributes applied to all files in the batch (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.