Vector

Create Index

This endpoint creates an index.

POST/v2/vector/index
cURL
curl --request POST \
  --url https://api.upstash.com/v2/vector/index \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "name": "myindex",
    "region": "us-east-1",
    "similarity_function": "COSINE",
    "dimension_count": 1024,
    "type": "payg",
    "embedding_model": "BGE_M3"
  }'
200Response
{
  "customer_id": "example@upstash.com",
  "id": "0639864f-ece6-429c-8118-86a287b0e808",
  "name": "myindex",
  "similarity_function": "COSINE",
  "dimension_count": 384,
  "embedding_model": "BGE_SMALL_EN_V1_5",
  "sparse_embedding_model": "BM25",
  "endpoint": "glowing-baboon-15797-us1",
  "token": "QkZGAsWp2tdW0tdC0zNzM1LWV1MkFkNQzB1ExUb3hOekF0TVRJbFpMDNLVSm1GZw==",
  "read_only_token": "QkZGRk1heGSKC0MtdRlZC0zNzM1LWTj3pAV0Wm1aZ01p05qY3RNR0U0TkRtRt2s9azJU",
  "type": "fixed",
  "region": "us-east-1",
  "max_vector_count": 5210000,
  "max_daily_updates": 1000000,
  "max_daily_queries": 1000000,
  "max_monthly_bandwidth": -1,
  "max_writes_per_second": 1000,
  "max_query_per_second": 1000,
  "max_reads_per_request": 1000,
  "max_writes_per_request": 1000,
  "max_total_metadata_size": 53687091200,
  "reserved_price": 60,
  "creation_time": 1753207106,
  "index_type": "DENSE",
  "throughput_vector": [
    {
      "x": "2025-09-04 14:55:00.000 +0000 UTC",
      "y": 0
    },
    {
      "x": "2025-09-04 14:56:00.000 +0000 UTC",
      "y": 0
    }
  ]
}

Authorization

Authorizationheaderstringrequired

Bearer authentication header of the form Bearer <token>.

Body

namestringrequired

Name of the index

regionenum<string>required

Region of the database

Available options:eu-west-1us-east-1us-central1
similarity_functionenum<string>required

Similarity function that's used to calculate the distance between two vectors

Available options:COSINEEUCLIDEANDOT_PRODUCT
dimension_countnumberrequired

The amount of values in a single vector

typeenum<string>

The payment plan of your index

Available options:paygfixedpaid
embedding_modelenum<string>

The embedding model to use for the index

Available options:BGE_SMALL_EN_V1_5BGE_BASE_EN_V1_5BGE_LARGE_EN_V1_5BGE_M3
index_typeenum<string>

The type of the vector index

Available options:DENSESPARSEHYBRID
sparse_embedding_modelenum<string>

The sparse embedding model to be used for indexes

Available options:BM25BGE_M3

Response

200 — Index created successfully

customer_idstring

The associated ID of the owner of the index

idstring

Unique ID of the index

namestring

The name of the index

similarity_functionenum<string>

Similarity function that's used to calculate the distance between two vectors

Available options:COSINEEUCLIDEANDOT_PRODUCT
dimension_countnumber

The amount of values in a single vector

embedding_modelenum<string>

The predefined embedding model to vectorize your plain text

Available options:BGE_SMALL_EN_V1_5BGE_BASE_EN_V1_5BGE_LARGE_EN_V1_5BGE_M3
sparse_embedding_modelenum<string>

The sparse embedding model to be used for indexes

Available options:BM25BGE_M3
endpointstring

The REST endpoint of the index

tokenstring

The REST authentication token for the index

read_only_tokenstring

The REST authentication read only token for the index

typeenum<string>

The payment plan of the index

Available options:freepaygfixed
regionenum<string>

The region where the index is currently deployed

Available options:eu-west-1us-east-1us-central1
max_vector_countnumber

The number of maximum that your index can contain

max_daily_updatesnumber

The number of maximum update operations you can perform in a day. Only upsert operations are included in update count.

max_daily_queriesnumber

The number of maximum query operations you can perform in a day. Only query operations are included in query count.

max_monthly_bandwidthnumber

The maximum amount of monthly bandwidth for the index. Unit is bytes. -1 if the limit is unlimited.

max_writes_per_secondnumber

The number of maximum write operations you can perform per second. Only upsert operations are included in write count.

max_query_per_secondnumber

The number of maximum query operations you can perform per second. Only query operations are included in query count.

max_reads_per_requestnumber

The number of maximum vectors in a read operation. Query and fetch operations are included in read operations.

max_writes_per_requestnumber

The number of maximum vectors in a write operation. Only upsert operations are included in write operations.

max_total_metadata_sizenumber

The amount of maximum size for the total metadata sizes in your index.

reserved_pricenumber

Monthly pricing of your index. Only available for fixed and pro plans.

creation_timenumber

The creation time of the vector index in UTC as unix timestamp.

index_typeenum<string>

The type of the vector index

Available options:DENSESPARSEHYBRID
throughput_vectorobject[]

Throughput data for the vector index over time

Loading search…