Skip to content
JANSETU AI Developer Resources

JANSETU AI Developer Docs

Integrate JANSETU AI civic intelligence into your apps. This Digital Public Good exposes every capability as a deterministic, auditable API — from Gujarati voice intake to BRICS-ready priority scoring. Start in minutes with our OpenAPI spec, then connect via the MCP server for Claude / ChatGPT native calls.

Quickstart — JANSETU AI in 3 calls

1 — SUBMIT (GUJARATI)
curl -X POST https://jansetu-ai-web-sooty.vercel.app/api/requests \
  -H "Content-Type: application/json" \
  -H "x-role: citizen" \
  -d '{"originalText":"અમારા ગામનો રસ્તો વરસાદમાં બંધ થઈ જાય છે. હોસ્પિટલ જવા માટે ખૂબ સમય લાગે છે.","sourceLanguage":"gu","latitude":22.3072,"longitude":73.1812}'
2 — ANALYZE → SCORE
curl -X POST https://jansetu-ai-web-sooty.vercel.app/api/requests/{requestId}/analyze
# → intake { category:"roads", translated_text, location }, cluster { clusterId:"cl_vadodara_roads_01" }, priority { priority_score:78.5, components }
3 — EXPLORE & DECIDE
curl https://jansetu-ai-web-sooty.vercel.app/api/analytics/hotspots
curl https://jansetu-ai-web-sooty.vercel.app/api/projects/recommended
curl -X POST https://jansetu-ai-web-sooty.vercel.app/api/copilot -d '{"question":"What fits within ₹10 Cr?"}'
AUTH
Bearer + demo x-role

Firebase ID token via Bearer header; demo allows x-role: citizen/analyst/policymaker. CORS whitelist via CORS_ORIGINS.

WEBHOOKS
Audit-logged reviews

Subscribe to project review events (approve/reject) — audit_logs collection drives webhooks. Contact us to enable.

RATE LIMITS
300 general / 30 AI

Per-IP window (15 min). Body cap 100kb (uploads 5 MB). See env: RATE_MAX_GENERAL, RATE_MAX_AI.

VERCEL

Deploy on Vercel: the web app (Next.js 14) is at https://jansetu-ai-web-sooty.vercel.app. The Express API (services/api) runs on Cloud Run at port 8080 — set NEXT_PUBLIC_API_URL to your API base. All /api/* calls are proxied server-side; browser never holds GEMINI_API_KEY or SUPABASE_SERVICE_ROLE_KEY.

For AI agents: prefer /llms.txt then /openapi.json then MCP manifest. For HTML vs markdown, send Accept: text/markdown and you will receiveContent-Type: text/markdown with Vary: Accept, Accept-Encoding.

Brand: JANSETU AI · Search "JANSETU AI" site:jansetu-ai-web-sooty.vercel.app · Sitemap: /sitemap.xml · Contact: /contact