HomeProductsRAG Search with Answer

RAG Search with Answer

NEW

FREE 1440 requests/day

€0.0135 + VAT

FREE requests

Search all your documents and get a relevant, contextual answer in natural language, thanks to RAG technology. All via API and in real time.

Delivery

In real time

API

AI

available for
  • gz

RAG Search with Answer is the service that leverages the power of Retrieval-Augmented Generation (RAG) technology to enable intelligent searches within your documents. The service combines semantic search and natural language output generation, returning in real time a single relevant response based on a query. All of this is done reliably and securely, without any data leaks.

As mentioned, at the core is the RAG-as-a-Service by Openapi technology, which allows companies to query their proprietary data and obtain reliable, contextualized answers. The system reduces the risk of “hallucinations” typical of Large Language Models (LLMs), providing responses that are consistent and relevant to the organization’s specific knowledge.

Thanks to RAG-as-a-Service, you can easily integrate advanced RAG functionalities into your applications, without the complexity of dedicated infrastructures or data pipelines. Your data is automatically indexed, allowing the model to access up-to-date information in real time. In this way, Openapi combines the power of LLMs with contextual search on corporate data, providing precise answers based exclusively on your proprietary knowledge.

In addition to Search with Answer, Openapi also offers two other RAG services for document search: Search, which returns one or more relevant text excerpts, and Conversation, which allows contextualized conversations based on previous interactions. All three are valid globally.

To obtain coherent and relevant results with RAG Search with Answer, three main steps must be followed:

  • Create a new RAG
  • Upload a document
  • Start the indexing process

Indexing makes it possible to quickly retrieve the most relevant information in response to a query. Each time the RAG is modified (by uploading or removing documents), it is essential to restart the indexing to ensure updated and accurate answers.

Create a new RAG

POST /rag

The first step is to create an empty RAG through the endpoint POST /rag, where documents will later be added.

REQUEST EXAMPLE

The request must include:

  • name to assign to the RAG
  • optional activation of OCR (Optical Character Recognition)
  • optional time interval for automatic indexing start
{
  "name": "RAGTest",
  "options": {
    "ocr": false,
    "autoIndexingIntervalHours": 0
  },
  "callback": {
    "method": "POST",
    "field": "string",
    "url": "https://www.mysite.it/callback.php",
    "data": {}
  }
}

RESPONSE EXAMPLE

The response contains details of the RAG (e.g. ID and name, status, options, settings such as OCR, 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
}

At any time, you can retrieve the list of all RAGs or the details of a single RAG using the endpoints GET /rag and GET /rag/{id}.

Upload a document

POST /rag/{id}/documents

Once the RAG has been created, you can proceed with adding a document through the endpoint POST /rag/{id}/documents.

REQUEST EXAMPLE

In the request, the ID of the RAG in which the document will be uploaded must be specified as a parameter.

The payload must include:

  • document name (fileName)
  • document content (fileContent): a base64-encoded string in JSON format
  • metadata (string, document date, geographic coordinates, boolean value), i.e. additional customizable information associated with the document, which will be useful when using the RAG Search service
{
  "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
  }
}

RESPONSE EXAMPLE

The response provides details about the document, including ID, name, status, metadata, size, file type, and 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 through the endpoint GET /rag/{id}/documents.

Start indexing process

PATCH /rag/{id}

As mentioned above, to obtain contextual and accurate answers, it is essential to start indexing every time a modification is made to the RAG (when a document is uploaded or deleted). If this step is not performed, the system will continue to rely only on previous data and not on the updated ones.

Indexing can be started manually through PATCH/rag/{id}; alternatively, automatic indexing can be set to start every X hours (as defined by the user). The latter must be configured when creating the RAG, via the endpoint POST /rag. There are no additional costs for indexing, whether automatic or manual.

REQUEST EXAMPLE

In the request, the ID of the RAG for which the manual indexing process is started must be specified as a parameter.

The request payload must include the parameter startIndexing set to true to start the indexing process:

"startIndexing": true

RESPONSE EXAMPLE

The response returns details about the RAG name, status (e.g. ready, indexing), settings (e.g. OCR yes/no, automatic indexing yes/no), number of documents present and indexed, current RAG size in MB, and 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
}

RAG SEARCH WITH ANSWER

POST /rag/search-with-answer

After completing the three steps mentioned above, you can proceed to the actual search through the endpoint POST /rag/search-with-answer.

As specified at the beginning, RAG Search with Answer allows you — via API and in real time — to find the document or information you need within all your files, starting from a query, and to obtain contextual answers in natural language. All this in total security and with no risk of sensitive data leakage.

REQUEST EXAMPLE

The request must include:

  • RAG ID in which to perform the search
  • query, i.e. the word or phrase to be entered in the search field to find specific documents
  • maximum length (max_len), i.e. the maximum number of results to return, sorted by relevance
  • metadata filters (metadata_filter), i.e. any filters previously set during document upload (string, document date, geographic coordinates, boolean value)
  • settings, i.e. additional search parameters such as prompt style
{
  "ragId": "688b2ab3bccc6a603202f87c",
  "query": "che servizi ci sono?",
  "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"
  }
}

RESPONSE EXAMPLE

RAG Search with Answer returns information on the documents most relevant to your query, including text excerpts that can help you quickly find the data you are looking for.

Specifically, the response payload provides:

  • natural language answer
  • one or more relevant text snippets found in the document
  • document ID
  • RAG ID from which the document originates
  • document name
  • document status
  • metadata
{
  "data": [
    {
      "answer": "string",
      "search_result": [
        {
          "index": 0,
          "snippets": [
            "string"
          ],
          "id": "689c70313f292734010a7dda",
          "ragId": "689c6ed7b283ac0aa40c1555",
          "name": "documentTest",
          "state": "indexing",
          "metadata": {
            "custom_key_str": "string",
            "custom_key_date": "2025-09-25T10:34:00.005Z",
            "custom_key_int": 0,
            "custom_key_geo_latitude": 0,
            "custom_key_geo_longitude": 0,
            "custom_key_bool": true
          }
        }
      ]
    }
  ],
  "success": true,
  "message": "",
  "error": null
}

With RAG Search with Answer, you can quickly query your documents, obtaining precise and reliable answers while accessing only the data that has been uploaded and indexed. This way, your information remains completely protected.

The service is ideal for companies that manage large volumes of documents (contracts, reports, manuals), such as:

  • law firms, for quick document verification and analysis
  • CRM and knowledge base systems that need fast and reliable internal searches
  • companies in the finance, insurance, and healthcare sectors, where precision and data security are essential for reliable operations
  • e-commerce and marketplaces that want constantly updated operational information to optimize processes and decisions

In general, RAG Search with Answer supports all organizations or professionals who need to quickly access reliable information, optimizing time and accuracy in document management.

Sign Up

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!

Frequently Asked Questions

The RAG Search with Answer service uses Retrieval-Augmented Generation (RAG) technology, which combines advanced semantic search with natural language response generation. Specifically, it allows you to perform intelligent searches within your documents, returning a single, relevant and contextual response in real time.

All in complete security, with no risk of data leaks.

What is RAG Search with Answer?

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.

How does Openapi’s RAG-as-a-Service technology work?

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.

What happens if a document is not indexed?

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.

Does RAG guarantee data security?

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).

Which file formats can be uploaded?

Yes, all three RAG services (Search, Search with Answer, and Conversation) are available worldwide.

Are RAG services available globally?

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:

  • RAG Search provides one or more relevant text excerpts found in the uploaded and indexed documents
  • RAG Search with Answer generates a single natural language answer.
  • RAG Conversation allows you to have conversations that maintain the memory of the dialogue and take into account the historical context when responding. The output is generated in natural language and returned within a dialogue that can be resumed via the session ID, ensuring continuity between interactions.

All services operate securely, with no risk of sensitive data leakage.

What is the difference between RAG Search, RAG Search with Answer, and RAG Conversation?

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:

  • Law firms, for fast document checks and analyses
  • CRM and knowledge base systems that require quick and reliable internal searches
  • Companies in finance, insurance, and healthcare, where accuracy and data security are essential
  • E-commerce and marketplaces that need constantly updated operational information to optimize processes and decision-making

In general, RAG services support any organization seeking to improve efficiency, speed, and reliability in managing and searching company information.

Who are the RAG services designed for?

Responses are provided in real time.

What is the response time for the RAG service?

The cost varies depending on the service requested.

For document uploads (endpoint POST /rag/{id}/documents), the cost is calculated based on file size and is €0.0065/MB. If you use the OCR service, an additional cost of €0.00190 per page applies.

For the RAG Search with Answer service, the cost starts at €0.0105 for subscription requests and €0.00135 for single requests.

What are the costs of the RAG Search with Answer service?