Skip to main content
POST
/
v1
/
vectors
/
indexes
Create Index
curl --request POST \
  --url https://api.gravixlayer.com/v1/vectors/indexes \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "dimension": 123,
  "metric": "cosine",
  "cloud_provider": "AWS",
  "region": "eu-west-1",
  "index_type": "serverless",
  "x-regionMap": "<unknown>",
  "metadata": {},
  "delete_protection": false
}
'

Authorizations

Authorization
string
header
required

API key authentication. Get your API key from the Gravix Layer Dashboard.

Body

application/json
name
string
required

Unique index name

dimension
integer
required

Vector dimension (e.g., 1024, 1536)

metric
enum<string>
required

Distance metric

Available options:
cosine,
euclidean,
dotproduct
cloud_provider
enum<string>
required

Available Provider

AWS, GCP, Azure, Gravix

Available options:
AWS,
GCP,
Azure,
Gravix
region
enum<string>
required

Cloud region. Choose a region that corresponds to the selected cloud_provider.

Available regions:

ProviderRegionsDescription
AWSus-east-1 (Virginia)Amazon Web Services
GCPus-east1 (South Carolina)Google Cloud Platform
Azureeastus (Virginia)Microsoft Azure
Gravixeu-west-1 (London)Gravix AI Cloud
Available options:
us-east-1,
us-east1,
eastus,
eu-west-1
Example:

"eu-west-1"

index_type
enum<string>
required

Type: serverless

Available options:
serverless
x-regionMap
any
metadata
object

Additional metadata

delete_protection
boolean
default:false

Prevent accidental deletion

Response

200

Index created successfully