🌾 FarmRisk AI Backend

Checking status...

Agrometeorological Risk Engine & RAG Advisory Service for Indian Agriculture

📘 Swagger UI

Interactive API testing sandbox and schema documentation.

📕 ReDoc

Clean, structured API reference documentation.

📋 OpenAPI JSON

Raw OpenAPI 3.1 specification schema definition.

💓 Health Probe

Direct JSON uptime and environment health check.

⚙️ Backend Configuration
Primary LLM
Gemini (3.1 Flash-Lite)
Fallback LLM
Groq (Llama-3.3-70B)
Embeddings
multilingual-e5-small
Vector Store
Supabase pgvector
Indexed Manuals
ICAR, TNAU, PAU, JAU
Supported Languages
EN, HI, GU, PA, TA, TE, MR
🔌 Available API Endpoints
POST /api/advisory/pre-sowing
Generates 7 Markdown sections for pre-sowing crop calendar in native target language
POST /api/advisory/what-to-do
Top 4 daily action recommendations (Weather alerts, Pest management, Irrigation)
POST /api/advisory/pest-card
Crop-specific Pest & Disease risk index card with RAG grounding
POST /api/advisory/overview
3-bullet executive weather & crop risk summary
POST /api/advisory/weather-summary
5-day agro-meteorological forecast interpretation
POST /api/advisory
Full comprehensive multi-component advisory payload
GET /api/location/search
Search Indian villages, sub-districts, and districts
GET /health
System uptime and status probe
💻 Example cURL: Pre-Sowing Advisory
curl -X POST "http://127.0.0.1:8000/api/advisory/pre-sowing" \
  -H "Content-Type: application/json" \
  -d '{
    "crop": "Cotton",
    "state": "Gujarat",
    "soil_type": "black cotton soil",
    "season": "Kharif",
    "irrigation_type": "flood",
    "language": "en"
  }'