API Reference
Collections
Create a collection
Create an collection.
POST
/
projects
/
{projectName}
/
collections
curl --request POST \
--url https://{baseUrl}/projects/{projectName}/collections \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '{
"collectionName": "example-collection-name",
"indexConfigs": {
"example-field1": {
"type": "text",
"analyzers": [
"english"
]
},
"example-field2": {
"type": "vector",
"dimensions": 128,
"similarity": "cosine"
}
}
}'
{
"projectName": "example-project-name",
"collectionName": "example-collection-name",
"indexConfigs": {
"example-field1": {
"type": "text",
"analyzers": [
"english"
]
},
"example-field2": {
"type": "vector",
"dimensions": 128,
"similarity": "cosine"
}
},
"numDocs": 0,
"collectionStatus": "CREATING"
}
Authorizations
Project API Key.
Path Parameters
Project name.
Body
application/json
Response
202
application/json
Created collection
The response is of type object
.
curl --request POST \
--url https://{baseUrl}/projects/{projectName}/collections \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '{
"collectionName": "example-collection-name",
"indexConfigs": {
"example-field1": {
"type": "text",
"analyzers": [
"english"
]
},
"example-field2": {
"type": "vector",
"dimensions": 128,
"similarity": "cosine"
}
}
}'
{
"projectName": "example-project-name",
"collectionName": "example-collection-name",
"indexConfigs": {
"example-field1": {
"type": "text",
"analyzers": [
"english"
]
},
"example-field2": {
"type": "vector",
"dimensions": 128,
"similarity": "cosine"
}
},
"numDocs": 0,
"collectionStatus": "CREATING"
}
Assistant
Responses are generated using AI and may contain mistakes.