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
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}'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 }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?"}'Firebase ID token via Bearer header; demo allows x-role: citizen/analyst/policymaker. CORS whitelist via CORS_ORIGINS.
Subscribe to project review events (approve/reject) — audit_logs collection drives webhooks. Contact us to enable.
Per-IP window (15 min). Body cap 100kb (uploads 5 MB). See env: RATE_MAX_GENERAL, RATE_MAX_AI.
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.