Loan Prediction

Returns 0 for a loan that is likely to be declined and 1 for a loan that is likely to be approved

Request body

POST https://api.loanpredictor.live /loan

Name
Type
Description

loan_term*

int

Period to pay back the loan in years

annual_income*

int

Annual income of the customer

loan_amount*

int

Loan amount being requested

credit_score*

int

The credit score of the customer. Must range between 300 and 900

currency*

string

Currency being used. "KES" for Kenyan shilling and "INR" for Indian Rupee

probability

bool

Probability values as a percentage will be returned if entered as true

SHAP

bool

SHAP waterfall diagram encoded to base64 will be returned if entered as true

Arguments with * are required. probability and SHAP arguments return additional outputs in addition to the loan probability

Sample valid JSON payload

{
  "loan_term": 1,
  "annual_income": 200000,
  "loan_amount": 30000,
  "credit_score": 400,
  "currency": "KES",
  "probability": true
}

Sample response

{
    "prediction": 0,
    "prediction_probability": [
        0.9956796167978493,
        0.004320383202150705
    ]
}

Last updated