Quickstart
Get your first result in under 60 seconds. No credit card. No OAuth flow.
Step 1 — Get a free API key
curl -X POST "https://vlsiddarth-knowledge-universe.hf.space/v1/signup?email=you@company.com"
{
"status": "created",
"api_key": "ku_test_abc123...",
"tier": "free",
"calls_limit": 500,
"message": "Save your API key — it won't be shown again."
}
Your API key is shown exactly once. It is not stored in plain text. If lost, sign up again with a different email.
Step 2 — Discover sources
curl -X POST https://vlsiddarth-knowledge-universe.hf.space/v1/discover \
-H "X-API-Key: ku_test_abc123..." \
-H "Content-Type: application/json" \
-d '{"topic":"transformer architecture","difficulty":3,"formats":["pdf","github"]}'
Step 3 — Read the decay scores
{
"decay_scores": {
"arxiv:2302.14017v1": {
"decay_score": 0.504,
"freshness": 0.496,
"label": "stale",
"age_days": 1107
}
},
"coverage_intelligence": {
"confidence": 0.71,
"confidence_label": "high",
"coverage_warning": false,
"suggested_queries": []
}
}
Authentication
Pass your API key in the X-API-Key header on every authenticated call.
curl https://vlsiddarth-knowledge-universe.hf.space/v1/usage \
-H "X-API-Key: ku_test_abc123..."
import requests
resp = requests.post(
"https://vlsiddarth-knowledge-universe.hf.space/v1/discover",
headers={"X-API-Key": "ku_test_abc123..."},
json={"topic": "RAG retrieval", "difficulty": 3},
)
data = resp.json()
Key Formats
| Prefix | Tier | Monthly limit |
|---|---|---|
ku_test_ | Free | 500 calls |
ku_live_ | Starter / Growth / Pro | 5k – unlimited |
Keys do not expire on a time basis. Usage resets on the 1st of every month UTC.
Error Codes
| HTTP | Error code | Meaning | Fix |
|---|---|---|---|
401 | MISSING_API_KEY | No key in header | Add X-API-Key header |
401 | INVALID_API_KEY | Key not found | Check for typos; re-signup if lost |
409 | EMAIL_EXISTS | Already registered | Use a different email |
422 | Validation error | Bad request body | Check required fields |
429 | QUOTA_EXCEEDED | Monthly limit hit | Upgrade or wait for reset |
500 | INTERNAL_ERROR | Server fault | Retry; open a GitHub issue if persists |
POST /v1/signup
Create a free account and receive your API key. No authentication required.
Query parameters
| Param | Type | Required | Description |
|---|---|---|---|
email | string | required | Your email address. Used as unique account identifier. |
tier | string | optional | Default: free. |
curl -X POST "https://vlsiddarth-knowledge-universe.hf.space/v1/signup?email=you@company.com"
POST /v1/discover
The core endpoint. Queries 13 platforms in parallel, scores quality and pedagogical fit, attaches a decay score and coverage confidence to every response.
Request body
| Field | Type | Description | |
|---|---|---|---|
topic | string | required | Search query. 2–200 characters. |
difficulty | int 1–5 | required | 1 = beginner, 5 = research-level. |
formats | string[] | optional | Filter by format. Default: ["pdf","video","github","jupyter"] |
max_results | int 1–50 | optional | Default: 10 |
output | string | optional | json | embeddings | html |
curl -X POST https://vlsiddarth-knowledge-universe.hf.space/v1/discover\
-H "X-API-Key: ku_test_..." \
-H "Content-Type: application/json" \
-d '{
"topic": "transformer architecture",
"difficulty": 3,
"formats": ["pdf","github","stackoverflow"],
"max_results": 10
}'
import requests
resp = requests.post(
"https://vlsiddarth-knowledge-universe.hf.space/v1/discover",
headers={"X-API-Key": "ku_test_..."},
json={
"topic": "transformer architecture",
"difficulty": 3,
"formats": ["pdf", "github"],
},
).json()
# Decay scores
for sid, d in resp["decay_scores"].items():
print(f"{d['label']:8} score={d['decay_score']} {sid}")
# Coverage confidence
cov = resp["coverage_intelligence"]
if cov["coverage_warning"]:
print("Low confidence. Try:", cov["suggested_queries"])
Cold queries: ~4 seconds (13 crawlers in parallel). Cache hits: ~14ms. TTL: 4 hours. Same query from any user hits cache immediately.
POST /v1/knowledge
Enterprise endpoint. Returns KnowledgeObjects with freshness scores pre-attached — designed for direct RAG pipeline ingestion.
Same request body as /v1/discover. Set "output": "embeddings" for 384-dim vectors ready for Qdrant, Weaviate, ChromaDB, Pinecone.
curl -X POST https://vlsiddarth-knowledge-universe.hf.space/v1/knowledge \
-H "X-API-Key: ku_test_..." \
-H "Content-Type: application/json" \
-d '{"topic":"RAG retrieval","difficulty":3,"output":"embeddings"}'
GET /v1/usage
Check your current month usage and remaining quota.
curl https://vlsiddarth-knowledge-universe.hf.space/v1/usage \
-H "X-API-Key: ku_test_..."
{
"tier": "free",
"calls_used": 4,
"calls_limit": 500,
"calls_remaining": 496,
"reset": "1st of next month"
}
GET /v1/formats
Returns all 54 supported format values. No auth required.
curl https://vlsiddarth-knowledge-universe.hf.space/v1/formats
GET /v1/crawlers
Lists all registered crawlers and their status. No auth required.
curl https://vlsiddarth-knowledge-universe.hf.space/v1/crawlers
GET /health
Liveness check. Returns Redis status. No auth. Use for uptime monitoring.
{ "status": "healthy", "version": "1.0.0", "redis": "connected" }
Decay Engine
Every source gets a knowledge decay score — how much its relevance has drifted since publication. This is the core IP of Knowledge Universe.
decay = 1 - 0.5 ^ (age_days / half_life_days)
freshness = 1 - decay
Half-life by platform
| Platform | Half-life | Reasoning |
|---|---|---|
| HuggingFace | 120 days | ML moves extremely fast |
| GitHub | 180 days | Code goes stale as dependencies update |
| YouTube | 270 days | Tutorials date quickly |
| Stack Overflow | 365 days | Answers age with library versions |
| Kaggle | 365 days | Notebooks tied to competition contexts |
| arXiv | 1,095 days | Research papers age slowly |
| MIT OCW | 1,095 days | Course material revised on academic cycles |
| Wikipedia | 1,460 days | Actively maintained |
| Open Library | 1,825 days | Books revised infrequently |
Decay labels
LLMs and vector stores have no concept of source age. A 2019 Stack Overflow answer and a 2025 answer rank identically in cosine similarity. The decay score lets your pipeline filter or warn before stale knowledge reaches a response.
Coverage Confidence Score
KU is the only retrieval API that tells you when it didn't find exactly what you were looking for. Every /v1/discover response includes a coverage_intelligence field.
"coverage_intelligence": {
"confidence": 0.36, // cosine similarity: query vs top results
"confidence_label": "low", // "high" | "medium" | "low" | "none"
"coverage_warning": true,
"warning_message": "Low confidence (0.36) — results may not fully match intent.",
"suggested_queries": [
"attention mechanism self-attention explained",
"transformer encoder decoder tutorial",
"attention is all you need paper explained"
],
"top_result_similarities": [
{ "title": "A Survey of Graph Transformers...", "similarity": 0.377 }
]
}
| Label | Confidence range | Meaning |
|---|---|---|
high | ≥ 0.65 | Results well match your query intent |
medium | 0.45 – 0.65 | Partial match — consider refining |
low | < 0.45 | Significant mismatch — try suggested queries |
none | 0.0 | No results returned |
Source Formats
Pass any combination in the formats array.
| Group | Format values |
|---|---|
| Textual | pdf markdown html epub latex |
| Video | video video_playlist transcript |
| Audio | audio podcast |
| Interactive | jupyter colab sandbox |
| Code / Platform | github kaggle stackoverflow dataset |
| Assessment | flashcards problem_set lab exam |
Platforms
Free = no key needed. Keyed = bring your own API key.
Output Formats
| Value | Returns | Use case |
|---|---|---|
json | Default JSON response | General use, dashboards |
embeddings | JSON + 384-dim vectors per source | Direct vector store ingestion |
html | Formatted HTML cards | Browser rendering, reports |
All Endpoints
Rate Limits
Limits are per calendar month, not per minute.
| Plan | Price | Monthly calls |
|---|---|---|
| Free | $0 | 500 |
| Starter | $29/mo | 5,000 |
| Growth | $79/mo | 20,000 |
| Pro | $199/mo | 75,000 |
| Enterprise | Custom | Unlimited |
Changelog
| Version | Date | Changes |
|---|---|---|
v1.1.0 | Mar 2026 | Coverage Confidence Score. Per-crawler timeouts. Cold latency 25s → 4s. 5/5 gap analysis passing. |
v1.0.0 | Mar 2026 | Initial release. Auth, decay engine, 13 crawlers, /v1/discover, /v1/knowledge, difficulty ceiling. |