OneLineChat

How to add an AI chatbot to a v0 app

v0 generates Next.js apps, so the chatbot is a next/script tag in app/layout.tsx. Ask v0 to add it. Get a key at /get-api-key first.

Paste this into the v0 chat

In app/layout.tsx, import Script from "next/script" and add this inside , after {children}. The key is public, so keep it inline: <Script src="https://onelinechat.com/widget.js" data-key="olc_pub_YOUR_KEY" strategy="afterInteractive" />

Notes

Last updated: · Markdown version