check for API_KEY directly instead of by inference