Fixed error with endpoint api_key