Add support for specifying an alternative API endpoint.