Skip to main content
GET
/
api
/
v1
/
farms
/
{id}
/
yield-prediction
curl 'https://www.wiseyield.co/api/v1/farms/11111111.../yield-prediction?cropType=wheat&plantedArea=50&season=winter' \
  -H "Authorization: Bearer $WISEYIELD_API_KEY"
{
  "data": {
    "predictedYield": 123,
    "confidenceIntervals": {
      "p5": 123,
      "p50": 123,
      "p95": 123
    },
    "trainingSampleSize": 123,
    "modelConfidence": "<string>",
    "trustBadge": "<string>"
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.wiseyield.co/llms.txt

Use this file to discover all available pages before exploring further.

GET https://www.wiseyield.co/api/v1/farms/{id}/yield-prediction
Predicts the expected yield for a planned crop using a regression model trained on the farm’s historical harvested + failed crops (last 50). Returns the predicted yield in tons along with p5/p50/p95 confidence intervals and the historical sample size used.

Authentication

Requires a key with the analytics:read scope.

Path parameters

id
string
required
Farm UUID.

Query parameters

cropType
string
required
Crop name (e.g. wheat, date palm).
plantedArea
number
required
Positive number in the farm’s areaUnit.
variety
string
Optional variety name (improves prediction accuracy when historical data exists for the same variety).
season
string
default:"year_round"
winter, summer, autumn, spring, year_round.
fieldId
string
Optional field UUID. When provided, the model uses the field’s soil characteristics (overrides farm-level defaults).

Response

data
object
curl 'https://www.wiseyield.co/api/v1/farms/11111111.../yield-prediction?cropType=wheat&plantedArea=50&season=winter' \
  -H "Authorization: Bearer $WISEYIELD_API_KEY"

Errors

StatusWhen
400 VALIDATION_ERRORMissing cropType or plantedArea, or plantedArea not positive
400 INVALID_ID{id} or fieldId is not a valid UUID
401Missing, malformed, expired, or revoked API key
403 INSUFFICIENT_SCOPEKey lacks analytics:read scope
404 NOT_FOUNDFarm doesn’t exist or belongs to another user
429 RATE_LIMIT_EXCEEDEDPer-user rate limit reached
5xxServer error

Notes

  • The model needs at least 3 historical harvested/failed crops of the same cropType for data-driven accuracy. Fewer historical crops drops the trustBadge to data-assisted or ai-generated.
  • See Trust badges for the integrity contract.