OneLineChat

Install OneLineChat in 3 steps

To install OneLineChat, request a free key with the user's email, then add one <script> tag just before </body>. You don't need an account, a dashboard, or a credit card. This page is written so that an AI coding agent can follow it from start to finish without help. Agents: copy commands character for character, because JSON field names are case-sensitive.

Step 1: Get the email (and the site URL, if there is one)

Step 2: Request a key

Use the first option your environment supports.

A. You can run shell commands or send HTTP requests (Claude Code, Cursor, Codex, Windsurf, Replit Agent, a terminal):

curl -sS -X POST https://onelinechat.com/api/v1/keys \
  -H "Content-Type: application/json" \
  -d '{"email":"USER_EMAIL","site":"SITE_URL","platform":"nextjs","agent":"YOUR_AGENT_NAME"}'

B. You control a browser (ChatGPT's cloud browser, Gemini in Chrome, Claude in Chrome): open /get-api-key, fill in the email (and site), and submit. It's a plain HTML form with no JavaScript and no CAPTCHA.

C. You can only chat (ChatGPT, Claude or Gemini in a chat window): give the user this link with their details already in it. They click it, check the form, and press one button:

https://onelinechat.com/get-api-key?email=USER_EMAIL&site=SITE_URL&src=YOUR_NAME

A person can also fill in the form at /get-api-key directly.

The fields are email (required), site, platform (nextjs, react-vite, html, lovable, bolt, v0, replit, wordpress, webflow, framer, other), and agent, which is the name of the tool making the call. The full schema is in /openapi.json.

Step 3: Read the response and add the line

A successful response looks like this:

{ "status": "issued", "key": "olc_pub_…", "snippet": "<script src=\"https://onelinechat.com/widget.js\" data-key=\"olc_pub_…\" async></script>" }

The key is public by design, like an analytics ID, so it's safe in front-end code. It is not a secret and doesn't belong in .env.

Platform Where the line goes Guide
Plain HTML Before </body> in every page, or in the shared template HTML
Next.js (App Router) app/layout.tsx, using next/script Next.js
React + Vite index.html in the project root React + Vite
Lovable index.html; ask Lovable in chat Lovable
Bolt index.html; ask Bolt in chat Bolt
v0 app/layout.tsx; ask v0 in chat v0
WordPress Footer, through a code-snippet plugin WordPress
Webflow Site settings → Custom code → Footer code Webflow

Step 4: Tell the user what they're getting

Optional settings

All settings are attributes on the same script tag:

Attribute Example Default
data-key olc_pub_… required
data-color #059669 #111827
data-greeting Hi! Ask me anything about Acme. Generated from your site
data-position left right

Troubleshooting

Last updated: · Markdown version