api_mode for cases where initial HTML is needed as json