Warning: Using Bing Image Search API With Paperspace Gradient

Just wanted to warn fellow students that paperspace Gradient by default makes your notebook public, and this is the only option for the free version. This means if you save your Azure key in the notebook it could be found and used by someone else.

1 Like

Thanks for this info. Is this solved by using the environment variable approach described in the course notebooks when using the free notebook version?

Hey @thebilitz @jneilson1414, Jared here from Paperspace. Unfortunately we don’t have a solution to this until notebook environment variables are fully supported. Currently notebook env vars are supported in the CLI for Gradient Private Clusters (not SaaS), but not yet in the GUI. The GUI work is part of our upcoming feature work, though I don’t know when it will land.

I still have the free legacy plan on paperspace, with private notebooks enabled. Is there any reason not to store an API key in it? I suppose, it offers the same security as the new paid subscription with the higher instance types.

If you import getpass and you replace key with getpass.getpass(), it’ll prompt you for the api key everytime. I do that, and then reset my api key when I’m done. Maybe not perfectly secure, but better than storing the key publicly :).


Nice solution :slight_smile: