Use Openai with a form in Wordpress page

I have an Openai account, generated an API Key and now try to create a WP extension/plugin.
I need a simple form where i Can write a keywords, then the plugin send a prompt with this keyword as a variable and at the end i Can see the answer in the same WP page.
Can you help me to Do that?

1 Like

Welcome to the community!

There’s been some WordPress plug-ins for the back-end, but it sounds like you’re wanting to have the API available on a published page or post? I don’t think anyone has made that … yet.

What’s your experience level with programming in general and WordPress plugins specifically?

I wish I had the skills to write a plugin for this use case! But I accomplished it with custom code on my wp site. Here is a link: Lexata – capital markets rules on demand. You can try the sample searches without logging in. Some of the steps I took to accomplish this are:

  1. add some python and php to the functions.php file;
  2. storing my API key in a separate secure file and calling it as a variable at search time;
  3. embedding the text and some metadata of my wordpress posts and storing them in a custom table in the wp mysql database;
  4. embedding the user query on the fly;
  5. finding the top n search results using cosine similarity and displaying those search results shown to the user (overriding defalt wp search results);
  6. also using those search results in the prompt sent to the completions endpoint to generate the answer.
    I suggest you find a very good wp developer who is expert at python and who is willing and able to dig into GPT-3. Based on my experience, I’d say that understanding how wp works, php, and python is more important to this task than understanding GPT-3, since the latter can be learned fairly quickly by people who know python. I hope the above is helpful and I hope a wp expert decides to write a plugin soon. After all, a majority of the whole world’s websites run on wp!!

yes, you well understand : that’s on the frontend of my website that I want to use a form that call OpenAI with a prompt that include parameters.
I tried to coe the plugin with GPTchat but it not works for the moment. I will continue my test…

Have you had any positive progress yet? I have also been trying to make a plugin with guidance from ChatGPT and have not had success. I am trying to do something similar by asking the user for something and inputting that into a custom prompt of mine and sending it off to OpenAI then presenting the answer on my website. I can see on my profile that the requests are not making it through to the API, as I am still at $0 out of the 18 free credits of API usage.

I was able to build such a plugin. I’m about 80% complete but it already interacts with openai api , sends a prompt to the api and displays the answer on the page. Using it with the ada model currently to control costs. Still figuring out some use cases for the plugin as I go along :slight_smile:


Hi Liam, I’d love to learn more about your plugin. Leslie

Hey Liam, I’d be interested in trying your plugin if that’s something you’re open to.

Apologies for the delay with feedback. I have been actively working on the plugin. I was custom building it for a company called Obihub so I also had to check with them if I could share more details. They agreed.

The plugin is still quite basic, but I spent the last few days tightening security as a leak of the OpenAI API key wont be good :wink:

Also worked a bit on the UI/UX and the wordpress admin site settings to manage and securely set your API key.

Also working on managing certain parameters via the wordpress admin site settings to allow custom setup of what the use case for the integration to openai might be.

Still figuring out use cases with the team from Obihub but the idea is to allow for maximum flexibility so that Obihub can customize the page without the need of contacting me (or any other developer) to set it up.

Version 0.0.9 is live on their website already, but not sure if I am allowed to share the direct link on this forum, so please DM me and i’ll send you the link. Note that you do need to register to make use of the prompter, but you can easily do that with a click of a button using your google account.



Is there any option can i create a same openai template look in my wordpress website frontpage and suggest me a best plugin for getting all openai features?

Would love the link! Not sure how to DM on here, but if you don’t mind sharing it to my DMs that would be awesome! Super helpful!

This might help:

It has an OpenAI integration.

@liam are you able to share plugin details? Thanks!!

Apologies for the long delay. I have been actively working with the development team to get the product ready. Its finally ready, and you can have a look here for more details : .

After signing up for the free trial you can link your website. Thereafter, you can download the wordpress plugin or insert a HTML snippet into your website page. Any of the two integration methods will result in a chat widget being shown on your website that can answer any questions about the content thats on your website. Quick and easy :slight_smile:

Alot of time and effort has gone into building this product and I was one of the developers involved. Any feedback will be greatly appreciated. I will also create a separate post where I can share more details about the product.

So yeah, sign up for the free trial, no Credit card required for the trial. If you like what you see then you can purchase a subscription.


More details here : Introducing Auliza: Revolutionise Your Customer Engagement with AI-Powered Personalisation!

RECUWEB OpenAI Text Completion plugin for WordPress can do that

Hi Liam
Not sure how to private message but i would appreciate the assist with getting OpenAi working on word press site, thanks