Get the API key for a provider from environment.
The provider to get the key for
The API key
ProviderError if the API key is not set
const key = getApiKey('openai');// Returns value of API_KEY_OPENAI, or throws Copy
const key = getApiKey('openai');// Returns value of API_KEY_OPENAI, or throws
Get the API key for a provider from environment.