Add AI-powered curriculum search, summaries, question generation, and more to any app — in minutes.
All API calls require an API key in the X-API-Key header. Get one from your dashboard.
Python
import requests
API_KEY = "sk_xxxx_your_key_here"
BASE = "https://examozhi.com/api/v1"
headers = {"X-API-Key": API_KEY}
# RAG search
resp = requests.post(f"{BASE}/ai/rag-search", headers=headers, json={
"query": "Explain Newton's second law",
"top_k": 5,
"include_answer": True,
})
data = resp.json()
print(data["answer"])
print(data["sources"])JavaScript / TypeScript
const API_KEY = "sk_xxxx_your_key_here";
const BASE = "https://examozhi.com/api/v1";
async function ragSearch(query) {
const res = await fetch(`${BASE}/ai/rag-search`, {
method: "POST",
headers: {
"Content-Type": "application/json",
"X-API-Key": API_KEY,
},
body: JSON.stringify({ query, top_k: 5, include_answer: true }),
});
const data = await res.json();
console.log(data.answer);
return data;
}
ragSearch("What is photosynthesis?");Go
package main
import (
"bytes"
"encoding/json"
"fmt"
"net/http"
)
const (
apiKey = "sk_xxxx_your_key_here"
base = "https://examozhi.com/api/v1"
)
func ragSearch(query string) {
body, _ := json.Marshal(map[string]any{
"query": query,
"top_k": 5,
"include_answer": true,
})
req, _ := http.NewRequest("POST", base+"/ai/rag-search", bytes.NewReader(body))
req.Header.Set("Content-Type", "application/json")
req.Header.Set("X-API-Key", apiKey)
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
var result map[string]any
json.NewDecoder(resp.Body).Decode(&result)
fmt.Println(result["answer"])
}cURL
curl -X POST https://examozhi.com/api/v1/ai/rag-search \
-H "Content-Type: application/json" \
-H "X-API-Key: sk_xxxx_your_key_here" \
-d '{
"query": "Explain the water cycle",
"top_k": 5,
"include_answer": true
}'Examozhi supports two auth methods:
API Key (recommended for backends)
Pass your key in the X-API-Key header. Keys can be scoped and rotated from your dashboard.
X-API-Key: sk_xxxx_...JWT Bearer (for frontends)
Log in via POST /auth/login to get an access token, then pass it as a Bearer token.
Authorization: Bearer eyJhbGci...Working with content IDs. You never have to guess a UUID. Start with /ai/rag-search or /content/search — every result includes a content_id (and a source pointer). Feed that ID into /ai/summary or /content/items/{id}. In the Playground, each result has a one-click Copy ID button.
/ai/rag-searchSemantic search over the knowledge base with optional AI-generated answer.
{ "query": "string", "class_id?": "uuid", "subject_id?": "uuid", "edition?": "2024", "include_all_editions?": false, "top_k?": 5, "include_answer?": true }/ai/summarySummarize a chapter, content item, or arbitrary text. Pass text directly, or a content_id obtained from a /content/search or /ai/rag-search result.
{ "content_id?": "uuid", "chapter_id?": "uuid", "text?": "string", "max_length?": 300 }/ai/explainGet a beginner-friendly explanation of any topic.
{ "topic": "string", "difficulty_level?": 1-5, "style?": "simple|detailed" }/ai/questionsAuto-generate quiz questions from a topic or content item.
{ "topic?": "string", "content_id?": "uuid", "question_type?": "mcq|short|long", "count?": 5 }/content/classesList all available classes (e.g., Class 8, Class 10 CBSE).
/content/subjects?class_id=List subjects for a class. Add ¤t_only=true for live editions only, or &edition=2024 to pin a revision.
/content/chapters?subject_id=List chapters under a subject.
/content/searchFull-text search through all content items.
{ "query": "string", "class_id?": "uuid", "edition?": "2024", "current_only?": false, "page?": 1 }/content/enumerateComplete, canonically-ordered enumeration over typed content — "list all poems", "all poem authors", "the first poem", "formulas in Chapter 3", "list all chapters/topics". No top-k cap; paginated. Derive intent from intent_query (language-agnostic), or pass subtype/attribute/ordinal explicitly.
{ "intent_query?": "string", "subtype?": "poem|formula|question|chapter|topic", "attribute?": "author", "class_id?": "uuid", "subject_id?": "uuid", "chapter_id?": "uuid", "language?": "ta", "edition?": "2024", "current_only?": true, "page?": 1, "page_size?": 100 }Textbooks are revised on multi-year cycles, and old and new editions often run side by side in classrooms. On Examozhi a subject is a textbook, and multiple editions of the same subject coexist — each with its own chapters, topics, and embeddings. One edition is flagged as current.
edition (e.g. "2024") on /ai/rag-search or /content/search to retrieve a specific revision — useful for students still on the older book.include_all_editions: true (RAG) or current_only: false (text search) to span every edition at once.GET /content/subjects?class_id=… returns each subject's edition, is_current, and effective_from so you can offer an edition switcher in your own UI.# Serve the current edition (default)
POST /ai/rag-search { "query": "laws of motion", "class_id": "…" }
# Pin the 2018 revision for a class still using the old book
POST /ai/rag-search { "query": "laws of motion", "class_id": "…", "edition": "2018" }Search in one script, retrieve in another. Romanized and code-mixed Indic queries — Tanglish and Hinglish likevanakkam orkabaddi — match native-script curriculum content, on top of the same hybrid (dense + sparse) retrieval that powers /ai/rag-search.
What you can do
language / response_language.No integration changes
/ai/rag-search contract — no new request fields required.Try it from the Playground — set a target language and enter a romanized query to see cross-lingual retrieval in action.
Some questions are set or ordinal operations, not similarity lookups — “list all the poems”, “show all poem authors”, “summarize the first poem”, “every formula in Chapter 3”. Semantic search answers these with a truncated top-k sample./content/enumerate answers them with the complete, canonically-ordered set (by chapter then position), paginated, with no top-k cap — so an AI agent or your UI gets the whole list, in order, every time.
Derive intent automatically
Pass a natural-language intent_query — the router detects enumeration / ordinal / attribute intent across all 10 supported languages (English, Tamil, Hindi, Telugu, Kannada, Malayalam, Bengali, Gujarati, Marathi, Urdu).
…or specify it explicitly
Set subtype (poem · formula · question · chapter · topic), attribute (e.g. author for the distinct, deduped set), or ordinal(1 = first, -1 = last). Scope with class/subject/chapter/edition/language.
Request & response
# "List all poems in the Tamil textbook" — complete, ordered set
curl -X POST https://examozhi.com/api/v1/content/enumerate \
-H "Content-Type: application/json" \
-H "X-API-Key: sk_xxxx_your_key" \
-d '{ "intent_query": "list all poems", "subject_id": "…", "language": "ta" }'
# → {
# "items": [ { "content_id": "…", "title": "…", "subtype": "poem",
# "attributes": { "author": "…" }, "chapter_title": "…",
# "page_number": 12, "source_ref": "…" }, … ],
# "total": 20, "mode": "set", "page": 1, "page_size": 100
# }mode): set (full list), attribute (distinct values, e.g. authors), ordinal (the Nth / first / last item), chapters, topics.total is the full match count; page through large sets with page / page_size.edition / current_only exactly like search.Fail-safe by design. Enumeration runs over typed content metadata, populated automatically as content is ingested. When intent is ambiguous or the matched content isn't typed yet, the surface degrades to standard semantic search— never a wrong “none” answer. Through the agent gateway, theenumerate_curriculum tool returns these complete sets directly, while ordinary semantic questions andrag_answer stay unchanged.
The endpoint requires the same Content API entitlement as/content/search (included on every plan with core content access) and is subject to your plan's rate and monthly-quota limits below.
| Plan | Requests / min | Monthly limit | API Keys |
|---|---|---|---|
| Free | 30 | 1,000 | 2 |
| Pro | 300 | 50,000 | 10 |
| Enterprise | 3,000 | 500,000 | 100 |
Rate limit headers are returned on every response: X-RateLimit-Remaining-Minute and X-Monthly-Quota-Remaining.
Examozhi ships a native MCP server and a curated agent tool gateway on Pro and Enterprise plans — so AI agents (Claude, Cursor, Pydantic AI, Strands, LangGraph, or your own) can discover and call curriculum tools natively.
Native MCP (streamable HTTP)
Point any MCP client at the endpoint below, authenticated with your API key.
POST https://examozhi.com/api/v1/mcpREST tool gateway
Prefer plain HTTP? Discover tools and invoke them directly.
GET https://examozhi.com/api/v1/agent/manifestConnect an MCP client (initialize + list tools)
# 1) Handshake
curl -X POST https://examozhi.com/api/v1/mcp \
-H "X-API-Key: sk_xxxx_your_key" -H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{}}'
# 2) Discover tools
curl -X POST https://examozhi.com/api/v1/mcp \
-H "X-API-Key: sk_xxxx_your_key" -H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":2,"method":"tools/list"}'
# 3) Call a tool
curl -X POST https://examozhi.com/api/v1/mcp \
-H "X-API-Key: sk_xxxx_your_key" -H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":3,"method":"tools/call",
"params":{"name":"rag_answer","arguments":{"query":"Explain photosynthesis"}}}'Available tools
search_curriculumSemantic search across curriculum content
enumerate_curriculumComplete ordered sets — list all poems, authors, first/last, formulas in a chapter
rag_answerGrounded, cited answer to a question
explain_conceptExplain a concept at a chosen difficulty/style
generate_questionsGenerate practice questions
list_curriculum_treeList available classes for grounding
| Status | Meaning | Action |
|---|---|---|
| 401 | Invalid or missing API key | Check your X-API-Key header |
| 403 | Insufficient plan | Upgrade your subscription |
| 429 | Rate limit exceeded | Back off and retry; check X-RateLimit-Remaining-Minute |
| 422 | Validation error | Check request body — see detail field |
| 500 | Server error | Retry with exponential backoff; contact support if persistent |
Create your free account and get an API key in under 60 seconds.