Inner shell of optically thin gas in active galactic nuclei