A Client ID for your org.
Body
The Embedding Model to use. Can be either “text-embedding-ada-002”, “clip”, or “custom”.
Datasource ID to connect to the index.
Type of the index. FLAT
or HNSW
This is only required if you are using a “custom” model.
The name of the filtereable field
The field type. Enum: string
or number
.
The token size of each chunk.
The token amount of overlap between chunks.
The token size of each table chunk.
Response
Model used to generate the embeddings
Dimensions of the embeddings
The token size of each chunk.
The token amount of overlap between chunks.
The token size of each chunk.
curl --location --request POST 'https://api.getmetal.io/v1/indexes' \
--header 'Content-Type: application/json' \
--header 'x-metal-api-key: <api-key>' \
--header 'x-metal-client-id: <client-id>' \
--data-raw '{
"model": "text-embedding-ada-002",
"name": "Ozzy Osbourne",
"filters": [
{
"field": "name",
"type": "string"
},
{
"field": "age",
"type": "number"
}
]
}'
{
"data": {
"id": "1",
"createdAt": "2023-08-23T22:13:31.539Z",
"status": "LIVE",
"name": "Ozzy Osbourne",
"model": "text-embedding-ada-002",
"dimensions": 1536,
"filters": [
{
"field": "name",
"type": "string"
},
{
"field": "age",
"type": "number"
}
],
"chunkConfig": {
"size": 500,
"overlap": 20
},
"tableChunkConfig": {
"size": 4000
},
"counts": {
"docs": 0,
}
}
}