CohereAPIError: invalid api token

I’m getting an “invalid api token” error when I try to run the following code from the Embeddings lesson on my own notebook:

three_words_emb = co.embed(texts=list(three_words[‘text’]),
model=‘embed-english-v2.0’).embeddings

I seem to have a valid COHERE_API_KEY, so I’m not sure what I’m missing there. Any help would be greatly appreciated.

Hi @aaronjuliuskim

Welcome to the community.

if you are running locally you have to use your own API Key. In that case, pay attention on you environment settings in order to guarantee that there is no permission settings affecting your environment.

2 Likes

Thanks, got past that now with my own API key.

1 Like

You welcome.

Hi, how did you fix your issue?