Stainless authentication
We recommend you use the Stainless CLI to authenticate with Stainless, but you can also use an .env file:
- Inside your site’s cloned repository on your computer, make a copy of the
.env.examplefile and name it.env(these files are hidden, so you may not be able to see them by default) - Go to your org settings in the Stainless dashboard; if you have multiple orgs, make sure the one associated with your site is shown in the top left
- Press the Create new API key button
- Copy your new API key
- Open your
.envfile and paste your new API over the placeholder value - Save your
.envfile
Your .env file should now contain a line that looks like the following, where stl_sk_... is the API key you pasted in:
STAINLESS_API_KEY="stl_sk_..."