Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.toktra.dev/llms.txt

Use this file to discover all available pages before exploring further.

Toktra browser extensions capture LLM usage from browser-based AI tools such as ChatGPT, Claude.ai, and others. They observe request metadata via the browser’s webRequest API — they never read request or response bodies, and never decrypt TLS traffic.

Available extensions

Chrome

Manifest V3 extension. Available from the Chrome Web Store or force-installed via Chrome policy. Compatible with all Chromium-based browsers.

Edge

Manifest V3 extension bundled with the Windows agent MSI. Installed automatically alongside the Windows agent.

Safari

Safari Web Extension bundled with the macOS agent. Enabled from Safari Settings after the macOS agent is installed.

Firefox

Available as a separate install. Built as a standard Firefox WebExtension.

What data is captured

The extensions use the Chrome webRequest API (or equivalent in each browser) to observe LLM API requests. They capture only metadata:
FieldDescription
ProviderLLM provider identified by hostname (e.g., openai, anthropic)
EndpointAPI path (e.g., /v1/chat/completions)
Estimated input tokensDerived from the Content-Length request header using per-provider bytes-per-token ratios
Estimated output tokensDerived from the Content-Length response header
Request durationTime from request initiation to completion (milliseconds)
Source domainHostname of the browser tab making the request (e.g., chat.openai.com)
Streaming flagWhether the response used server-sent events
Token counts are estimates derived from HTTP Content-Length headers. The Toktra backend reconciles these estimates against authoritative provider API data to produce accurate counts.
The extensions never capture:
  • Request bodies (prompt text)
  • Response bodies (completion text)
  • Cookies or authentication tokens
  • Decrypted TLS content
No requestBody listener is registered in the Chrome extension by design.

Monitored providers

The Chrome extension monitors the following LLM API hostnames:
HostnameProvider
api.openai.comOpenAI
api.anthropic.comAnthropic
generativelanguage.googleapis.comGoogle Gemini
api.cohere.ai / api.cohere.comCohere
api.mistral.aiMistral
api.groq.comGroq
api.together.xyzTogether AI
api.perplexity.aiPerplexity
openrouter.aiOpenRouter
api.deepseek.comDeepSeek
Only inference endpoints are monitored (paths starting with /v1/chat/completions, /v1/completions, /v1/messages, /generateContent, /streamGenerateContent).

Budget preflight

When department budget hard caps are configured, the Chrome extension performs a budget validation check before each LLM request. The check completes in under 200ms and uses a 30-second cache to avoid repeated API calls. If the check returns over-budget:
  • Soft cap exceeded: The request proceeds, and the user receives a Chrome notification warning.
  • Hard cap exceeded: The user receives a Chrome notification indicating the request is blocked. Server-side enforcement acts as the authoritative gate.
The budget check fails open — if the Toktra backend is unreachable, the extension always permits the request.

Personal mode (Token Perks)

If your organization has Token Perks enabled, users can switch to Personal Mode from the extension popup. In Personal Mode, LLM usage is recorded against the user’s personal token perks budget rather than the corporate allocation. Toggle Personal Mode:
  1. Click the Toktra extension icon in the browser toolbar.
  2. Click the Personal Mode toggle in the popup.
Personal usage data is encrypted with a per-user key and never enters the corporate analytics pipeline.

Installation

Force-install the Chrome extension across your fleet using Chrome policy. This is the recommended approach for managed devices.
1

Publish to Chrome Web Store

Upload the extension to the Chrome Web Store as a private listing, or host it on an internal update server.
2

Force-install via Google Workspace Admin

In the Google Workspace Admin console, navigate to Devices → Chrome → Apps & Extensions → Users & Browsers.Add the extension by ID and set the installation policy to Force install.
3

Configure with managed storage

Pre-configure the extension using Chrome’s managed storage policy. Create a JSON policy with the schema from extension-chrome/managed_schema.json:
{
  "ingestURL": "https://ingest.your-org.toktra.io",
  "apiKey": "your-org-api-key",
  "orgID": "your-org-id",
  "enabled": true
}
Deploy this policy via Chrome Management → Policy → ExtensionSettings or push it through Google Workspace Admin.

Extension configuration reference

The Chrome and Edge extensions read configuration from managed storage (policy-installed mode) with fallback to local storage. The following keys are supported:
KeyTypeDescription
ingestURLstringToktra ingest URL (e.g., https://ingest.toktra.io)
apiKeystringToktra organization API key for authentication
orgIDstringToktra organization identifier
enabledbooleanEnable or disable monitoring (default: true)
In policy-installed mode, the ingestURL, apiKey, and orgID values from managed storage take precedence over anything the user configures in the extension options page.