API Documentation
Integrate roofing claim predictions into your application with a single API call. This guide covers authentication, request/response formats, and usage limits.
#Authentication
All API requests require a valid API key sent in the Authorization header using the Bearer scheme.
Authorization: Bearer tp_your_api_key_hereHow to get your API key: Sign in to your dashboard, navigate to Settings → API Keys, and generate a new key. Keys are prefixed with tp_ and can be revoked at any time.
#Endpoint
/api/v1/predictSubmit claim details and receive an instant prediction with confidence scoring and risk analysis.
#Request Body
Send a JSON object with the following fields. All fields are required.
| Field | Type | Description |
|---|---|---|
carrier | string | Insurance carrier name (e.g. "Erie", "State Farm", "USAA") |
state | string | Two-letter state code (e.g. "PA", "VA") |
zip | string | 5-digit ZIP code (e.g. "17011") |
material | string | "Architectural", "3 tab", "Metal", "Slate", etc. |
pitch | string | Roof pitch: "Flat-2", "3-4", "5-7", "8-10", "11-13", "14+" |
roofAge | string | "0-5 Years", "6-10 Years", "11-15 Years", "16-20 Years", "Over 30 Years" |
roofSize | string | "0-15 Squares", "16-20 Squares", "21-25 Squares", "25+ Squares" |
stories | string | Stories above ground: "1", "1.5", "2", "2.5", "3+" |
deductible | number | Policy deductible in USD (e.g. 1500) |
lossDate | string | Date of loss event (YYYY-MM-DD) |
description | string | Description of damage (e.g. "Hail and wind damage to roof and siding") |
publicAdjuster | string | Public adjuster name or "Unknown" |
salesRep | string | Sales representative name or "Unknown" |
teamLead | string | Team lead name or "Unknown" |
{
"carrier": "Erie",
"state": "PA",
"zip": "17011",
"material": "Architectural",
"pitch": "5-7",
"roofAge": "11-15 Years",
"roofSize": "16-20 Squares",
"stories": "2",
"deductible": 1500,
"lossDate": "2025-06-15",
"description": "Hail and wind damage to roof and siding",
"publicAdjuster": "Unknown",
"salesRep": "Unknown",
"teamLead": "Unknown"
}#Response
A successful prediction returns a JSON object with the prediction result, confidence score, and contributing factors.
{
"prediction": "Approved",
"confidence": 0.8742,
"confidenceTier": "high",
"rareCarrier": false
}| Field | Type | Description |
|---|---|---|
prediction | string | "Approved" or "Denied" |
confidence | number | Confidence score between 0 and 1 |
confidenceTier | string | "high", "moderate", or "insufficient_data" |
rareCarrier | boolean | Whether the carrier has limited training data |
#Confidence Tiers
Every prediction includes a confidence tier based on the model's certainty. Use these tiers to decide how much weight to give each prediction.
High
0.75 - 1.00
91% accuracy. Reliable for decision-making.
Moderate
0.60 - 0.74
72% accuracy. Consider additional review.
Insufficient Data
0.50 - 0.59
Low confidence. Manual review recommended.
#Code Examples
cURL
curl -X POST https://api.turbopredict.com/api/v1/predict \
-H "Authorization: Bearer tp_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"carrier": "Erie",
"state": "PA",
"zip": "17011",
"material": "Architectural",
"pitch": "5-7",
"roofAge": "11-15 Years",
"roofSize": "16-20 Squares",
"stories": "2",
"deductible": 1500,
"lossDate": "2025-06-15",
"description": "Hail and wind damage to roof and siding",
"publicAdjuster": "Unknown",
"salesRep": "Unknown",
"teamLead": "Unknown"
}'Python
import requests
response = requests.post(
"https://api.turbopredict.com/api/v1/predict",
headers={
"Authorization": "Bearer tp_your_api_key_here",
"Content-Type": "application/json",
},
json={
"carrier": "Erie",
"state": "PA",
"zip": "17011",
"material": "Architectural",
"pitch": "5-7",
"roofAge": "11-15 Years",
"roofSize": "16-20 Squares",
"stories": "2",
"deductible": 1500,
"lossDate": "2025-06-15",
"description": "Hail and wind damage to roof and siding",
"publicAdjuster": "Unknown",
"salesRep": "Unknown",
"teamLead": "Unknown",
},
)
data = response.json()
print(f"Prediction: {data['prediction']} ({data['confidenceTier']} confidence)")JavaScript / TypeScript
const response = await fetch("https://api.turbopredict.com/api/v1/predict", {
method: "POST",
headers: {
"Authorization": "Bearer tp_your_api_key_here",
"Content-Type": "application/json",
},
body: JSON.stringify({
carrier: "Erie",
state: "PA",
zip: "17011",
material: "Architectural",
pitch: "5-7",
roofAge: "11-15 Years",
roofSize: "16-20 Squares",
stories: "2",
deductible: 1500,
lossDate: "2025-06-15",
description: "Hail and wind damage to roof and siding",
publicAdjuster: "Unknown",
salesRep: "Unknown",
teamLead: "Unknown",
}),
});
const data = await response.json();
console.log(`Prediction: ${data.prediction} (${data.confidenceTier} confidence)`);#Pricing
Each prediction is priced based on the confidence tier of the result. Abstained predictions are always free.
| Confidence Tier | Cost |
|---|---|
| High | $60 |
| Moderate | $40 |
| Low | $20 |
| Abstained | $0 |
Error Responses
- 401 — Missing or invalid API key. Ensure your
Authorizationheader is set toBearer tp_xxx. - 403 — API key has been deactivated. Generate a new key from your API Keys page.
- 404 — User profile not found. Contact support@turbopredict.com.
- 502 — Prediction engine error or unreachable. Try again shortly.
- 504 — Prediction engine timed out. Try again later.
Need help? Sign in to get started or reach out to support.