The four calls
Create a database, ingest context, wait for indexing, then query it.- Create Database:
POST /databases. Isolates context for a customer, environment, or product. Creation runs in the background, so poll Database Status untilready_for_ingestionistrue. - Ingest Context:
POST /context/ingest. Files, app sources, or memories, in one multipart request. - Ingestion Status:
GET /context/status. Poll the returned IDs untilindexing_statusiscompleted, or register a webhook instead. - Query:
POST /query. Retrieve the context your model needs, from knowledge, memories, or both.
Every endpoint
SDK methods are listed by their Python names. The TypeScript SDK uses the same names in camelCase, such asdeleteCollection. Every endpoint page shows Python SDK, TypeScript SDK, and cURL examples, and each group overview covers that group’s call sequence and concepts.
Databases
Create and manage the databases that store your context. Overview.Context
Ingest, check, list, inspect, edit, and delete what you store. Overview.Query
Retrieve context, and tell HydraDB how a query performed. Overview.Connectors
Sync context from 70 apps without writing ingestion code. Overview.Webhooks
Get notified when indexing finishes instead of polling. Overview.Conventions
Authentication: Every endpoint requiresAuthorization: Bearer <your_api_key>. Get your key at dashboard.hydradb.com. The SDKs set it, and the version header, for you.
Versioning: Send API-Version: 2 with every request.
/databases, /context/*, /query, /feedback, and /webhooks/indexing*) return the same envelope, with the resource-specific payload under data. Connector endpoints (/connectors*) and PATCH /databases/{database}/metadata-schema are the exception: they return their success body without the envelope.
success: false and an error object containing code and message. Most errors have data: null. Some Delete Context errors include per-ID results under data. See Error Responses for error codes and retry rules.
Status codes: 200 for success, 201 when a resource is created, and 202 when an asynchronous operation is queued. Each endpoint page lists its own.
Database scoping: Use database to select a database and collection to scope context within it. Omitting collection uses the default collection. Requests that use the deprecated tenant field names can include deprecation notices. See Migrating from tenant fields.
Asynchronous operations: Database creation, database and collection deletion, and context ingestion are asynchronous. They return immediately after queuing. Use the relevant status endpoint to confirm completion before downstream operations.
Pagination: Listing endpoints (/context/list) return pagination fields for browsing large result sets.
Parameter casing: The REST API uses snake_case (database, max_results). The TypeScript SDK uses camelCase keys and method names (maxResults, deleteCollection) and ignores request keys it does not recognize, including snake_case ones. The Python SDK uses snake_case throughout. See SDKs.
Rate limits
Rate limits apply per API key. Both SDKs retry429 responses automatically. For raw HTTP, use exponential backoff; see Error Responses. Contact founders@hydradb.com for current limit values.
Next steps
Existing v1 endpoints remain available under the v1 API Reference.- Set up an SDK: SDKs covers installation, client setup, and the method reference. Packages: Python · TypeScript
- Handle errors: Error Responses lists status codes, error codes, and retry rules
- Tune queries: The Query guide explains retrieval modes and ranking
