Assistance with Organization Association for API Access Message:

Somebody cay you help me?
I created an organization and project but this one below persists:

Error calling the OpenAI API: {
error: {
message: ‘You must be a member of an organization to use the API. Please contact us through our help center at help.openai.com.’,
type: ‘invalid_request_error’,
param: null,
code: ‘no_organization’
}
}

I think you need to create an organization before creating a key, because they replaced the keys with project specific keys.

Ok I removed old key I let one new key but unfortunately this error persist. I have created a new organization maybe I should delete all and recreated all. I thourght this away

How are you calling the APIs? Can you post your code, and whatever language you are using?

I used Node JS, follow curl

curl --location 'http://localhost:3001/api/chat/bug/send-bug' \
--header 'Content-Type: application/json' \
--data '{
  "message": 
  [
    {
      "role": "system",
      "content": "```python def calcular_fatorial(n): if n == 0 or n == 1: return else: return n * calcular_fatorial(n + 1)```"
    }
  ]
}'

I tried to use headers with all params: organizationID, projetcID but no success

You created a node.js server on 3001, from there you are sending it to OpenAI?
If that’s a yes then, below should work . Also your api_key should be in environment variables. Check echo $OPENAI_API_KEY is set to the key or not.

import OpenAI from "openai";

const openai = new OpenAI();

async function main() {
  const completion = await openai.chat.completions.create({
    messages: [{ role: "system", content: "You are a helpful assistant." }],
    model: "No models available",
  });

  console.log(completion.choices[0]);
}

I will try a new test, thanks for support…