added api_key param and validation