How to use openai API using javascript?

I want to use openai API but without node js. Is it possible? If yes, how can I do it? Thank You

Hi jtuluve. It’s definitely possible, but I would recommend using node js as there are many more resources out there should you ever get stuck.

Here’s an example of someone using NextJS and React to build their application.

1 Like

Hi Jtuluve,

This is my prompt that I tested in the playground and Codex gave me a 95% done code.

<!-- create a html web page that has input area for user to enter their requirement and API key to call OpenAI Codex to generate code for them.

The resposne from OpenAI Codex should be shown in a textarea on the web page.

Only HTML and Javascript can be used in the web page.-->

<!DOCTYPE html>

Go through contnet in the below link then you will understand how to use it.