getcursor / cursor

The AI Code Editor
https://cursor.com
25.27k stars 1.57k forks source link

OpenAI API key is tested to be valid, but cursor reported invalid. #730

Open lyjpaul opened 1 year ago

lyjpaul commented 1 year ago

the command line to test the api key return successfully, but inside cursor still report a invalid key issue. model gpt3.5 and key is newly generated for 3.5

slamphear commented 1 year ago

I'm running into this too. I have a ChatGPT+ subscription, and Cursor is saying the API key I made for it is invalid.

TheBrianGraf commented 1 year ago

I'm having the same issue

nminkov commented 1 year ago

Same for me. Tested 2 keys, I see that OpenAI detect tests (first use date changes), but cursor reports them as invalid

nminkov commented 1 year ago

I see that there is "Start payment plan" in Open AI billing. I already have GTP4 and never before had to do that for OpenAI key to work. Probably "new" and necessary for cursor to work?

sergiobarria commented 1 year ago

same issue for me

msdlisper commented 1 year ago

same for me

Jairogutiz commented 1 year ago

Me too.

slamphear commented 1 year ago

I finally figured this out! OpenAI's API use is paid for separately from a ChatGPT Plus subscription (for some reason I had assumed that paying for ChatGPT+ would have paid for my API use), so you'll need a credit balance for your OpenAI account in order for your API key to work. You can go to https://platform.openai.com/account/billing/overview and make sure you have a credit balance there. I also revoked/reissued a new API key for Cursor afterwards, though I'm not sure whether or not that was necessary.

nminkov commented 1 year ago

I finally figured this out! OpenAI's API use is paid for separately from a ChatGPT Plus subscription (for some reason I had assumed that paying for ChatGPT+ would have paid for my API use), so you'll need a credit balance for your OpenAI account in order for your API key to work. You can go to https://platform.openai.com/account/billing/overview and make sure you have a credit balance there. I also revoked/reissued a new API key for Cursor afterwards, though I'm not sure whether or not that was necessary.

Thank you for confirming my suspicion. I've already used my API key with ChatGPT+ subscription in other occasions and it worked... weird.

ShravanSunder commented 10 months ago

Same here. my keys are working from curl, but not from cursor

pipichaoren6 commented 9 months ago

I finally figured this out! OpenAI's API use is paid for separately from a ChatGPT Plus subscription (for some reason I had assumed that paying for ChatGPT+ would have paid for my API use), so you'll need a credit balance for your OpenAI account in order for your API key to work. You can go to https://platform.openai.com/account/billing/overview and make sure you have a credit balance there. I also revoked/reissued a new API key for Cursor afterwards, though I'm not sure whether or not that was necessary.

Thank you for confirming my suspicion. I've already used my API key with ChatGPT+ subscription in other occasions and it worked... weird. bro,I would like to ask why the key I purchased directly from the merchant cannot be used, does it require the login account to be consistent with the apikey