Base URL
Development:http://localhost:8000/v1Production:
https://your-domain.com:8000/v1
Authentication
All endpoints (except/v1/health) require an API key header when the service runs with REQUIRE_API_KEY=true (the default):
| Source | Tier | Use case |
|---|---|---|
cyborgdb.get_demo_api_key() / getDemoApiKey() / cyborgdb.GetDemoAPIKey(...) | Free | Quick evaluation — generates a real key without dashboard signup, time-limited. |
Unset CYBORGDB_API_KEY on the service | Free | Self-hosted evaluation. Service runs with the core library’s 1M-item-per-index cap; the same empty value is treated as the bearer credential, so you also need REQUIRE_API_KEY=false to skip the header. |
| Paid key from the CyborgDB Admin Dashboard | Paid | Production. Unlimited items, full feature set. Set as CYBORGDB_API_KEY on the service and pass the same value as X-API-Key. |
Response Format
Success:Error model: API keys, index keys, and KMS
A small amount of nuance applies to error codes on index-scoped routes (anything under/v1/indexes/{index_name}/… and /v1/indexes/{upsert,query,query-binary,train,delete,…}):
| Status | Meaning |
|---|---|
400 Bad Request | The request is malformed for this index’s key path. The most common case is supplying index_key (header or body) for a KMS-backed index — the service resolves the KEK itself and rejects user-supplied keys with: “index is KMS-backed; do not supply index_key. Omit index_key from the request.” |
401 Unauthorized | Either (a) the X-API-Key header is missing/invalid, or (b) for SDK-supplied indexes, the index_key was supplied but does not match the key the index was created with (“Invalid encryption key for index”). Inspect the detail field to disambiguate. |
403 Forbidden | RBAC routes (user create/list/delete) called without the root API key, or when RBAC is not enabled on the service. |
404 Not Found | The named index does not exist. |
Wrong-
index_key returns 401 in v0.17 (previously some paths returned 500). KMS-backed indexes that receive an unexpected index_key return 400 rather than silently ignoring it — this surfaces SDK-versus-KMS confusion early.