Commercial Real Estate (CRE) Loans (/api/v1/cre-loans)
Endpoints specific to Commercial Real Estate loan applications. These differ from standard consumer loans by relying on metrics like NOI (Net Operating Income), Cap Rates, and DSCR (Debt Service Coverage Ratio).
1. Predict CRE Loan Risk (JSON)
Run a risk assessment tailored to Commercial Real Estate properties based on a JSON data payload.
- Method:
POST - Endpoint:
/api/v1/cre-loans/predict/:propertyType - Authentication: Required (
API Key) - Headers:
X-API-Key: <your_api_key>Content-Type: application/json
- Path Param:
propertyType(e.g.,OFFICE,RETAIL,MULTIFAMILY,INDUSTRIAL)
Request Body
| Parameter | Type | Description |
|---|---|---|
PROP_VAL | Number | Property Value. |
NOI | Number | Net Operating Income. |
OBAL | Number | Outstanding Balance. |
ORIG_AMT | Number | Origination Amount. |
RATE | Number | Interest Rate. |
TTA | Number | Time to Amortization. |
AMORT_M | Number | Amortization period. |
GRNTR | String | Guarantor name. |
MAT_DEF | Number | Maturity Default indicator. |
PD_IND | Number | Probability of Default Indicator. |
DPVA_PV | Number | DPVA Present Value. |
DPVA_LTV | Number | DPVA Loan to Value. |
- JSON Schema
- cURL
- Python
- JavaScript
{
"PROP_VAL": 1000000,
"NOI": 150000,
"OBAL": 750000,
"ORIG_AMT": 800000,
"RATE": 4.5,
"TTA": 12,
"AMORT_M": 360,
"GRNTR": "John Doe",
"MAT_DEF": 0,
"PD_IND": 0,
"DPVA_PV": 1000000,
"DPVA_LTV": 75.0
}
curl -X POST https://api.riskinmind.ai/api/v1/cre-loans/predict/OFFICE \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"PROP_VAL": 1000000,
"NOI": 150000,
"OBAL": 750000,
"ORIG_AMT": 800000,
"RATE": 4.5,
"TTA": 12,
"AMORT_M": 360,
"GRNTR": "John Doe",
"MAT_DEF": 0,
"PD_IND": 0,
"DPVA_PV": 1000000,
"DPVA_LTV": 75.0
}'
import requests
url = "https://api.riskinmind.ai/api/v1/cre-loans/predict/OFFICE"
headers = {
"X-API-Key": "YOUR_API_KEY",
"Content-Type": "application/json"
}
data = {
"PROP_VAL": 1000000,
"NOI": 150000,
"OBAL": 750000,
"ORIG_AMT": 800000,
"RATE": 4.5,
"TTA": 12,
"AMORT_M": 360,
"GRNTR": "John Doe",
"MAT_DEF": 0,
"PD_IND": 0,
"DPVA_PV": 1000000,
"DPVA_LTV": 75.0
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
const response = await fetch('https://api.riskinmind.ai/api/v1/cre-loans/predict/OFFICE', {
method: 'POST',
headers: {
'X-API-Key': 'YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
PROP_VAL: 1000000,
NOI: 150000,
OBAL: 750000,
ORIG_AMT: 800000,
RATE: 4.5,
TTA: 12,
AMORT_M: 360,
GRNTR: "John Doe",
MAT_DEF: 0,
PD_IND: 0,
DPVA_PV: 1000000,
DPVA_LTV: 75.0
})
});
const data = await response.json();
console.log(data);
Response
- Content-Type:
application/json
{
"probability": 0.05,
"risk": "Low",
"threshold_used": 0.15
}
| Field | Type | Description |
|---|---|---|
probability | Number | The calculated probability of default. |
risk | String | Categorized risk level (e.g., Low, High). |
threshold_used | Number | Threshold used to classify risk. |
2. Generate CRE Risk Report (PDF)
Submit the CRE financial data as JSON to generate a risk prediction and immediately download a structured PDF report containing the prediction and summary details.
- Method:
POST - Endpoint:
/api/v1/cre-loans/predict/pdf/:propertyType - Authentication: Required (
API Key) - Headers:
X-API-Key: <your_api_key>Content-Type: application/json
- Path Param:
propertyType(e.g.,OFFICE,RETAIL,MULTIFAMILY,INDUSTRIAL)
Request Body
Same JSON payload structure as the Predict CRE Loan Risk endpoint (PROP_VAL, NOI, OBAL, etc.).
- cURL
- Python
- JavaScript
curl -X POST https://api.riskinmind.ai/api/v1/cre-loans/predict/pdf/OFFICE \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"PROP_VAL": 1000000,
"NOI": 150000,
"OBAL": 750000,
"ORIG_AMT": 800000,
"RATE": 4.5,
"TTA": 12,
"AMORT_M": 360,
"GRNTR": "John Doe",
"MAT_DEF": 0,
"PD_IND": 0,
"DPVA_PV": 1000000,
"DPVA_LTV": 75.0
}' --output report.pdf
import requests
url = "https://api.riskinmind.ai/api/v1/cre-loans/predict/pdf/OFFICE"
headers = {
"X-API-Key": "YOUR_API_KEY",
"Content-Type": "application/json"
}
data = {
"PROP_VAL": 1000000,
"NOI": 150000,
"OBAL": 750000,
"ORIG_AMT": 800000,
"RATE": 4.5,
"TTA": 12,
"AMORT_M": 360,
"GRNTR": "John Doe",
"MAT_DEF": 0,
"PD_IND": 0,
"DPVA_PV": 1000000,
"DPVA_LTV": 75.0
}
response = requests.post(url, headers=headers, json=data)
with open("report.pdf", "wb") as f:
f.write(response.content)
const response = await fetch('https://api.riskinmind.ai/api/v1/cre-loans/predict/pdf/OFFICE', {
method: 'POST',
headers: {
'X-API-Key': 'YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
PROP_VAL: 1000000,
NOI: 150000,
OBAL: 750000,
ORIG_AMT: 800000,
RATE: 4.5,
TTA: 12,
AMORT_M: 360,
GRNTR: "John Doe",
MAT_DEF: 0,
PD_IND: 0,
DPVA_PV: 1000000,
DPVA_LTV: 75.0
})
});
const blob = await response.blob();
const url = window.URL.createObjectURL(blob);
const link = document.createElement("a");
link.href = url;
link.download = 'cre_report.pdf';
document.body.appendChild(link);
link.click();
Response
- Content-Type:
application/pdf - Returns: A binary PDF stream representing the generated CRE loan risk report.