Background: Open heart surgeries are a common surgical approach among patients with heart disease. Acute kidney injury (AKI) is one of the most common postoperative complications following cardiac surgeries, with an average incidence of 6 - 10%. Additionally, AKI has a mortality rate of 5 - 10%. One of the challenges of cardiac surgeries is selecting the appropriate anesthetic approaches to reduce the risk of AKI. Objectives: This study presents a machine learning-based method that consists of two regression models. These models can inform the anesthesiologist about the risk of AKI resulting from the improper selection of anesthetic parameters. Methods: In this cohort study, the medical records of 998 patients who underwent cardiac surgery were collected. The proposed method includes two regression models. The first regression model recommends optimal anesthesia parameters to minimize the risk of AKI. The second model provides the anesthesiologist with the safest margin for deciding on anesthetic parameters during surgery, including cardiopulmonary bypass (CPB) time, anesthesia time, crystalloid dose, diuretic dose, and transfusion of packed red cells (PC) and fresh frozen plasma (FFP). Using this method, the specialist can evaluate the anesthetic parameters and assess the potential AKI risk. Additionally, the proposed method can also provide the treatment team with anesthetic parameters that carry the lowest risk of AKI. Results: This method was evaluated using data from 526 patients who suffered from postoperative AKI (AKI+) and 472 who did not suffer any injury (AKI-). The accuracy of the proposed method is 80.6%. Additionally, the evaluation of the proposed method by three experienced cardiac anesthesiologists shows a high correlation between the results of the proposed method and the opinions of the anesthesiologists. Conclusions: The results indicated that the outputs of the proposed models and the designed software could help reduce the risk of postoperative AKI.