RAAS API Documentation
Integrate document intelligence into your agents, pipelines, and applications
Authentication
All API requests require a Bearer token. Generate an API key from your dashboard. Keys have the format raas_...
https://api.raas.toolscurl -H "Authorization: Bearer raas_your_api_key" \
https://api.raas.tools/api/documentsDocuments API
/api/documentsUpload a document for processing. Send as multipart/form-data with the file and a project ID.
Request body (multipart/form-data)
file | File | The document file (PDF, DOCX, XLSX, PPTX, TXT) |
projectId | string | UUID of the target project |
curl -X POST https://api.raas.tools/api/documents \
-H "Authorization: Bearer raas_your_key" \
-F "file=@contract.pdf" \
-F "projectId=your-project-id"Response
{
"id": "doc_abc123",
"name": "contract.pdf",
"status": "queued",
"projectId": "your-project-id",
"createdAt": "2026-03-15T10:30:00.000Z"
}/api/documentsList all documents in a project. Returns metadata and processing status for each document.
Query parameters
projectId | string | UUID of the project (required) |
curl "https://api.raas.tools/api/documents?projectId=your-project-id" \
-H "Authorization: Bearer raas_your_key"Response
{
"data": [
{
"id": "doc_abc123",
"name": "contract.pdf",
"status": "completed",
"entityCount": 24,
"chunkCount": 87,
"createdAt": "2026-03-15T10:30:00.000Z"
}
]
}/api/documents/:id/progressGet real-time processing status for a document. Poll this endpoint after upload to track ingestion progress.
curl https://api.raas.tools/api/documents/doc_abc123/progress \
-H "Authorization: Bearer raas_your_key"Response
{
"status": "processing",
"processingStep": "embedding",
"processingProgress": 0.72,
"entityCount": 24,
"chunkCount": 65
}Search API
/api/search/hybridCombined semantic + keyword search with optional Cohere reranking. This is the recommended search endpoint for most use cases.
Request body
{
"query": "What are the payment terms?",
"projectId": "your-project-id",
"limit": 5,
"rerank": true
}Response
{
"data": [
{
"chunk": {
"text": "Payment is due within 30 days of invoice date...",
"metadata": { "page": 4, "section": "Terms" }
},
"score": 0.94,
"document": {
"id": "doc_abc123",
"name": "contract.pdf"
}
}
]
}/api/search/semanticPure vector similarity search using pgvector embeddings. Best for open-ended or conceptual queries.
{
"query": "risks related to supply chain disruption",
"projectId": "your-project-id",
"limit": 10
}/api/search/entitiesQuery extracted entities (people, dates, monetary amounts, etc.) with structured filters. Uses SQL under the hood for exact matching.
Query parameters
projectId | string | Project UUID (required) |
type | string | Entity type filter (e.g. "amount", "date", "person") |
minConfidence | number | Minimum confidence score (0-1, default 0.7) |
curl "https://api.raas.tools/api/search/entities?projectId=ID&type=amount&minConfidence=0.8" \
-H "Authorization: Bearer raas_your_key"Response
{
"data": [
{
"type": "amount",
"value": "$3,200,000",
"confidence": 0.95,
"context": "Q4 Enterprise SaaS revenue totalled $3,200,000",
"document": { "id": "doc_abc123", "name": "q4-report.pdf" }
}
]
}Chat API
/api/chat/conversations/:id/messagesSend a message to a document conversation. Returns an AI-generated response with source citations.
Request body
{
"content": "What were the top revenue streams in Q4?"
}Response
{
"message": {
"role": "assistant",
"content": "The top three revenue streams in Q4 were Enterprise SaaS ($3.2M), Professional Services ($1.1M), and API Usage ($440K)."
},
"citations": [
{
"text": "Q4 Enterprise SaaS revenue totalled $3,200,000",
"document": "q4-report.pdf",
"page": 7
}
]
}MCP Integration
RAAS ships as a Model Context Protocol server. Connect it to Claude Desktop, Cursor, or any MCP-compatible client to give your AI tools direct access to your documents.
claude_desktop_config.json
{
"mcpServers": {
"raas": {
"command": "npx",
"args": ["-y", "@raas/mcp"],
"env": {
"RAAS_API_KEY": "raas_your_key",
"RAAS_PROJECT_ID": "your-project-id"
}
}
}
}Available MCP Tools
search_documents | Semantic search over your document corpus |
hybrid_search | Combined keyword + semantic search with reranking |
query_entities | Query extracted entities (people, dates, amounts, etc.) |
compare_documents | Analyze differences between two documents |
extract_to_format | Extract data into a structured schema |
generate_report | Generate a structured report from documents |
check_compliance | Validate content against rules |
draft_from_templates | Generate drafts using document templates |
Rate Limits
| Tier | API Calls | Queries/mo | Documents |
|---|---|---|---|
| Free | 60/min | 500 | 100 |
| Pro | 100/min | 2,500 | 500 |
| Enterprise | Custom | 50,000 | 10,000 |
When rate limited, the API returns 429 with a Retry-After header.
Quick Start
A complete working example — upload a document then search it.
# 1. Upload a document
curl -X POST https://api.raas.tools/api/documents \
-H "Authorization: Bearer raas_your_key" \
-F "file=@contract.pdf" \
-F "projectId=your-project-id"
# 2. Search across your documents
curl -X POST https://api.raas.tools/api/search/hybrid \
-H "Authorization: Bearer raas_your_key" \
-H "Content-Type: application/json" \
-d '{
"query": "What are the payment terms?",
"projectId": "your-project-id",
"limit": 5,
"rerank": true
}'