Building a website that uses an openai library

I can build a website pretty easily with php, css and some vanilla js and I have used several providers in the past such as hostgator, godaddy, etc. So now I need to build a site that uses the services of chatgpt, and my (limited) research seems to prove that godaddy and hostgator do not provide the services needed to host openai (some may offer limited plugins, but thats not what I’m looking for). Further research led me to Heroku with Django as the answer. Although I am having fun learning Django and how to work with Heroku, I am looking for a quicker route. Can anyone suggest other options that I may have missed?

Best to start here: OpenAI Platform
GitHub - openai/openai-node: Node.js library for the OpenAI API

You’ll need a backend server or function to handle the API calls to the openAI service
Lots of options, a quick way might be to consider netlify or Cloudflare pages+functions

1 Like

The quickest way to just “turn on” a website that has a chatbot is by using Wordpress with an OpenAI API plugin chat assistant. This also gives you an existing end-user framework that is heavy, but feature-filled.

There’s one I saw being used, and extracted the source to get back to the plugin author’s website with a sophisticated-looking implementation being advertised, but I will let you discover rather than endorsing one that may be inappropriate for your particular case.

I am brushing up on modernizing my web skills and learning React.

I am able to build React web pages, and serve them as static webpages through CloudFront, where the entire contents originate from a static S3 bucket.

So as simple and modern as I think you can get these days.

The API calls normally would originate from lambda functions deep in the back end, but I don’t serve any AI responses through any webpages, so no direct experience there.

Plenty of SDK options, just beware of the security of your API keys, and bury them so they aren’t exposed.

1 Like

Thank you for the advice! I will try Cloudflare, I looked at it and it seems to be what I need. Appreciate You!

Thank you for the advice! I will try Cloudflare, I looked at it and it seems to be what I need. Appreciate You!

Thank you or the info on Wordpress plugin!

Thank you for the React on CloudFront approach!

1 Like

No reason you can’t build a PHP app with OpenAI APIs, the APIs are very simple. Any cheap VPS host is enough to get started (Linode, DigitalOcean, etc). I’d imagine GoDaddy and HostGator would also work (though maybe not their super limited website builder products, but anything that can run PHP should be fine to start). It’s not a one-click install, but if you’re comfortable writing modern PHP it’s easy to get started. Note that you don’t “host OpenAI”, they provide standard HTTP API endpoints to use GPT, so as long as the host supports PHP you’re probably good.

My preferred PHP OpenAI library (not affiliated):


Absolutely! I resisted the call to Python and instead used default PHP curl for all my API calls. Built a Drupal module that not only gives me the chat completion service, but a whole content management system behind it.

1 Like

I agree with not needing the SDK’s for using the API.

Me, I just use the requests module in Python to make the API calls without the SDK.

It’s better this way, since less dependencies. And easy too.

1 Like

This was the advice that I needed. Thank you so very much.

1 Like