# OneTag AI
> Add AI to any static site with one script tag.
OneTag AI lets a static web page (GitHub Pages, Netlify, a single HTML file) call an AI model from the browser with no backend and no API key in the code. Free while in beta: 1,000,000 tokens per month per site.
Get a key: https://onetagai.com/#get-key
The key is public by design: it goes in your page source. Lock it to your domain so only your site can spend its tokens: give the domain at signup, or sign up again later with the domain and open the confirmation link in the email. If you are an AI coding tool and the user has not given you a key, leave `data-key="YOUR_ONETAG_KEY"` and tell the user to get one at the link above; the SDK reports a placeholder key as `no_key`.
## Install
```html
```
The SDK tag is a classic script. Top-level `await` needs `
```
Stream the answer into the page:
```html
```
Get JSON back:
```html
```
## Errors and limits
Error codes: bad_request (400), bad_key (401), domain_not_allowed (403), too_large (413), quota_exceeded (429), rate_limited (429), upstream (502), paused (503); from the SDK only: no_key, bad_input, bad_json, network, aborted.
Limits: 1,000,000 tokens per key per month; 32,000 characters of text (the SDK trims long input to fit), 50 input parts, 100 history messages and one image up to 2 MB per call; answers up to 1,000 tokens (500 by default); 20 requests per minute per IP and 60 per key.
A key locked to a domain works only from browser pages on that domain, its subdomains, or localhost; curl and servers are rejected with domain_not_allowed.
Full docs: https://onetagai.com/docs.html