documentation
API Reference
Add intelligent search to your application in minutes. Upload data sources, and let RenBase reason over them to deliver precise, cited answers.
getting started
Quick start
Four steps to go from zero to a working search endpoint.
security
Authentication
All requests require a Bearer token in the Authorization header.
Authorization: Bearer YOUR_API_KEY API keys are created from the RenBase Dashboard. Each key is a 64-character string tied to your organization. It is shown only once at creation time.
overview
Core concepts
search
POST /ask
Ask a question against a knowledge base. RenBase retrieves the most relevant evidence and synthesizes an answer with citations.
Request body
Example request
curl -X POST https://api.renbase.com/api/v1/ask \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"query": "What is the notice period for contract termination?",
"base_id": "550e8400-e29b-41d4-a716-446655440000"
}' Response
{
"answer": "The contract stipulates a 30-day notice period for termination.",
"confidence": 0.92,
"citations": [
{
"text": "Either party may terminate this agreement with thirty (30) calendar days written notice.",
"source": "service_agreement_2024.pdf",
"chunk_id": "c7f3e2a1",
"relevance_score": 0.95
}
],
"suggested_queries": [
"What are the penalty clauses for early termination?"
],
"latency_ms": 2340
} Streaming (SSE)
Set "stream": true to receive Server-Sent Events. The endpoint emits chunk, citations, and done events in sequence.
ingestion
POST /ingest
Upload one or more files to a knowledge base. RenBase extracts text, chunks semantically, generates embeddings, and builds a knowledge graph.
Form fields (multipart/form-data)
Example request
curl -X POST https://api.renbase.com/api/v1/ingest \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "base_id=550e8400-e29b-41d4-a716-446655440000" \
-F "files=@contract_2024.pdf" \
-F "files=@amendment_q3.docx" \
-F 'metadata={"filters":{"department":"legal","year":"2024"}}' Response
{
"results": [
{ "status": "queued", "job_id": "7c9e6679-...", "file_id": "6ba7b810-...", "name": "contract_2024.pdf" },
{ "status": "exists", "file_id": "6ba7b810-...", "name": "amendment_q3.docx" }
]
} ingestion
GET /ingest/{job_id}/status
Check the processing status of an uploaded file.
curl https://api.renbase.com/api/v1/ingest/JOB_ID/status \
-H "Authorization: Bearer YOUR_API_KEY" bases
POST /bases
Create a new knowledge base. Returns the base object with its id to use in subsequent requests.
curl -X POST https://api.renbase.com/api/v1/bases \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name": "Product Documentation"}' {
"id": "550e8400-e29b-41d4-a716-446655440000",
"org_id": "6ba7b810-9dad-11d1-80b4-00c04fd430c8",
"name": "Product Documentation",
"created_at": "2026-03-18T10:00:00Z",
"updated_at": "2026-03-18T10:00:00Z"
} files
Files
/bases/{base_id}/files List all files in a knowledge base.
curl https://api.renbase.com/api/v1/bases/BASE_ID/files \
-H "Authorization: Bearer YOUR_API_KEY" {
"files": [
{
"id": "6ba7b810-...",
"name": "contract_2024.pdf",
"status": "indexed",
"mime_type": "application/pdf",
"size": 2048576,
"created_at": "2026-03-18T10:00:00Z"
}
]
} /bases/{base_id}/files/{file_id} Get metadata for a specific file.
curl https://api.renbase.com/api/v1/bases/BASE_ID/files/FILE_ID \
-H "Authorization: Bearer YOUR_API_KEY" {
"id": "6ba7b810-...",
"name": "contract_2024.pdf",
"status": "indexed",
"mime_type": "application/pdf",
"size": 2048576,
"connector_id": null
} /bases/{base_id}/files/{file_id} Delete a file and all its indexed data (vectors, graph nodes, storage).
curl -X DELETE https://api.renbase.com/api/v1/bases/BASE_ID/files/FILE_ID \
-H "Authorization: Bearer YOUR_API_KEY" { "deleted": "6ba7b810-9dad-11d1-80b4-00c04fd430c8" } /bases/{base_id}/files/{file_id}/download Get a temporary presigned URL to download the original file. Expires after 1 hour.
curl https://api.renbase.com/api/v1/bases/BASE_ID/files/FILE_ID/download \
-H "Authorization: Bearer YOUR_API_KEY" {
"url": "https://storage.renbase.com/...",
"expires_at": "2026-03-18T11:00:00Z"
} security & privacy
Security
Privacy is a design constraint, not an afterthought. Every architectural decision ensures your data never leaves your control.
Security metadata
Attach security metadata to files during ingestion. When a query includes a security parameter, only files matching those access-control values are searched.
{
"filters": {
"department": "legal",
"year": "2024"
},
"security": {
"team": ["legal", "compliance"],
"clearance": "confidential"
}
} Compliance
errors
Errors
All errors return a JSON object with a detail field describing the problem.
{ "detail": "Query must be between 3 and 2000 characters" } limits
Limits
code examples
Full end-to-end example
Create a base, upload a file, wait for processing, then search. The complete flow in each language.
# 1. Create a base
curl -X POST https://api.renbase.com/api/v1/bases \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name": "My Knowledge Base"}'
# 2. Upload a file (use the id from step 1 as BASE_ID)
curl -X POST https://api.renbase.com/api/v1/ingest \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "base_id=BASE_ID" \
-F "files=@document.pdf"
# 3. Poll until completed (use job_id from step 2)
curl https://api.renbase.com/api/v1/ingest/JOB_ID/status \
-H "Authorization: Bearer YOUR_API_KEY"
# 4. Search
curl -X POST https://api.renbase.com/api/v1/ask \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"query": "What is the cancellation policy?", "base_id": "BASE_ID"}'