def get_spcs_base_url() -> str:
    """
    Returns a correctly formatted URL for making Snowflake API calls from within an SPCS environment.

    Raises a ValueError if not in an SPCS environment.
    Returns a string, https://{some-url} that you can affix an API endpoint such as Cortex to.
    """
    if not is_spcs_environment():
        raise ValueError("Cannot call get_spcs_base_url unless in an spcs environment.")
    return os.getenv("SNOWFLAKE_HOST")

    Returns a correctly formatted URL for making Snowflake API calls from within an SPCS environment.

    Raises a ValueError if not in an SPCS environment.
    Returns a string, https://{some-url} that you can affix an API endpoint such as Cortex to.
    
llama-index-integrations/llms/llama-index-llms-cortex/llama_index/llms/cortex/utils.py