Unable to use through cohear API key

I am unable to use cohere ( generative AI platform with the API Key. The Python code runs fine and works well with cohere from my local machine but when I host it on PythonAnywhere free account it does not. Can this domain be whitelisted for use from within PythonAnywhere?

Request your help.