You may use a custom host and change the default hosts to which the API client connects. More example can be found from this documentation: https://www.algolia.com/doc/api-client/getting-started/customize/python/?client=python#use-a-custom-host
If you are using version 1 of the Python API Client, there could be a problem as it does not provide support for proxy requests.
In that case, please try upgrade algoliasearch dependency version to at least 2.4.0 which should allow support for HTTP_PROXY / HTTPS_PROXY environment variables. You can find more information about this from here: https://github.com/algolia/algoliasearch-client-python/commit/a8ab145b958697210d721c093246315e67942068.
When assigning the domain hosts to be proxied on, please ensure the environment variables are set in capital letters (i.e. HTTP_PROXY=http://example.com or HTTPS_PROXY=https://example.com not http_proxy=http://example.com or https_proxy=https://example.com) as the library expects the variable names to be in that case.