/rag namespace · APlicious

RAG API — upload documents, ask questions, get cited answers

The /rag namespace handles the full retrieval-augmented-generation pipeline — upload, chunk, embed, search, and generate a cited answer — as four ordinary REST endpoints, no separate infrastructure to manage.

4RAG endpoints
Get free API key View docs
POST /api/v1/rag/chat
const res = await fetch('https://aplicious.com/api/v1/rag/chat', {
  method: 'POST',
  headers: { 'X-API-Key': 'lapi_live_••••', 'Content-Type': 'application/json' },
  body: JSON.stringify({ question: 'What does the contract say about termination?' }),
});
const { data } = await res.json();
// { answer: "...termination requires 30 days notice [1]...", sources: [{ ref: 1, chunk_id: "..." }] }

No credit card · Free tier forever · X-API-Key header auth

What's included in /rag

Upload and auto-processing

POST a text document and it's automatically chunked and embedded — no separate ingestion pipeline to build.

Pure semantic search

Query your documents and get back the most relevant chunks with similarity scores, no generation step required.

Cited chat answers

Ask a natural-language question and get a generated answer with numbered citations back to the source chunks.

Built on pgvector

Vectors live in Postgres via pgvector — no separate vector database to provision or pay for.

Per-user document isolation

Every document and query is scoped to your account — your data never mixes with another customer's.

Start using the RAG API today

Free tier — 500 calls/month, no credit card. Upgrade when you need more.

Get free API keyExplore /rag docs

Frequently asked questions

What plan is required?

Growth plan and above — /rag is the one namespace gated above Free, because every call has a real upstream embedding/generation cost.

Does it support PDF uploads?

Not yet — v1 supports plain text. PDF support is a planned addition.

What powers the embeddings and generation?

OpenAI's text-embedding-3-small for embeddings and GPT-4o mini for generation, with vectors stored in Supabase via pgvector.

Related API guides

Best Free API for Developers — 34 Namespaces, One Key, 500 Free Calls

Looking for the best free API? APlicious gives you 34 live namespaces — finance,

Read guide

Text Analysis API — Sentiment, Readability, Language Detection

Sentiment analysis, readability scoring, language detection, word counting, and

Read guide

Legal API for SaaS — Jurisdiction Data, Document Generators, Compliance

30 endpoints covering 22+ jurisdictions: business entity types, minimum wage, GD

Read guide

One key unlocks all 34 namespaces — weather, finance, fitness, astrology, and more.

View all plans and pricing →