Skip to main content

API Overview

Base URL

http://your-server:8000

The interactive API explorer (Swagger UI) is available at /docs when the server is running.

Authentication

All endpoints (except GET / and GET /metrics) require an API key in the x-api-key header:

curl http://localhost:8000/v1/collections \
-H "x-api-key: your-api-key"

API Key Roles

RolePermissions
adminAll operations including key management
readwriteRead and write vectors and collections
readonlyRead-only: search, list, get

Create additional API keys via the /v1/admin/keys endpoint (requires admin key).

Response Format

All responses follow a consistent envelope format:

{
"status": "success",
"data": { ... },
"error": null
}

On error:

{
"status": "error",
"data": null,
"error": {
"code": 404,
"message": "Collection 'my-col' not found"
}
}
note

The HTTP status code is always 200. Check the status field in the response body to detect errors.

Error Codes

CodeMeaning
400Bad request — invalid parameters or dimension mismatch
401Unauthorized — missing or invalid API key
403Forbidden — API key doesn't have required role
404Not found — collection or vector doesn't exist
409Conflict — collection or resource already exists
422Validation error — request body failed schema validation
429Rate limited — too many requests for this API key
500Internal server error

Rate Limiting

Requests are rate-limited per API key using a sliding window. The default is 100 requests/minute per key. Configure with RATE_LIMIT_PER_MINUTE.

When rate limited, the response contains:

{
"status": "error",
"data": null,
"error": {
"code": 429,
"message": "Rate limit exceeded"
}
}