I’m thrilled to use OpenAi. So, I wanna go ahead. But I’m not that good at coding! I want to use it on a WordPress site. For this, I am trying to build a plugin. But I can not make any seance how to use this API. I have already made a plugin with Github API using the cURL function. But I think OpenAi API is more complicated to me! Can you please give me an example of how I can use it on the PHP cURL function? Your documentation is not helping me with this.
Please convert the billow script to PHP for me.
-H “Content-Type: application/json”
-H “Authorization: Bearer $OPENAI_API_KEY”
“prompt”: “Write a article about: hi\n”,
Thank you. I hope anyone will help me!