RAG Knowledge Base
The RAG Knowledge Base API is used for document uploading, vector collection maintenance, document retrieval & QA, and session cleanup. Developers only need to use the OPEAI Platform API Key to call the public endpoints.
Authentication method:
Authorization: Bearer <API_KEY>
Call Instructions
- Base URL:
https://api-platform.ope.ai - All RAG endpoints require Bearer Token authentication.
Default Quotas
To ensure the stability of knowledge base construction, retrieval, and QA, the RAG Knowledge Base has the following default quotas:
| Limit Item | Default Limit | Description |
|---|---|---|
| Knowledge Base Count | Max 5 per account | One API Key can create one independent knowledge base; you can use 5 API Keys to create 5 isolated knowledge bases |
| Document Count | Max 100 documents per account | Includes uploaded and retained documents in the knowledge base |
| Total Document Size | Max 200 MB cumulative size per account | When exceeding the limit, you need to delete some documents, compress/split documents, or apply for a higher quota |
For higher capacity, more knowledge bases, enterprise-grade isolation, or dedicated deployment solutions, please contact us.
Recommended Flow
- Call Create Knowledge Base Collection to initialize the knowledge base vector collection.
- Call Upload Document to write knowledge base documents and complete chunking and indexing.
- Call Initiate RAG QA to generate answers based on document content.
- Call document query, chunk query, download, delete, and session deletion endpoints as needed.
Endpoints
Create Collection
POST
Create a knowledge base collection for storing and retrieving document vectors.
Upload Document
POST
Upload one or more documents, completing chunking and vector indexing.
Document List
GET
View the uploaded documents under the current knowledge base.
Document Chunks
GET
View the chunked text and enabled status of a specified document.
RAG QA
POST
Retrieve from the knowledge base and generate answers, supporting streaming.
Delete Session
POST
Delete a specified RAG session and its associated chat logs.