Documentation
EasyRAG is a Retrieval-Augmented Generation (RAG) as a Service platform that makes it easy to build AI-powered document search and question-answering systems.
EasyRAG handles the complex infrastructure for RAG applications:
A dataset is a logical container for related documents. Think of it as a project or knowledge base.
Examples:
customer-support – Help documentationlegal-contracts – Contract databaseuser-123-personal – Per-user document storageDocuments uploaded to a dataset. Supported formats:
Each file is:
Two authentication methods:
API Keys (Backend)
Frontend Tokens (Browser/Mobile)
/v1/tokens/createSign up at easyrag.com and generate an API key from the dashboard.
bashcurl -X POST https://api.easyrag.com/v1/files/upload \ -H "Authorization: Bearer YOUR_API_KEY" \ -F "datasetId=my-first-dataset" \ -F "file=@document.pdf"
bashcurl -X POST https://api.easyrag.com/v1/search \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "datasetId": "my-first-dataset", "question": "What is this document about?" }'
bashcurl -X POST https://api.easyrag.com/v1/query \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "datasetId": "my-first-dataset", "question": "Summarize the key points" }'
| Endpoint | Method | Purpose |
|---|---|---|
/v1/tokens/create | POST | Create frontend token |
/v1/files/upload | POST | Upload files to dataset |
/v1/files | GET | List files in dataset |
/v1/files/:fileId | GET | Get file details + download URL |
/v1/files/:fileId | DELETE | Delete single file |
/v1/datasets/:datasetId/files | DELETE | Delete all files in dataset |
/v1/files | DELETE | Delete all customer files |
/v1/search | POST | Semantic search (returns chunks) |
/v1/query | POST | AI-generated answers (RAG) |
Upload your help documentation and let users ask questions:
javascript// Upload docs (once) await uploadFiles('support-docs', helpFiles); // User asks question const answer = await query('support-docs', 'How do I reset my password?');
Let users search their uploaded documents:
javascript// User uploads await uploadFiles(`user-${userId}`, userFiles); // User searches const results = await search(`user-${userId}`, searchQuery);
Use EasyRAG for retrieval, bring your own LLM:
javascript// Get relevant context const chunks = await search('my-dataset', question); // Use your own LLM const answer = await yourLLM.complete({ context: chunks.map(c => c.pageContent).join('\n'), question });
Upload documents in any language (embeddings support 100+ languages):
javascriptawait uploadFiles('multilingual-docs', [ 'manual-en.pdf', 'manual-es.pdf', 'manual-fr.pdf' ]); // Search works across all languages const results = await search('multilingual-docs', 'comment réinitialiser');
Purchase credits in the dashboard:
All API requests use:
https://api.easyrag.com/v1
EasyRAG is built on: