Help to interact between openai with curl and with python

Hi

I dont succeed to use the curl command below

curl https://api.openai.com/v1/models -H "Authorization: Bearer My Key" -H "OpenAI-Organization: org-IliIGgzNJVQb777mCJxBlOqP" -d '{"model": "gpt-3.5-turbo", "messages": [{"role": "user", "content": "Say this is a test!"}], "temperature": 0.7}

I have the error message below

{
“error”: {
“message”: “Not allowed to POST on /v1/models. (HINT: Perhaps you meant to use a different HTTP method?)”,
“type”: “invalid_request_error”,
“param”: null,
“code”: null
}
}
curl: (3) URL using bad/illegal format or missing URL
curl: (3) URL using bad/illegal format or missing URL
curl: (3) bad range specification in URL position 2:
[{role:
^
what is wrong please
And same problem with python:

import os
import openai
openai.organization = "org-IliIGgzNJVQb777mCJxBlOqP"
openai.api_key = os.getenv("My key")
openai.Model.list()

I have the message error below

File “C:\Users\jrosse\AppData\Local\Programs\Python\Python311\Lib\site-packages\openai\util.py”, line 186, in default_api_key
raise openai.error.AuthenticationError(
openai.error.AuthenticationError: No API key provided. You can set your API key in code using ‘openai.api_key = ’, or you can set the environment variable OPENAI_API_KEY=). If your API key is stored in a file, you can point the openai module at it with ‘openai.api_key_path = ’. You can generate API keys in the OpenAI web interface. See OpenAI Platform for details.

And if I delete openai.Model.list() I have no error message
what is wrong please?
Thanks

Correct URL: https://api.openai.com/v1/chat/completions

documentation, pick the “curl” method in the example code block.

https://platform.openai.com/docs/api-reference/chat/create

There is no relation with the url
If i use this command
curl https://api.openai.com/v1/models -H "Authorization: Bearer My Key" -H "OpenAI-Organization: org-IliIGgzNJVQb777mCJxBlOqP" it works fine

But if I use this command I have the issue descripted in the topic
`curl https://api.openai.com/v1/models -H "Authorization: Bearer My Key" -H "OpenAI-Organization: org-IliIGgzNJVQb777mCJxBlOqP" -d '{"model": "gpt-3.5-turbo", "messages": [{"role": "user", "content": "Say this is a test!"}], "temperature": 0.7}

And concerning OpenAI Platform, if i copy / paste in a prompt command it doesnt works
how to make this working in a prompt command?