"error": "404 Client Error: Not Found for url: https://api.openai.com/v1/chat/completions"

on chat completions intergrations for a bot I have created with openAI and paid for the key but still i am getting the error “error”: "404 Client Error: Not Found for

Hi! :smile: Maybe some parameter is not set correctly? I attach the curl that I tried in Postman where it worked correctly for me.

curl --location 'https://api.openai.com/v1/chat/completions' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer sk-(your Key)' \
--data '{
    "model": "gpt-4o",
    "messages": [
      {
        "role": "developer",
        "content": "You are a helpful assistant."
      },
      {
        "role": "user",
        "content": "Hello!"
      }
    ]
  }'
1 Like

Hello, what if i want to send request to a specific model of chatgpt i created and trained it with specific data

Did you try putting the name of your model as is there? The same thing works, anyway you can try in the playground and see what request it makes below

hi,
just something as well, you can try using any of openai’s client libraries they can be found at: OpenAI · GitHub, so you can try and connect to the openai through that :slight_smile:
hope this helps

A post was merged into an existing topic: ASP issue: “A certificate is required to complete client authentication”