POST
/
v2
/
vector
/
index
curl -X POST https://api.upstash.com/v2/vector/index \
  -u 'EMAIL:API_KEY' \
  -d '{
        "name": "myindex",
        "region": "eu-west-1",
        "similarity_function": "COSINE",
        "dimension_count": 1536
      }' \
{
    "customer_id": "test@upstash.com",
    "id": "0639864f-ece6-429c-8118-86a287b0e808",
    "name": "myindex",
    "similarity_function": "COSINE",
    "dimension_count": 5,
    "endpoint": "test-index-3814-eu1-vector.upstash.io",
    "token": "QkZGMk5heGltdW0tdXBkYXRlZC0zNzM1LWV1MkFkbWlOeGZGZ1J5Wm1GdE5tTXhNQzB1TmpsbExUb3hOekF0TVRJbFpqMTJORFUxTm1GZw==",
    "read_only_token": "QkZGRk1heGltdW0tdXBkYXRlZC0zNzM1LWV1MnJlYWRvbmx5TmtaZ05qS3JNWVV0Wm1aZ01pMDBOV1poTHRob05qY3RNR0U0TkRjejNqazJU"
    "type": "paid",
    "region": "eu-west-1",
    "max_vector_count": 400000000,
    "max_daily_updates": -1,
    "max_daily_queries": -1,
    "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,
    "creation_time": 1707313165
}

Request Parameters

name
string
required
Name of the index.
region
string
required
Region of the database.
Options: eu-west-1, us-east-1,
similarity_function
string
required
Similarity function that’s used to calculate the distance between two vectors.
Options: COSINE, EUCLIDIAN, DOT_PRODUCT
dimension_count
number
required
The amount of values in a single vector.
type
string
The payment plan of your index.
Options: payg, fixed

Response Parameters

customer_id
string
required
The associated ID of the owner of the index
id
string
required
Unique ID of the index
name
string
required
The name of the index.
similarity_function
string
required
Similarity function that’s used to calculate the distance between two vectors
dimension_count
number
required
The amount of values in a single vector
endpoint
string
required
The REST endpoint of the index
token
string
required
The REST authentication token for the index
read_only_token
string
required
The REST authentication read only token for the index
type
string
required
The payment plan of the index
region
string
required
The region where the index is currently deployed.
max_vector_count
number
required
The number of maximum that your index can contain.
max_daily_updates
number
required
The number of maximum update operations you can perform in a day. Only upsert operations are included in update count.
max_daily_queries
number
required
The number of maximum query operations you can perform in a day. Only query operations are included in query count.
max_monthly_bandwidth
number
required
The maximum amount of monthly bandwidth for the index. Unit is bytes. -1 if the limit is unlimited.
max_writes_per_second
number
required
The number of maximum write operations you can perform per second. Only upsert operations are included in write count.
max_query_per_second
number
required
The number of maximum query operations you can perform per second. Only query operations are included in query count.
max_reads_per_request
number
required
The number of maximum vectors in a read operation. Query and fetch operations are included in read operations.
max_writes_per_request
number
required
The number of maximum vectors in a write operation. Only upsert operations are included in write operations.
max_total_metadata_size
number
required
The amount of maximum size for the total metadata sizes in your index.
reserved_price
number
Monthly pricing of your index. Only available for fixed and pro plans.
creation_time
number
required
The creation time of the vector index in UTC as unix timestamp.
curl -X POST https://api.upstash.com/v2/vector/index \
  -u 'EMAIL:API_KEY' \
  -d '{
        "name": "myindex",
        "region": "eu-west-1",
        "similarity_function": "COSINE",
        "dimension_count": 1536
      }' \
{
    "customer_id": "test@upstash.com",
    "id": "0639864f-ece6-429c-8118-86a287b0e808",
    "name": "myindex",
    "similarity_function": "COSINE",
    "dimension_count": 5,
    "endpoint": "test-index-3814-eu1-vector.upstash.io",
    "token": "QkZGMk5heGltdW0tdXBkYXRlZC0zNzM1LWV1MkFkbWlOeGZGZ1J5Wm1GdE5tTXhNQzB1TmpsbExUb3hOekF0TVRJbFpqMTJORFUxTm1GZw==",
    "read_only_token": "QkZGRk1heGltdW0tdXBkYXRlZC0zNzM1LWV1MnJlYWRvbmx5TmtaZ05qS3JNWVV0Wm1aZ01pMDBOV1poTHRob05qY3RNR0U0TkRjejNqazJU"
    "type": "paid",
    "region": "eu-west-1",
    "max_vector_count": 400000000,
    "max_daily_updates": -1,
    "max_daily_queries": -1,
    "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,
    "creation_time": 1707313165
}