We derived a bi-dimensional calibration between the emission line ratios R23=([O II]3726+3729+[O II]4959+5007)/Hb, P=[([O II]4959+5007)/Hb]/R23 and the oxygen abundance relative to hydrogen (O/H) in the gas phase of Seyferts 1 and 2 nuclei. In view of this, emission-line intensity ratios for a sample of objects taken from the Sloan Digital Sky Survey Data Release 7 (SDSS-DR7) measured by the MPA/JHU group and direct estimates of O/H based on Te-method, adapted for AGNs, are considered. We find no variation of R23 observed along the radii of AGNs which shows that this line ratio is a good oxygen abundance (O/H) indicator for the class of objects considered in this work. The derived O/H = f(R23, P) relation produces O/H values similar to estimations via Te-method in a wide range of metallicities [8.0 < 12+log(O/H) < 9.2]. Conversely to star-forming regions in the high metallicity regime, R23 shows a positive correlation trend with O/H in AGNs. This indicates that the hardness of ionizing radiation is not affected by the metallicities in these objects or Narrow Line Regions (NLRs) are not significantly modified by changes in the Spectral Energy Distribution due to metallicity variations.