---
title: "Create Index"
method: POST
path: "/vector/index"
tags: ["vector"]
---

# Create Index

`POST /vector/index`

## Request

- Base URL: `https://api.upstash.com/v2`
- URL: `https://api.upstash.com/v2/vector/index`
- Auth: HTTP basic
- TypeScript: <https://skmtc.dev/upstash/apis/developer-api-upstash/docs/vector/index/post.ts> (a function with typed inputs; its response is checked against the schema)

This endpoint creates an index.

## Request body

- CreateIndexRequest
  - `name` string, required: Name of the index
  - `region` 'eu-west-1' | 'us-east-1' | 'us-central1', required: Region of the database
  - `similarity_function` 'COSINE' | 'EUCLIDEAN' | 'DOT_PRODUCT', 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
  - `type` 'payg' | 'fixed' | 'paid': The payment plan of your index
  - `embedding_model` 'BGE_SMALL_EN_V1_5' | 'BGE_BASE_EN_V1_5' | 'BGE_LARGE_EN_V1_5' | 'BGE_M3': The embedding model to use for the index
  - `index_type` 'DENSE' | 'SPARSE' | 'HYBRID': The type of the vector index
  - `sparse_embedding_model` 'BM25' | 'BGE_M3': The sparse embedding model to be used for indexes

## Response `200`

Index created successfully

- VectorIndex
  - `customer_id` string: The associated ID of the owner of the index
  - `id` string: Unique ID of the index
  - `name` string: The name of the index
  - `similarity_function` 'COSINE' | 'EUCLIDEAN' | 'DOT_PRODUCT': Similarity function that's used to calculate the distance between two vectors
  - `dimension_count` number: The amount of values in a single vector
  - `embedding_model` 'BGE_SMALL_EN_V1_5' | 'BGE_BASE_EN_V1_5' | 'BGE_LARGE_EN_V1_5' | 'BGE_M3': The predefined embedding model to vectorize your plain text
  - `sparse_embedding_model` 'BM25' | 'BGE_M3': The sparse embedding model to be used for indexes
  - `endpoint` string: The REST endpoint of the index
  - `token` string: The REST authentication token for the index
  - `read_only_token` string: The REST authentication read only token for the index
  - `type` 'free' | 'payg' | 'fixed': The payment plan of the index
  - `region` 'eu-west-1' | 'us-east-1' | 'us-central1': The region where the index is currently deployed
  - `max_vector_count` number: The number of maximum that your index can contain
  - `max_daily_updates` number: The number of maximum update operations you can perform in a day. Only upsert operations are included in update count.
  - `max_daily_queries` number: The number of maximum query operations you can perform in a day. Only query operations are included in query count.
  - `max_monthly_bandwidth` number: The maximum amount of monthly bandwidth for the index. Unit is bytes. -1 if the limit is unlimited.
  - `max_writes_per_second` number: The number of maximum write operations you can perform per second. Only upsert operations are included in write count.
  - `max_query_per_second` number: The number of maximum query operations you can perform per second. Only query operations are included in query count.
  - `max_reads_per_request` number: The number of maximum vectors in a read operation. Query and fetch operations are included in read operations.
  - `max_writes_per_request` number: The number of maximum vectors in a write operation. Only upsert operations are included in write operations.
  - `max_total_metadata_size` number: 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: The creation time of the vector index in UTC as unix timestamp.
  - `index_type` 'DENSE' | 'SPARSE' | 'HYBRID': The type of the vector index
  - `throughput_vector` TimeSeriesData[]: Throughput data for the vector index over time
    - `x` string, required: Timestamp when measurement was taken
    - `y` number, required: The measured value

---

[API](https://skmtc.dev/upstash/apis/developer-api-upstash.md) - [All operations](https://skmtc.dev/upstash/apis/developer-api-upstash/llms.txt) - [OpenAPI document](https://skmtc.dev/upstash/apis/developer-api-upstash/revisions/bddbdcab9052?raw)
