Developers
One API call for the whole retrieval stack.
Add document search to your product with one API call. Upload documents, search them with filters and permissions, and get cited answers if you want them. A typed TypeScript SDK and an MCP server let your app or your AI agent do the same. Everything the console does, the API does, because the console is just a client.
Quick start
From nothing to a first search in three steps.
Get a key
Create a free account and make an API key in the console. A key can be limited to searching only.
Add documents
Upload files, post text or crawl a website. Scanned pages are read for you, and sensitive details are protected before indexing.
Search
Call the search endpoint from your app, or let your AI agent use the MCP server. Add cited answers when you want them.
A real search call
One request finds, ranks, filters and respects permissions.
A single call searches by exact words and by meaning, puts the best passages first, applies your filters, and returns only what the person you name is allowed to see. The example sets every option at once; most calls need only the query.
The response lists the passages in rank order with their scores, plus a pipeline block that says exactly which steps ran, so you can see why a result came back.
The surface
Every endpoint group.
| Group | Routes | What it does |
|---|---|---|
| Auth & API keys | POST /auth/*, /api-keys | Scoped keys (trv_…), JWT for the console, per-tenant rate limits with Retry-After. |
| Projects & connections | POST /projects, /connections | A project binds a vector store, embedder, reranker and LLM — or none of them on troveGEN Cloud, where they are hosted. Credentials encrypted at rest, never returned. |
| Ingestion | POST /documents/{text,file,url,crawl} | Parse, OCR, chunk, embed, upsert. Streamable over SSE with real per-stage timings. |
| Sources & sync | POST /sources, /sources/:id/sync | S3, Azure Blob, Google Drive, OAuth2 HTTP, or a plain manifest. Deletions propagate. |
| Search | POST /projects/:id/search | Hybrid dense + BM25, RRF, MMR, rerank, metadata filters, ACL scoping, related-chunk expansion. |
| Evaluation | POST /eval-sets, /eval-runs | Golden sets, scored runs, A/B compare with per-question regressions. |
| Conversations | POST /ask with conversationId | Threaded history with citations stored as a snapshot, so a deleted chunk cannot break the thread. |
| Ask (optional) | POST /projects/:id/ask | Cited answers, validated citations, honest refusal, groundedness scoring, SSE streaming, agentic mode. |
| Usage & health | GET /usage, /health/ready | Live entitlements and metering; readiness fails when a hard dependency is down. |
TypeScript SDK
Typed, dependency-free.
Works in Node 18+ and browsers. Retries with Retry-After, an async iterator for streaming answers, and errors that carry both a code and the request id.
MCP server
Give an AI agent your corpus.
Exposes search, cited answers, exact table aggregates and document listing over the Model Context Protocol. Read-only unless you explicitly allow writes — and every call still runs through scopes, entitlements and ACLs.
Engineering details that matter
The parts you only notice when they're wrong.
Consistent envelope
Every response is {success, data} or {success, error:{code, message, details}}. Errors carry a machine-readable code, never a stack trace.
Request correlation
Every request gets an x-request-id, echoed back and stamped on every log line for that request — including deep inside the ingestion pipeline.
Rate limits you can react to
429 with Retry-After plus X-RateLimit-Limit and -Remaining. The per-tenant budget is admin-configurable.
Streaming that stops when you do
SSE for both ingestion stages and answer generation. Disconnect and generation aborts — you are not metered for tokens you never received.
Idempotent ingestion
Queued jobs carry a stable id, so a retry after a crash resolves to the existing document instead of duplicating vectors.
Deletion really deletes
A failed vector purge aborts the whole delete so it stays retryable, rather than removing bookkeeping and orphaning vectors in your store.
Read the full reference.
Every endpoint, grouped by module, with curl, JavaScript, Python and Go samples.