Intensity Modulated Radiation Therapy is an effective cancer treatment. Models based on the Generalized Equivalent Uniform Dose (gEUD) provide radiation plans with excellent planning target volume coverage and low radiation for organs at risk. However, manual adjustment of the parameters involved in gEUD is required to ensure that the plans meet patient-specific physical restrictions. This paper proposes a radiotherapy planning methodology based on bi-level optimization. We evaluated the proposed scheme in a real patient and compared the resulting irradiation plans with those prepared by clinical planners in hospital devices. The results in terms of efficiency and effectiveness are promising.