Using the openai hosted api service

I have purchased an API Key, and I wish to integrate ChatGPT in our company web site. Rather than install the API in our server, I wish to use the “hosted API service” that I am told OpenAI provides (and to use javascript to create the interface and to send and receive HTTP requests). In setting up API usage on the OpenAI site, I can find no directions for use of a “hosted API service.” Do they actually provide this? Thanks to anyone who knows what direction to point me.

OpenAI API is hosted by OpenAI, there’s no self hosting.

I highly recommend reading docs before you start.

2 Likes

@rnoblett

FYI: anyone who somehow finds this earlier thread, the same user later asked a similar question…

…but then got some rather helpful and more thorough replies (especially with some reminders about how to securely handle the API key).

1 Like

Does OpenAPI offer a “hosted API service” for those who wish to integrate ChatGPT in our web site, but do not wish to install the API on our own server? I cannot find any documentation on this, though ChatGPT version 3 told me it exists as an option.

This is super risky. It’s theoretically possible, but sometimes bugged, however certainly not advised.

The issue is that it’s trivial for even a low skill hacker to hijack your key and abuse your account.

There’s no real free lunch here, unfortunately. You’ll need to host or use some service to run the API through.

don’t trust chatgpt!


All that said, if you want to get started exploring the API, you can begin here: :slight_smile:

https://platform.openai.com/playground?mode=chat

2 Likes

The OpenAI API is a hosted service, so you don’t need to host it yourself or anywhere else :laughing:

If you want a dedicated server, one that’s only for your business, you can try calling the sales department or have a look at Microsoft Azure.

2 Likes

I think the OP is asking about a “web hosting” solution, where they could upload their web code and have it served, and it would somehow magically do the authtoken resolution without needing to send tokens to the client.

No, they don’t have this. I recommend maybe a $10/month Amazon Lightsail container to get started, with a simple Flask python app perhaps. Or node.js if that’s more your thing.

Do not call the OpenAI API from the client. Do not send API keys to the client.

4 Likes

Might be :thinking:

Good advice btw! The only official web hosted version of the api is chatGPT, and OpenAI are probably not going to let people stick that on their website in any time soon :sweat_smile:

3 Likes

Thank you to everyone for your helpful responses. I would not have started this question chain except that, as I began my investigation, my query of ChatGPT 3.5 “told me” that, in fact, OpenAI offered a “hosted API service” so that I would not need to install the API on our server, but only create the javascript HTTP calls on the client side. Thanks for the re-direction.

3 Likes