Get the API key from the environment. Precedence:
Optional
API key provided as an argument. If null, skips environment lookup. If undefined, tries environment.
The API key if found, otherwise undefined
Get the API key from the environment. Precedence: