Chat GPT embedded chat inside my website


I am developing a website in React and I want to add a GPT chat inside it, so the user will log in or sign up and the chat will appear inside an iframe or something like that, without using 3rd party services.
How can I do it? because when I’m trying to add the GPT chat inside an iframe with a chat ID I’m getting a CORS error and I can’t show the chat.


Welcome to the community.

Embedding ChatGPT elsewhere is against Terms of Service.

You’ll need to replicate as close as you can with Assistants API.

What do you mean by Assistants API? @PaulBellow

Assistants API Beta

The Assistants API allows you to build AI assistants within your own applications. An Assistant has instructions and can leverage models, tools, and knowledge to respond to user queries. The Assistants API currently supports three types of tools: Code Interpreter, Retrieval, and Function calling. In the future, we plan to release more OpenAI-built tools, and allow you to provide your own tools on our platform.

You can explore the capabilities of the Assistants API using the Assistants playground or by building a step-by-step integration outlined in this guide. At a high level, a typical integration of the Assistants API has the following flow:

  1. Create an Assistant in the API by defining its custom instructions and picking a model. If helpful, enable tools like Code Interpreter, Retrieval, and Function calling.
  2. Create a Thread when a user starts a conversation.
  3. Add Messages to the Thread as the user ask questions.
  4. Run the Assistant on the Thread to trigger responses. This automatically calls the relevant tools.

The Assistants API is in beta and we are actively working on adding more functionality. Share your feedback in our Developer Forum!

But yeah, short answer is you can’t embed ChatGPT… at least not for long…

Can I give the user an option to log in or sign up to chat GPT and then start the API with his details? instead of paying to the API for each request? @PaulBellow

That would be a no, sorry.

ChatGPT is a gated community, and they’re protecting it with some of the smartest minds on the planet at the moment.

You’ll need to pay, or… you can set up a Custom GPT within ChatGPT “ecosystem” and wait for details on monetization.


Lots of Time / Money Costs / More Control (putting on your website) = Assistants API


Less Time / Lower (?) Money Costs (part of the perks for being in the ChatGPT ecosystem) / Less Control = Custom GPT via ChatGPT Plus

1 Like

Thank you so much for your help! It was very informative and helpful @PaulBellow

1 Like

Hope you stick around. We’ve got a great community “garden” growing here, and it sounds like you might fit in. Once you hit Trust Level 3 here at the forum, there’s perks, but it’s a long, windy road a lot of us have gone down since this place started a few years ago.

But yeah, have a look around. Hope you stay! Great group of people here.

Glad I could help it make a bit more sense for you. :slight_smile: