In this paper, we propose the use of Gaussian radial basis functions (GRBFs) to model the generalized pupil function for phase retrieval. The selection of the GRBF hyper-parameters is analyzed to achieve an increased accuracy of approximation. The performance of the GRBF-based method is compared in a simulation study with another modal-based approach considering extended Nijboer–Zernike (ENZ) polynomials. The almost local character of the GRBFs makes them a much more flexible basis with respect to the pupil geometry. It has been shown that for aberrations containing higher spatial frequencies, the GRBFs outperform ENZ polynomials significantly, even on a circular pupil. Moreover, the flexibility has been demonstrated by considering the phase retrieval problem on an annular pupil. © 2018 Optical Society of America.