Qdrant vector database REST API via curl. Use this skill to store, search, and manage vector embeddings.
/plugin marketplace add vm0-ai/api0/plugin install api0@api0This skill inherits all available tools. When active, it can use any tool Claude has access to.
Use the Qdrant REST API via direct curl calls to store and search vector embeddings for RAG, semantic search, and recommendations.
Official docs:
https://qdrant.tech/documentation/
Use this skill when you need to:
export QDRANT_URL="https://xyz-example.aws.cloud.qdrant.io:6333"
export QDRANT_API_KEY="your-api-key"
Run Qdrant locally with Docker:
docker run -p 6333:6333 -p 6334:6334 qdrant/qdrant
export QDRANT_URL="http://localhost:6333"
export QDRANT_API_KEY="" # Optional for local
Important: When using
$VARin a command that pipes to another command, wrap the command containing$VARinbash -c '...'. Due to a Claude Code bug, environment variables are silently cleared when pipes are used directly.bash -c 'curl -s "https://api.example.com" -H "Authorization: Bearer $API_KEY"' | jq .
All examples below assume you have QDRANT_URL and QDRANT_API_KEY set.
Verify connection to Qdrant:
bash -c 'curl -s -X GET "${QDRANT_URL}" --header "api-key: ${QDRANT_API_KEY}"' | jq .
Get all collections:
bash -c 'curl -s -X GET "${QDRANT_URL}/collections" --header "api-key: ${QDRANT_API_KEY}"' | jq .
Create a collection for storing vectors:
bash -c 'curl -s -X PUT "${QDRANT_URL}/collections/my_collection" --header "api-key: ${QDRANT_API_KEY}" --header "Content-Type: application/json" -d '"'"'{
"vectors": {
"size": 1536,
"distance": "Cosine"
}
}'"'"' | jq .'
Distance metrics:
Cosine - Cosine similarity (recommended for normalized vectors)Dot - Dot productEuclid - Euclidean distanceManhattan - Manhattan distanceCommon vector sizes:
text-embedding-3-small: 1536text-embedding-3-large: 3072Get details about a collection:
bash -c 'curl -s -X GET "${QDRANT_URL}/collections/my_collection" --header "api-key: ${QDRANT_API_KEY}"' | jq .
Add vectors with payload (metadata):
bash -c 'curl -s -X PUT "${QDRANT_URL}/collections/my_collection/points" --header "api-key: ${QDRANT_API_KEY}" --header "Content-Type: application/json" -d '"'"'{
"points": [
{
"id": 1,
"vector": [0.05, 0.61, 0.76, 0.74],
"payload": {"text": "Hello world", "source": "doc1"}
},
{
"id": 2,
"vector": [0.19, 0.81, 0.75, 0.11],
"payload": {"text": "Goodbye world", "source": "doc2"}
}
]
}'"'"' | jq .'
Find vectors similar to a query vector:
bash -c 'curl -s -X POST "${QDRANT_URL}/collections/my_collection/points/query" --header "api-key: ${QDRANT_API_KEY}" --header "Content-Type: application/json" -d '"'"'{
"query": [0.05, 0.61, 0.76, 0.74],
"limit": 5,
"with_payload": true
}'"'"' | jq .'
Response:
{
"result": {
"points": [
{"id": 1, "score": 0.99, "payload": {"text": "Hello world"}}
]
}
}
Filter results by payload fields:
bash -c 'curl -s -X POST "${QDRANT_URL}/collections/my_collection/points/query" --header "api-key: ${QDRANT_API_KEY}" --header "Content-Type: application/json" -d '"'"'{
"query": [0.05, 0.61, 0.76, 0.74],
"limit": 5,
"filter": {
"must": [
{"key": "source", "match": {"value": "doc1"}}
]
},
"with_payload": true
}'"'"' | jq .'
Filter operators:
must - All conditions must match (AND)should - At least one must match (OR)must_not - None should match (NOT)Retrieve specific points:
bash -c 'curl -s -X POST "${QDRANT_URL}/collections/my_collection/points" --header "api-key: ${QDRANT_API_KEY}" --header "Content-Type: application/json" -d '"'"'{
"ids": [1, 2],
"with_payload": true,
"with_vector": true
}'"'"' | jq .'
Delete by IDs:
bash -c 'curl -s -X POST "${QDRANT_URL}/collections/my_collection/points/delete" --header "api-key: ${QDRANT_API_KEY}" --header "Content-Type: application/json" -d '"'"'{
"points": [1, 2]
}'"'"' | jq .'
Delete by filter:
bash -c 'curl -s -X POST "${QDRANT_URL}/collections/my_collection/points/delete" --header "api-key: ${QDRANT_API_KEY}" --header "Content-Type: application/json" -d '"'"'{
"filter": {
"must": [
{"key": "source", "match": {"value": "doc1"}}
]
}
}'"'"' | jq .'
Remove a collection entirely:
bash -c 'curl -s -X DELETE "${QDRANT_URL}/collections/my_collection" --header "api-key: ${QDRANT_API_KEY}"' | jq .
Get total count or filtered count:
bash -c 'curl -s -X POST "${QDRANT_URL}/collections/my_collection/points/count" --header "api-key: ${QDRANT_API_KEY}" --header "Content-Type: application/json" -d '"'"'{
"exact": true
}'"'"' | jq .'
Common filter conditions:
{
"filter": {
"must": [
{"key": "city", "match": {"value": "London"}},
{"key": "price", "range": {"gte": 100, "lte": 500}},
{"key": "tags", "match": {"any": ["electronics", "sale"]}}
]
}
}
Match types:
match.value - Exact matchmatch.any - Match any in listmatch.except - Match none in listrange - Numeric range (gt, gte, lt, lte)