Skip to content

Quickstart

From zero to your first survival prediction in under two minutes.

Request access at canopitech.ai. You’ll receive a key that looks like:

cnpi_live_a8f2e9b1c4d7f0e3a6b9c2d5f8e1a4b7

All API requests require this key in the X-API-Key header.

Let’s predict survival for Douglas Fir planted by manual planting at a site on the western slopes of the Oregon Cascades.

Terminal window
curl -X POST https://api.canopitech.ai/v1/predict \
-H "X-API-Key: cnpi_live_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"latitude": 44.12,
"longitude": -122.03,
"species_code": "PSME",
"planting_method": "manual"
}'
import httpx
response = httpx.post(
"https://api.canopitech.ai/v1/predict",
headers={"X-API-Key": "cnpi_live_your_api_key_here"},
json={
"latitude": 44.12,
"longitude": -122.03,
"species_code": "PSME",
"planting_method": "manual"
}
)
prediction = response.json()
print(prediction)
const response = await fetch("https://api.canopitech.ai/v1/predict", {
method: "POST",
headers: {
"X-API-Key": "cnpi_live_your_api_key_here",
"Content-Type": "application/json",
},
body: JSON.stringify({
latitude: 44.12,
longitude: -122.03,
species_code: "PSME",
planting_method: "manual",
}),
});
const prediction = await response.json();
console.log(prediction);
{
"site": {
"latitude": 44.12,
"longitude": -122.03,
"matched_latitude": 44.1087,
"matched_longitude": -122.0451,
"match_distance_km": 1.82,
"region": "pnw"
},
"species_code": "PSME",
"species_common_name": "Douglas Fir",
"planting_method": "manual",
"predictions": [
{
"horizon_years": 1,
"survival_probability": 0.94,
"risk_factors": [
{"factor": "Vapor pressure deficit", "impact": "negative", "magnitude": 0.089},
{"factor": "Precipitation", "impact": "positive", "magnitude": 0.072},
{"factor": "Soil water capacity", "impact": "positive", "magnitude": 0.054}
]
},
{
"horizon_years": 3,
"survival_probability": 0.87,
"risk_factors": [...]
},
{
"horizon_years": 5,
"survival_probability": 0.81,
"risk_factors": [...]
}
],
"model": {
"version": "pnw_v0_2_mycel",
"codename": "mycel",
"series": "Mycelium"
},
"generated_at": "2026-06-25T14:30:00Z"
}

Here’s what you got back:

  • site — Your requested coordinates plus the nearest data point Canopi matched to. The match_distance_km tells you how close the match is.
  • predictions — Survival probability at 1, 3, and 5 years. This site shows strong first-year survival (0.94) with gradual decline typical of a good planting site.
  • risk_factors — The top environmental factors influencing survival at this site. Negative impacts reduce survival; positive impacts support it. Here, vapor pressure deficit (a measure of atmospheric dryness) is the primary risk.
  • model — Which model version generated this prediction.

Now try the same site with both methods compared:

Terminal window
curl -X POST https://api.canopitech.ai/v1/predict/compare \
-H "X-API-Key: cnpi_live_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"latitude": 44.12,
"longitude": -122.03,
"species_code": "PSME"
}'

The /compare endpoint returns predictions for both manual planting and drone seeding, plus a method_differential showing the survival gap at each horizon. This is the question nobody else answers.