Skip to Content
TensorPass
Quickstart

Site key

Get the public site key that turns on the TensorPass sign in for visitors without AI Wallet, on the TensorPass site owners' page, from a coding agent through the TensorPass account MCP server or from the command line, and where to put it for each stack.

A site key turns on Sign in with TensorPass in the connect window, for visitors who have not added AI Wallet. The web accounts page describes that path. The wallet path and Sign in with OpenRouter need no key.

A key is issued at once for the domain you name, such as shop.example. It is public, like a publishable key, and lives in your site's code or environment. It works on https://shop.example and on http://localhost and http://127.0.0.1 at any port, so you try the TensorPass sign in before you deploy. It needs no DNS record and no file on your domain.

On the site owners' page

Sign in to your TensorPass account at https://plan.tensorpass.app/sites with Google, GitHub, an email code or a passkey. The page Your sites creates a key for the domain you type, copies it, and revokes it after a confirmation. The same page holds the revenue share. The subscriber's account page at https://plan.tensorpass.app shows the plan only.

From a coding agent

TensorPass serves an MCP server for account actions at https://plan.tensorpass.app/mcp. It uses the MCP specification's own OAuth: you add the server, a browser opens, and you sign in to TensorPass once. The docs MCP server at /mcp stays read only and holds no account action.

Add it in Claude Code:

claude mcp add --transport http tensorpass https://plan.tensorpass.app/mcp

Then run /mcp in Claude Code and choose tensorpass to sign in.

Add it in Codex, in ~/.codex/config.toml:

~/.codex/config.toml
[mcp_servers.tensorpass]
url = "https://plan.tensorpass.app/mcp"

Then run codex mcp login tensorpass to sign in.

The sign in page is TensorPass's own: Google, GitHub or an email code. Its consent step names your agent and the address it returns to, and lists what the agent may do: manage the site keys of your account. The tools:

ToolInputWhat it does
create_site_keydomainIssues a key for the domain and says where to put it for your stack.
list_site_keysNoneLists your keys with their domain, their date, whether each is revoked and whether the domain is proven for payouts.
revoke_site_keykeyRevokes one of your keys. Its sign ins and its tokens stop at once.
start_domain_proofdomain, network, addressStarts the domain proof for the revenue share, with the USDC address it pays.
check_domain_proofdomainChecks the proof and enrols the domain for payouts.

Ask your agent to "add AI Connect to my site": the aiconnect-integrate Agent Skill has it add the server, call create_site_key once you approve in the browser, write the key to your environment file and pass it to the client.

From the command line

Without an MCP client, the SDK's command line signs in to the same gateway in your browser:

npx @tensorpass/aiconnect site-key shop.example

It opens TensorPass's sign in in your browser and prints its address too, for a computer where no browser opens (--no-browser only prints it). Sign in and approve: the browser comes back to the command, which listens on http://127.0.0.1 on a free port for that one answer, as a native app does under RFC 8252. The command then prints the key and where it goes for the stack it finds in the folder's package.json. A sign in that does not come back within 10 minutes ends the command.

Where the key goes

SetupWhere the key goes
Next.jsNEXT_PUBLIC_TENSORPASS_SITE_KEY=tpk_... in .env.local, then new AiConnect({ siteKey: process.env.NEXT_PUBLIC_TENSORPASS_SITE_KEY })
Vite, with React, Vue or SvelteVITE_TENSORPASS_SITE_KEY=tpk_... in .env.local, then new AiConnect({ siteKey: import.meta.env.VITE_TENSORPASS_SITE_KEY })
Web Componentssite-key="tpk_..." on each <aiconnect-chat> or <aiconnect-search>, or data-site-key="tpk_..." on the elements script
WordPress pluginTensorPass site key, under Settings, AI Connect
Shopify app embedThe Site key setting of the AI chat embed in the theme editor

Each key starts with tpk_. A site with several domains takes one key for each domain.

Limits of a key

  • TensorPass answers a key's sign ins and chats from its domain and from localhost only, with the Origin header the browser sends. Another site that copies your key gets no sign in and no answer.
  • A key takes up to 600 chats a minute and 50 at the same moment, over all its visitors.
  • Each visitor's token takes up to 30 chats a minute and 4 at the same moment. A call past a limit gets status 429 with a Retry-After header.
  • The answers count against the visitor's own TensorPass plan budget, as they do through the wallet.
  • A revoked key stops its sign ins and its visitors' tokens at once. Issue a new one and deploy it.

The domain proof, for the revenue share only

A site earns a share of the plan payments of the subscribers it brings, as the TensorPass plan page describes. Only the payouts need the domain proven. The key, the sign in and the chat work without the proof.

start_domain_proof returns a one time value, and you publish it in either place:

  • a line of the file https://shop.example/.well-known/tensorpass-site.txt;
  • a TXT record named _tensorpass.shop.example.

check_domain_proof reads it and enrols the domain with the USDC address you gave, on Base or Solana. Delete the file or the record after the check. The same proof runs on https://plan.tensorpass.app/sites, signed in to your TensorPass account, without an agent. The page shows the balance of each domain your account proved. A domain proven by one account cannot be claimed by another.

On this page