Documentation
Build with Emergent
Everything you need to integrate EmergentDB and QDKV into your application.
Overview
EmergentDB is a self-optimizing vector database with a managed cloud tier and an open-source in-process mode. The hosted API lives at https://api.emergentdb.com.
Every account gets a free tier: 100K vectors, shared resources. No credit card required.
Authentication
All requests require an API key passed as a Bearer token:
Authorization: Bearer emdb_YOUR_API_KEYGet your key from the dashboard.
Quickstart
JavaScript / TypeScript
npm install emergent-sdkimport { EmergentClient } from "emergent-sdk";
const client = new EmergentClient({ apiKey: "emdb_YOUR_API_KEY" });
// Upsert vectors
await client.upsert([
{ id: "doc-1", vector: [0.1, 0.2, 0.3], metadata: { text: "hello world" } },
{ id: "doc-2", vector: [0.4, 0.5, 0.6], metadata: { text: "foo bar" } },
]);
// Search
const results = await client.search({
vector: [0.1, 0.2, 0.3],
topK: 10,
});curl
# Upsert
curl -X POST https://api.emergentdb.com/vectors/upsert \
-H "Authorization: Bearer emdb_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"vectors": [
{ "id": "doc-1", "vector": [0.1, 0.2, 0.3], "metadata": { "text": "hello" } }
]
}'POST /vectors/upsert
Insert or update vectors.
Request body
{
"vectors": [
{
"id": "string",
"vector": [number],
"metadata": { "key": "value" }
}
]
}Response
{ "upserted": 1 }POST /vectors/search
Search by vector similarity (cosine distance).
Request body
{
"vector": [number],
"topK": 10,
"filter": {}
}Response
{
"results": [
{ "id": "doc-1", "score": 0.98, "metadata": { "text": "hello" } }
]
}DELETE /vectors/delete
Delete vectors by ID.
Request body
{ "ids": ["doc-1", "doc-2"] }Response
{ "deleted": 2 }GET /vectors/stats
Returns usage stats for your account.
Response
{
"vectorCount": 42000,
"maxVectors": 100000,
"plan": "free",
"percentUsed": 42
}Pricing
| Plan | Vectors | Price |
|---|---|---|
| Free | 100,000 | $0/mo |
| Launch | 5,000,000 | $19/mo |
| Scale | 50,000,000 | $99/mo |
Rate limits
| Plan | Limit |
|---|---|
| Free | 60 req/min |
| Launch | 300 req/min |
| Scale | 600 req/min |
Rate limit headers: X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset.
Error codes
| Code | Meaning |
|---|---|
| 401 | Missing or invalid API key |
| 402 | Vector capacity exceeded — upgrade plan |
| 429 | Rate limit exceeded |
| 500 | Server error — retry with backoff |