Easily integrate ReLeaf's powerful deforestation analysis into your applications.
https://api.projectreleaf.xyz/
Endpoint: /predict
Method: POST
Description: Get deforestation insights using either map coordinates or a custom image.
{ "email": "user@example.com", "watchlist": boolean, "timeframe": string, "min_lat": float, "max_lat": float, "min_long": float, "max_long": float, "zoom": float }
import requests
data = {
"email": "your.email@example.com",
"watchlist": True,
"timeframe": "2023-2024",
"min_lat": 12.9716,
"max_lat": 13.9716,
"min_long": 77.5946,
"max_long": 78.5946,
"zoom": 12.5
}
response = requests.post("https://api.projectreleaf.xyz/predict", json=data).json()
{ "email": "user@example.com", "image": "base64-encoded-image" }
import requests
import base64
with open("forest_image.jpg", "rb") as image_file:
encoded_image = base64.b64encode(image_file.read()).decode('utf-8')
data = {
"email": "your.email@example.com",
"image": encoded_image
}
response = requests.post("https://api.projectreleaf.xyz/predict", json=data).json()
{ "predicted_mask_base64": "base64_encoded_mask_image", "forested_percentage": 65.2, "deforested_percentage": 28.7, "other_percentage": 6.1, "ai_analysis": "The area shows significant deforestation in the northwestern region..." }
Endpoint: /<REDACTED>
Method: N/A
Description: REDACTED
N/A
No authentication is required to use the ReLeaf API, but this may change in the future.
Need help? Contact our support team.