Ask your documents
Ask a general-purpose model a question about your internal policy manual and it will either guess or refuse — it never saw the document. This endpoint answers from the documents you actually provide, cites the passages it used, and stays silent rather than invent an answer when your material doesn't cover the question.
Run it online
Run this on our servers with your account. Free tools run in your browser; this one bills your KIT balance per the price above.
The gap this closes
Generic language models are trained on public text up to a cutoff date and know nothing about your product manual, your internal wiki, your contract templates or last week's policy update. Teams that need accurate answers about their own material — support agents, internal tools, customer-facing chat — either maintain a brittle keyword search or accept answers that sound confident but are quietly wrong. Retrieval-augmented generation exists specifically to close that gap: it answers from your documents, not from whatever the model happened to memorize during training.
What happens between question and answer
You send a question along with a reference to your indexed document set, and the task runs asynchronously, returning a task_id immediately. Behind the scenes it retrieves the passages most relevant to the question, then composes an answer grounded specifically in that retrieved text, with the source passages included so the answer is checkable rather than a black box. The result arrives via signed webhook, or a signed link valid for 24 hours if you'd rather fetch it yourself.
Why grounding matters more than fluency
The term retrieval-augmented generation was coined in a 2020 research paper, but the underlying idea is older and simpler: an answer is only as trustworthy as the material it's based on, and a fluent-sounding sentence with no source is worth less than a shorter one you can verify. This approach treats retrieval as the first-class step — find the right passages first — and generation as the second step that writes an answer strictly from what was found, which is why a well-built RAG system will say it doesn't know rather than fabricate when the documents are silent on a question.
Where it fits in a real system
This is typically wired behind a support chat widget, an internal search bar, or an API that answers customer questions from a knowledge base, product documentation or policy library. Because pricing is per request plus per query, a support tool answering a thousand customer questions a day has a cost you can forecast rather than an open-ended bill, and a failed answer attempt is retried automatically and never charged, so transient failures don't become wasted spend.
What it will not do
It will not answer confidently from general knowledge when your documents don't cover the topic — that's a deliberate constraint, not a limitation, because a wrong answer stated confidently is worse than no answer. It also depends entirely on the quality of the documents you provide: gaps, contradictions or outdated material in your source set will surface as gaps, contradictions or outdated answers, so the accuracy of the output is a direct reflection of what you feed it.
What you can do with it
Customer support chatbot
A SaaS company answers customer questions from its help center documentation, with every answer citing the specific article it drew from instead of guessing at features that don't exist.
Internal policy Q&A
An HR team lets employees ask plain-language questions about the benefits handbook and gets answers grounded in the actual current policy text, not outdated institutional memory.
Contract and compliance lookup
A legal team queries a library of signed contracts to find which clauses apply to a specific vendor, with the answer citing the exact contract passage it came from.
Product documentation assistant
A developer tool embeds this behind a docs search bar so users get a direct answer to 'how do I configure X' instead of a list of loosely related pages to read themselves.
FAQ
What is a RAG API and how is it different from a chatbot?
A RAG API answers strictly from documents you provide, retrieving relevant passages first and then composing an answer grounded in them, rather than relying on general knowledge from training data alone.
Will it make up an answer if my documents don't cover the question?
No, that's the point of grounding — when the retrieved documents don't address the question, the answer reflects that rather than inventing plausible-sounding content.
Is there a free tier for rag.answer?
There's no free tier — free tiers get abused and slow everyone down. Access runs on a prepaid ForHosting KIT balance: top up from $10.00 (it never expires) and each request is charged at its published price, so a call with no balance returns HTTP 402. No subscription, no tokens, no invented credits, and a failed task is never charged.
What does the RAG API cost per query?
It's $0.003 per request plus $0.015 per query, giving you a predictable per-question cost for budgeting a support or internal Q&A tool.
Do answers include citations or sources?
Yes, answers are delivered along with the source passages they were grounded in, so every answer is checkable against the original document.
How current is the information in the answers?
As current as the documents you've indexed — the endpoint answers from your provided material, not from a fixed training cutoff, so keeping your document set updated keeps the answers current.
How do I receive the answer?
The call returns a task_id immediately, and the answer with its sources is delivered via signed webhook or a signed link valid for 24 hours.
Can I use this for a high volume of customer questions?
Yes, it's built for that use case — pricing per query makes it straightforward to forecast the cost of a support tool answering hundreds or thousands of questions daily.
For developers — API access
Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.
API endpoint
Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, and soon from our app, email and Telegram.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/rag/answer \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"input":"…"}'const res = await fetch("https://api.kit.forhosting.com/rag/answer", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"input": "…"
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/rag/answer",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"input": "…"
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/rag/answer", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"input":"…"}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"input":"…"}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/rag/answer", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"input": "…"
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "rag.answer",
"status": "queued",
"_links": {
"result": "/tasks/tsk_…/result"
}
}The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Limits
max_chunks | 10000 |
max_tokens | 20000 |
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |
422 | task_failed | The task failed after 3 retries. You are never charged for it. |