Not sure what’s wrong.
There is an error related to the API Keys from my company.
When i use an API Key from the organization i get this error:
001F2B0802000000:error:0A0003FC:SSL routines:ssl3_read_bytes:sslv3 alert bad record mac:../deps/openssl/openssl/ssl/record/rec_layer_s3.c:1605:SSL alert number 20
on the Completition request.
If i switch the credentials to my personal account, i have no errors on the API.
TLS is the handshake and encrypting method when making a https secure request.
Right from the TLS 1.2 RFC:
bad_record_mac
This alert is returned if a record is received with an incorrect MAC. This alert also MUST be returned if an alert is sent because a TLSCiphertext decrypted in an invalid way: either it wasn’t an even multiple of the block length, or its padding values, when checked, weren’t correct. This message is always fatal and should never be observed in communication between proper implementations (except when messages were corrupted in the network).
So data is getting corrupted or altered. It is probably client-side. I don’t see how it could be related to key unless OpenAI is using API key also in connection with a protocol secret that traverses pointlessly through many network layers.
You can make tons of calls to moderations or list models and compare the two organizations’ chances of hitting this, and on different calling hardware. Then compare after generating a new key.
Is this an error that is being delivered by your http client, or over the network as an API error? I assume the former.
One thing I would watch out for if doing key-switching is to ensure that your environment doesn’t have environment variables for OPENAI_ORG_ID or OPENAI_PROJECT_ID. But that still should be an API-delivered http status message for authentication, not failure of the wire encryption.
New project. New key. New example API code. New machine. New network and network proxy and firewall devices. Then you can finally escalate to someone at OpenAI to find if TLS is broken for just you, a high support tier level.