Docs Tokens and AI

AI tokens

Watch the videoSetting up AI1:10
Open on YouTube

AI tokens run text through a model at expansion time and paste the result. The shape is {{ai:action}} or {{ai:action:modifier}}, where the modifier is free-form text appended to the instruction.

Three free ways to get AI

🍎 Apple Intelligence

Free, on-device, no key, nothing leaves your Mac. Needs macOS 26 Tahoe on Apple Silicon.

💎 Gemini free tier

Generous daily quota, works on any Mac including Intel. Key from aistudio.google.com.

🖥️ Ollama, local

Run a model on your own machine. Free, offline, unlimited. Setup below.

Paid options are Claude (Anthropic) and OpenAI, both bring-your-own-key with prepaid credits, and Custom for any OpenAI-compatible endpoint.

The two ways to fire an AI snippet

The AI needs input. You give it input in one of exactly two ways.

1️⃣ Selection plus shortcut

Highlight text in any app, press the snippet's global shortcut. The AI runs on your selection and the result replaces it. Best for "polish what I just wrote".

2️⃣ Clipboard plus abbreviation

Copy text with ⌘C, then type the abbreviation somewhere. The AI runs on the clipboard. Best for "process the thing I just copied".

If you fire an AI snippet with nothing selected and nothing copied, TypeFire pastes a short reminder telling you so, rather than failing silently.

Available actions

Token What it does
{{ai:rewrite}} Tightens and clarifies, keeps your meaning
{{ai:rewrite:professional}} Same, formal tone
{{ai:rewrite:casual}} Same, relaxed tone
{{ai:summarize}} Roughly a third of the length
{{ai:summarize:bullets}} As bullet points
{{ai:summarize:tldr}} One sentence
{{ai:translate:fr}} Any language code or name
{{ai:fix}} Grammar and spelling only, wording preserved
{{ai:expand}} Brief note becomes a full paragraph
{{ai:respond}} Writes a reply to the input
{{ai:custom:your instruction}} Anything you want

The modifier is free text. {{ai:rewrite:like a 19th-century butler}} works exactly as written.

Cookbook

Polish a Slack message before sending Body {{ai:rewrite:professional}}. Highlight your draft, hit the shortcut.

Translate in place Body {{ai:translate:de}}. Select English, hit shortcut, German replaces it.

Reply to a customer email Body {{ai:respond:empathetic and actionable}}. Copy their email, type your abbreviation in the compose window.

Commit message from a diff Body {{ai:custom:write a single-line imperative commit message for this diff, no scope prefix}}. Copy git diff --staged, fire the abbreviation in your commit editor.

PR description from rough notes Body {{ai:custom:reformat as a GitHub PR description with Summary and Test plan sections}}.

Setting up a provider

Open Settings → AI. It opens on the Model card. Its corner shows the same colored dot as the menu, with Ready, or what needs fixing first, such as a missing key. Its menu lists every model in one list, grouped by provider (Apple Intelligence, Claude, OpenAI, Gemini, Custom), each with a short note such as "Fast, best for snippets" or "Slower, for long writing". Picking a model picks its provider too. The fast models are the defaults, because a snippet or a Selection Prompt is a short rewrite and the biggest models take several times longer.

Each provider has its own card below the menu, with its key, a Test button and a dot:

  • 🟢 Green dot: ready to use.
  • 🟠 Amber dot: a key is saved but hasn't been tested yet.
  • 🔴 Red dot: not working (the test failed, or Apple Intelligence is switched off in System Settings).
  • ⚪ Gray dot: not set up yet, or your Mac cannot run this provider. The helper text says why.

The same colors show beside every model in the menu, so you can see at a glance which providers are ready. For a bring-your-own-key provider, paste the key in its card and click Test. If the test passes for a provider you aren't using yet, TypeFire asks whether to switch to it. Each card has a "How do I get this API key?" expander written for non-developers. For a model that isn't listed, pick Other … model in the menu and type its id in that provider's card.

Ollama in six steps
  1. Install Ollama from ollama.com and launch it.
  2. In Terminal: ollama pull llama3.2 (small and fast) or ollama pull qwen2.5:7b (stronger).
  3. Open Settings → AI → Custom.
  4. Endpoint: http://localhost:11434/v1. TypeFire adds /chat/completions itself.
  5. API key: leave blank. Model: exactly what you pulled.
  6. Click Test, then pick Custom in the Model menu.

LM Studio works the same way on http://localhost:1234/v1.

⚠️

Subscriptions are not API credits. A Claude Pro or ChatGPT Plus subscription does not include API access. Those are separate products with separate billing.

Good to know

  • Apple Intelligence is usually sub-second. Cloud providers take 1 to 3 seconds. A model on this Mac depends on the Mac: the first request after a pause reloads the model, which can take half a minute on its own, so TypeFire waits up to five minutes for a local server and one for a hosted one.
  • Thinking models (Qwen3, DeepSeek-R1, gpt-oss) are asked not to think, and any reasoning they send anyway is stripped before the reply reaches your document. If a model spends its whole answer thinking, TypeFire says so; switch thinking off in your local server or pick a non-thinking model.
  • Apple Intelligence has a small context window (about 12,000 characters). TypeFire caps input and tells you immediately rather than making you wait for a model error. Use a cloud provider for long documents.
  • When you fire an AI snippet by abbreviation you may briefly see a ✨ placeholder marking the spot. It is replaced by the real text when the model returns. In browsers and terminals TypeFire skips the placeholder entirely.
  • If the AI fails you get [AI error: reason] rather than silence.
  • Your API key stays on this Mac, in the macOS Keychain rather than in a settings file. Calls go straight from your machine to the provider. TypeFire operates no server in that path.

Documentation for TypeFire 6.1.0. Updated 2026-10-05.