{
  "openapi": "3.0.3",
  "info": {
    "title": "UrbanChronoSphere LULC & Spatiotemporal Satellite API",
    "description": "Sovereign, open-access API for 43-year land use land cover (LULC) analysis, Ridd V-I-S sub-pixel unmixing, and Viksit Bharat 2047 CA-Markov projections across India.",
    "version": "3.1.0",
    "contact": {
      "name": "Chanakya Spatial Intelligence Lab (CSIL)",
      "url": "https://www.urbanchronosphere.in",
      "email": "contact@urbanchronosphere.in"
    },
    "license": {
      "name": "CC BY-NC 4.0",
      "url": "https://creativecommons.org/licenses/by-nc/4.0/"
    }
  },
  "servers": [
    {
      "url": "https://www.urbanchronosphere.in/api",
      "description": "Production Serverless API"
    }
  ],
  "paths": {
    "/lulc/classify": {
      "post": {
        "summary": "Classify LULC surface reflectance for a geographical bounding box",
        "description": "Computes certified physical remote sensing indices (NDBI, NDVI), Ridd V-I-S sub-pixel unmixing, and NASA HLS cross-sensor transformations.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "bbox": {
                    "type": "array",
                    "items": { "type": "number" },
                    "description": "[minLng, minLat, maxLng, maxLat]",
                    "example": [77.5, 12.9, 77.7, 13.1]
                  },
                  "year": {
                    "type": "integer",
                    "minimum": 1984,
                    "maximum": 2047,
                    "example": 2024
                  },
                  "lulc_scheme": {
                    "type": "string",
                    "enum": ["5-class", "9-class", "13-class"],
                    "default": "5-class"
                  },
                  "area_ha": {
                    "type": "number",
                    "example": 2400
                  }
                },
                "required": ["bbox", "year"]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Certified LULC percentage breakdown and statistics"
          },
          "429": {
            "description": "Rate limit exceeded (Max 60 requests/minute)"
          }
        }
      }
    },
    "/lulc/simulate": {
      "post": {
        "summary": "Simulate future urban growth using coupled CA-Markov models",
        "description": "Projects land conversion and impervious expansion for 2030, 2035, and Viksit Bharat 2047.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "bbox": {
                    "type": "array",
                    "items": { "type": "number" },
                    "example": [77.5, 12.9, 77.7, 13.1]
                  },
                  "horizon_year": {
                    "type": "integer",
                    "enum": [2030, 2035, 2047],
                    "default": 2047
                  },
                  "base_year": {
                    "type": "integer",
                    "default": 2024
                  }
                },
                "required": ["bbox"]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Simulated future LULC composition"
          },
          "429": {
            "description": "Rate limit exceeded (Max 20 requests/minute)"
          }
        }
      }
    }
  }
}
