Fix: api_key not being properly referenced