Micro-Insurance Parametric Rainfall Trigger API with FastAPI and Open-Meteo
Smallholder farmers in tropical climate zones are acutely exposed to extreme rainfall deficits during El Niño events. Traditional indemnity insurance is administratively unviable for micro-policies under $50. Low-latency micro-insurance REST APIs are needed to continuously monitor open meteorological feeds and issue automatic mobile money payouts when rainfall falls below critical thresholds. In this challenge, you will construct a production-grade FastAPI microservice. The service will integrate asynchronous client queries to Open-Meteo and NOAA APIs, compute cumulative 30-day precipitation totals, evaluate parametric trigger policies, and return verified payout tokens. Your solution will feature OpenAPI endpoint definitions, asynchronous request pooling, unit test suites, and strict rate-limiting for high scale.
What you are building
The core problem, expected build, and operating context for this challenge.
Develop an asynchronous FastAPI microservice to monitor open weather APIs and trigger parametric micro-insurance payouts for smallholder farmers.
How work is evaluated
Evaluates REST API latency, trigger calculation accuracy, and HTTP error handling.
Challenge datasets
Public datasets, plus the private datasets you have access to.
How submissions are scored
These dimensions define what the evaluator checks and which criteria separate a passable run from a strong one.
api_response_status
Endpoint returns HTTP 200 OK for valid inputs
This dimension contributes its full weight only when the submission satisfies the requirement. Partial credit is not awarded.
endpoint_latency_ms
Response time for API call in milliseconds • target: 250 • range: 0-2000
This dimension contributes its full weight only when the submission satisfies the requirement. Partial credit is not awarded.
What you should walk away with
Build high-throughput REST APIs using FastAPI and Pydantic.
Implement asynchronous HTTP network requests using `httpx` or `aiohttp`.
Calculate 30-day rolling precipitation deficits against historical climatology.
Generate cryptographic payout validation signatures for automated mobile money integration.
Reference links and supporting material
Synthetic geo-location list of smallholder farms in Kenya alongside simulated daily precipitation series.
Challenge setup
Evaluates REST API latency, trigger calculation accuracy, and HTTP error handling.
Challenge input
HTTP POST JSON body with farmer_id, latitude, longitude, threshold_mm
FastAPI
Standard Python web framework for asynchronous microservices.
Evaluated output
JSON response with cumulative_rainfall_mm, triggered (bool), payout_token
- Endpoint returns HTTP 200 OK for valid inputs
- Response time for API call in milliseconds • target: 250 • range: 0-2000
- Benchmark: MicroInsuranceBench
- Endpoint Latency Ms target: 250
- 1 public reference case
- Python execution harness
- Python sandbox (unavailable on Versalist)
Summary shows the first task, up to three tools, and up to three evidence items. Open the technical recipe to view all configured items.
View technical recipe
Configured tools
- Modal · Optional
- RAI · Required
- Yi-34B · Optional
- Modal · Optional
Evaluation contract
- api_response_status · Weight 1
- endpoint_latency_ms · Weight 1
Metrics
- endpoint_latency_ms · Target 250
Benchmarks
- MicroInsuranceBench
- security
Reference cases
- 1 public reference case
Workflow tasks
- Task 1
Input: HTTP POST JSON body with farmer_id, latitude, longitude, threshold_mm
Output: JSON response with cumulative_rainfall_mm, triggered (bool), payout_token
Execution harness: Python
Evaluation tools
- FastAPI · Web Framework
Recipe freeze marker
No recipe freeze time is recorded.