Ways to add AI to a static site, compared
What are the options for adding AI to a static website, and which should I use?
There are four ways to put a language model behind a static site. They differ in who holds the secret, who runs a server, what the feature can look like and what it costs. This page lays them out so you can pick in a minute.
| Option | Who holds the secret | You run | What you can build | Cost shape |
|---|---|---|---|---|
| Serverless proxy (Workers, Netlify, Vercel functions) | Your function, in an env var | The function, rate limits, abuse handling | Anything; you write the UI and the API shape | Provider usage, uncapped unless you build caps |
| Hosted chat widget (kapa.ai, Inkeep, chatbot SaaS) | The vendor | Nothing | Their chat box, their styling, their crawl of your site | Per seat or per conversation, usually $100+ a month |
| Bring your own key (visitor pastes a key) | The visitor | Nothing | Developer tools only | Free for you, hostile for visitors |
| Budgeted public key (OneTag AI) | Nobody; the key is public and capped | Nothing | Any UI you write: summaries, Q&A, translation, JSON, images | Free to 1,000,000 tokens; $9.9 a month on Pro |
When to run your own proxy
When you need a model OneTag AI does not offer, tools or function calling, or per-user authentication that the model call must respect. Also when you already run a backend: then the proxy is one more route, not a new service.
When to buy a widget
When you want a support chat box with analytics, escalation and a crawl of your docs, and the budget is there. These products are good at the whole support workflow; OneTag AI is a capability, not a workflow.
When a budgeted key is enough
Most static sites: blogs, docs, portfolios, product pages, tools built with AI coding assistants. The feature is a summary, a question box, a translation, a rewrite, an extraction, and the interface is yours. One tag, one function, a bill that cannot surprise you.
What OneTag AI does not do
- Choose the model: one fast model, chosen for latency and instruction following.
- Index your site for you: a call takes the text you pass (up to 32,000 characters). For whole-site Q&A, retrieve first; see the ask-the-docs guide.
- Store conversations: pass
historyyourself; nothing is kept server-side.
Questions
Can I use OneTag AI together with my own backend?
Yes. The HTTP API is one POST; call it from any language with an unlocked key. Many sites use the tag for visitor-facing features and keep a backend for the rest.
Can I switch later?
Yes. onetag.ask is one function; wrapping it so you can swap in a proxy later is a few lines. The SDK is MIT licensed and small.
How is OneTag AI different from a chat widget?
A widget gives you a chat box; OneTag AI gives you a function. You build the interface, which can be a chat box or a single button that does one thing.
Does it cost anything?
A free key has 1,000,000 tokens with no monthly reset, enough for a few hundred summaries. Pro is $9.9 a month for 100,000,000 tokens a month and the domain lock.
Which model answers?
A fast, inexpensive model from OpenRouter, chosen for sub-second first tokens and good instruction following. You do not pick a model; the point is one tag that keeps working.
What happens to the text my visitors send?
It goes to the model and comes back. OneTag AI stores token counts per key for the quota and keeps no prompts, inputs or answers. The access log carries no IP addresses.
Related guides
- Is it safe to put an AI API key in a static HTML page?
- Add 'ask the docs' AI search to a documentation site
- Add AI to a single HTML file
- Add AI to a GitHub Pages site
Get a free key by email, paste one tag, call onetag.ask. 1,000,000 tokens, no card.
Updated 2026-11-09. Something wrong or missing? Email support@odysseyx.app.