Hi
My sk-proj key is being rejected by Dall-e
Any ideas?
Also how do I generate a normal sk- key as I only get sk-proj
Hi
My sk-proj key is being rejected by Dall-e
Any ideas?
Also how do I generate a normal sk- key as I only get sk-proj
I am having the exact same issue right now
The type of keys that have been used by OpenAI for three years are now called âuser keysâ. To access them, you would, in your platform account owner user icon at upper-right, select âprofileâ.
It has been reported that on newly-created accounts, this third tab is just gone. Thus you are prevented from creating anything but a âdefault projectâ user key if you want a key with non-limited usage rights.
All new keys are extra-long, also.
âRejectedâ doesnât report much of what is happening. Nor does âme tooâ.
Use the error message returned by API to explore the possibilities.
hi @_j thanks so much for this, because i am going through this issue as well.
i am using bolt to test out an ai feature of chatting with openai (chatgpt) within the app am creating.
but it keeps say this :
please what do i do? i have already loaded the account with credits
Same problem here. I trie to use the embeddings endpoint.
from openai import OpenAI
client = OpenAI()
response = client.embeddings.create(
input=âQuery textâ,
model=âtext-embedding-3-largeâ
)
print(response.data[0].embedding)
This throws an error: AuthenticationError: Error code: 401 - {âerrorâ: {âmessageâ: âIncorrect API key provided: [api-key] You can find your API key at https://platform.openai.com/account/api-keys.â, âtypeâ: âinvalid_request_errorâ, âparamâ: None, âcodeâ: âinvalid_api_keyâ}}
:
Any suggestions how to solve this?
Iâm having the same issue that my new sk-proj key is not working.
I was able to make requests after Iâve added my organisational ID before calling the API.
Im getting the same thing - did you get it work?
Had the same issue!
on your console find your project id by clicking your user icon top right then âyour profileâ then on left tab under project, click on general.
and api key also on left tab under project, click API keys, then create key.
Then in your application set them like this:
OPENAI_PROJECT_ID=proj_a**S
OPENAI_API_KEY=sk-proj-
Hope this helps, took me a while to figure it out, itâs not really outlined anywhere clearly except when you first create an API account I think. of how to connect but then disappears.
May the force be with you
Setting the environment variable for project should not be necessary if using a project API key. It is more likely to be something you forget about that later breaks your application.
The project header (and organization header also then required) which are inferred by the client from the correct environment variables, are more for specifying a project and where billing goes when using legacy user keys.
The SDK client will get its inernal variables:
- `api_key` from `OPENAI_API_KEY`
- `organization` from `OPENAI_ORG_ID`
- `project` from `OPENAI_PROJECT_ID`
The headers to be sent in your own http calls:
-H "Authorization: Bearer $OPENAI_API_KEY" \
-H "OpenAI-Organization: $ORG_ID_SOURCE" \
-H "OpenAI-Project: $PROJECT_ID"
Thank you _j, appreciate it!