The first physical inputs are :
1- G-magnitude of the star (in the G-band, G as Gaia)
2- The effective temperature With the bolometric correction for this G-band, the interstellar extinction, we can compute the bolometric magnitude and, thus, the luminosity. With the luminosity, we obtain a determination for the radius. That is the purpose of the so-called "Algoritm 1" of Flame.
With the help of libraries of evolution tracks (luminosity and effective temperature as functions of age and mass), we are able to solve the following inverse problem : We know the luminosity (from previous algorithm) and temperature and we search the corresponding values (at least one) of age and mass. That is the purpose of the so-called "Algorithm 2" of Flame for single stars and "Algorithm 3" for binary stars.