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.

curl -X POST "https://api.trovegen.com/api/v1/projects/$PROJECT/search" \ -H "Authorization: Bearer $TROVEGEN_KEY" \ -H "Content-Type: application/json" \ -d '{ "query": "what is the refund window", "mode": "hybrid", "topK": 5, "rerank": "tei", "filter": { "department": { "$in": ["support", "legal"] } }, "expand": "section", "onBehalfOf": { "principals": ["group:support"] } }'

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.

GroupRoutesWhat it does
Auth & API keysPOST /auth/*, /api-keysScoped keys (trv_…), JWT for the console, per-tenant rate limits with Retry-After.
Projects & connectionsPOST /projects, /connectionsA 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.
IngestionPOST /documents/{text,file,url,crawl}Parse, OCR, chunk, embed, upsert. Streamable over SSE with real per-stage timings.
Sources & syncPOST /sources, /sources/:id/syncS3, Azure Blob, Google Drive, OAuth2 HTTP, or a plain manifest. Deletions propagate.
SearchPOST /projects/:id/searchHybrid dense + BM25, RRF, MMR, rerank, metadata filters, ACL scoping, related-chunk expansion.
EvaluationPOST /eval-sets, /eval-runsGolden sets, scored runs, A/B compare with per-question regressions.
ConversationsPOST /ask with conversationIdThreaded history with citations stored as a snapshot, so a deleted chunk cannot break the thread.
Ask (optional)POST /projects/:id/askCited answers, validated citations, honest refusal, groundedness scoring, SSE streaming, agentic mode.
Usage & healthGET /usage, /health/readyLive 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.

npm install @intellara/trovegen-sdk
import { TroveGenClient } from '@intellara/trovegen-sdk'; const trovegen = new TroveGenClient({ apiKey: process.env.TROVEGEN_KEY }); const res = await trovegen.search(projectId, { query: 'what is the refund window', mode: 'hybrid', rerank: 'tei', topK: 5, }); for (const hit of res.results) { console.log(hit.score, hit.content); }

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.

{ "mcpServers": { "trovegen": { "command": "npx", "args": ["-y", "@intellara/trovegen-mcp"], "env": { "TROVEGEN_API_KEY": "trv_…", "TROVEGEN_PROJECT": "…" } } } }

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.