Singleton in API handler