RAG Search is an API service based on Retrieval-Augmented Generation (RAG) technology that enables intelligent searches within your data and documents, identifying the most relevant information in real time from a query. Thanks to an advanced AI-powered system, the service returns one or more relevant text extracts (snippets), ensuring accurate and secure responses without any risk of sensitive data leaks.
The RAG-as-a-Service by Openapi technology allows companies to access, process, and generate accurate responses based on their proprietary data. Our service bridges the gap between Large Language Models (LLM) and the organization’s specific knowledge, eliminating “hallucinations” and providing reliable, consistent, and fully contextualized responses.
With RAG-as-a-Service, you can easily and scalably integrate RAG capabilities into your applications without managing complex infrastructure or data pipelines. The service allows you to automatically add and index your structured data, enabling the LLM to access up-to-date and relevant information in real time. In this way, Openapi combines the power of advanced language models with contextual search on company data, delivering precise, current, and truly knowledge-based responses.
In addition to RAG Search, Openapi offers two other document search services: Search with Answer (which provides AI-generated answers) and Conversation (which allows starting new conversations with contextualized responses based on previous conversations). All three services are available globally.
For RAG Search to function properly and for the generated response to be as relevant and consistent as possible, three steps must be followed:
Indexing refers to the process that allows retrieving the most relevant information quickly in response to a query. To obtain contextual and accurate responses, it is essential to start indexing whenever a RAG is modified (document uploaded or deleted).
The first step, as mentioned, involves creating a new, empty RAG, into which one or more documents can then be uploaded. This is possible through the POST /rag endpoint.
The request should include:
{
"name": "RAGTest",
"options": {
"ocr": false,
"autoIndexingIntervalHours": 0
},
"callback": {
"method": "POST",
"field": "string",
"url": "https://www.mysite.it/callback.php",
"data": {}
}
}
The response returns RAG details such as ID and name, state, options, settings (e.g., OCR off), total and indexed documents, creation, update, and last indexing dates.
{
"data": {
"id": "68947e1e0dab7e743108abfb",
"name": "RAGTest",
"state": "ready",
"options": {
"ocr": false,
"autoIndexingIntervalHours": 0
},
"totalDocuments": 0,
"totalIndexedDocuments": 0,
"sizeMegaByte": 0,
"createdAt": "2025-09-04T10:45:42.036Z",
"updatedAt": "2025-09-04T10:45:42.036Z",
"indexedAt": "2025-09-04T10:45:42.036Z",
"indexingRunAt": "2025-09-04T10:45:42.036Z",
"callback": {
"method": "POST",
"field": "string",
"url": "https://www.mysite.it/callback.php",
"data": {}
}
},
"success": true,
"message": "",
"error": null
}
Once the RAG is created, you can proceed to upload a document into it via the POST /rag/{id}/documents endpoint.
The request must specify the RAG ID where the document will be uploaded.
The payload must include:
{
"fileName": "documentTest",
"fileContent": "string",
"metadata": {
"custom_key_str": "string",
"custom_key_date": "2025-09-04T10:51:06.259Z",
"custom_key_int": 0,
"custom_key_geo_latitude": 0,
"custom_key_geo_longitude": 0,
"custom_key_bool": true
}
}
The response provides details about the document, including ID, name, state, metadata, size, file type, creation, and update dates.
{
"data": [
{
"id": "string",
"name": "string",
"state": "string",
"metadata": {
"custom_key_str": "string",
"custom_key_date": "2025-09-04T10:51:06.260Z",
"custom_key_int": 0,
"custom_key_geo_latitude": 0,
"custom_key_geo_longitude": 0,
"custom_key_bool": true
},
"sizeMegaByte": 0,
"mimeType": "string",
"createdAt": "2025-09-04T10:51:06.260Z",
"updatedAt": "2025-09-04T10:51:06.260Z",
"paymentDueDate": "2025-09-04T10:51:06.260Z"
}
],
"success": true,
"message": "",
"error": null
}
At any time, you can retrieve the list of documents within a RAG using the GET /rag/{id}/documents endpoint.
As mentioned above, to obtain contextual and accurate responses, it is essential to start indexing whenever a RAG is modified (document uploaded or deleted). If this step is skipped, the system will continue relying on previous data only.
Indexing can be started manually via PATCH/rag/{id}, or automatic indexing can be set to run every few hours (user-defined). Automatic indexing is configured when creating the RAG via the POST /rag endpoint. There are no additional costs for either manual or automatic indexing.
The request must specify the RAG ID for which manual indexing is started.
The payload must include the startIndexing parameter set to true to initiate indexing:
"startIndexing": trueThe response provides details on the RAG name, state (e.g., ready, indexing), settings (e.g., OCR on/off, automatic indexing on/off), number of documents present and indexed, current RAG size in MB, creation, and update dates.
{
"data": {
"id": "68947e1e0dab7e743108abfb",
"name": "RAGTest",
"state": "indexing",
"options": {
"ocr": false,
"autoIndexingIntervalHours": 0
},
"totalDocuments": 0,
"totalIndexedDocuments": 0,
"sizeMegaByte": 0,
"createdAt": "2025-09-04T10:55:37.306Z",
"updatedAt": "2025-09-04T10:55:37.306Z",
"callback": {
"method": "POST",
"field": "string",
"url": "https://www.mysite.it/callback.php",
"data": {}
}
},
"success": true,
"message": "",
"error": null
}
After completing the three steps above, you can perform the actual search through the POST /rag/search endpoint.
As mentioned, RAG Search allows you—via API and in real time—to find the document or information you need across all your files using an AI-powered search engine, starting from a query. All this is fully secure and without any risk of sensitive data leaks.
The request should include:
{
"ragId": "688b2ab3bccc6a603202f87c",
"query": "what services are available?",
"max_len": 5,
"metadata_filter": "(custom_key_int<175 AND custom_key_bool = \"true\") OR (custom_key_int<125 AND custom_key_bool = \"false\")",
"settings": {
"prompt_style": "basic"
}
}
RAG Search returns information about the most relevant documents for your query, including text snippets, helping you quickly locate the data you need.
Specifically, the response payload provides:
{
"data": [
[
{
"snippets": [
"string"
],
"id": "689c70313f292734010a7dda",
"ragId": "689c6ed7b283ac0aa40c1555",
"name": "documentTest",
"state": "indexing",
"metadata": {
"custom_key_str": "string",
"custom_key_date": "2025-09-04T13:32:33.635Z",
"custom_key_int": 0,
"custom_key_geo_latitude": 0,
"custom_key_geo_longitude": 0,
"custom_key_bool": true
}
}
]
],
"success": true,
"message": "",
"error": null
}
Thanks to RAG Search, you can query your documents quickly, ensuring the system returns the most accurate responses possible and extracts information only from uploaded and indexed data. This keeps your information fully secure.
The service is especially designed for companies managing large volumes of documents (contracts, reports, manuals), such as:
In general, RAG Search is ideal for any organization or professional needing fast access to precise, up-to-date information within their documents, optimizing search times and result reliability.
Do you need help?
Haven't found the answer you're looking for?
Fill in all the details, we will get back to you as soon as possible!
RAG Search is an API service based on Retrieval-Augmented Generation (RAG) technology that enables intelligent searches within your data and documents.
The system identifies the most relevant information in real time based on a query and returns pertinent and contextual text excerpts (snippets). All of this happens securely, with no risk of sensitive data leakage.
Openapi’s RAG-as-a-Service technology allows companies to query their proprietary data and obtain reliable, relevant, and contextualized answers, while reducing the risk of “hallucinations” typical of Large Language Models (LLMs).
Integration is simple and scalable, with no need to manage complex infrastructure: documents are automatically indexed, allowing the model to access up-to-date and relevant information in real time.
In this way, Openapi combines the power of artificial intelligence with the precision of enterprise data search, ensuring answers are always grounded in the organization’s actual knowledge.
If a document is not indexed, the updated information it contains will not be available for searches.
In practice, until reindexing is performed, RAG Search will continue to provide answers based only on previously indexed data, ignoring any recent changes or additions.
To ensure accurate and complete results, it is therefore essential to start the indexing process whenever a modification is made to the RAG (such as uploading or deleting a document).
Indexing is free of charge and can be performed manually or set to run automatically at regular intervals.
Absolutely. All data remains confined within the proprietary environment and is never used to train external models.
Processing takes place securely, with no risk of leakage or exposure of sensitive information.
The system supports the most common file formats: JPEG (.jpeg/.jpg), PNG (.png), PDF (.pdf), plain text (.txt), Word documents (.doc/.docx), Excel spreadsheets (.xls/.xlsx), and PowerPoint presentations (.ppt/.pptx).
Yes, all three RAG services (Search, Search with Answer, and Conversation) are available worldwide.
All three services are based on the same RAG technology and allow you to search through your documents with relevant and contextual answers to your query, but they return different types of output:
All services operate securely, with no risk of sensitive data leakage.
RAG services are ideal for companies that manage large volumes of documents (contracts, reports, manuals) and for any organization or professional who needs quick access to precise, up-to-date information.
For example, they are particularly suited for:
In general, RAG services support any organization seeking to improve efficiency, speed, and reliability in managing and searching company information.
Responses are provided in real time.
The cost varies depending on the service requested.
For document uploads (endpoint POST /rag/{id}/documents), the cost is calculated based on file size, at €0.0065/MB. When using the OCR service, an additional cost of €0.00190 per page applies.
For the RAG Search service, pricing starts at €0.0034 per request for subscription plans and €0.0059 per single request.