> ## Documentation Index
> Fetch the complete documentation index at: https://pipit.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# AI Processing

> Enhance your transcriptions with AI post-processing

AI Processing polishes transcribed text by fixing grammar, adding punctuation, and correcting filler words before inserting it into your app.

<Warning>
  When enabled, transcribed text (not audio) is sent to your chosen AI provider. Avoid using with sensitive content.
</Warning>

## Quick Setup

Enable AI Processing in **Settings → AI Processing**, select a provider, and enter your API key (OpenRouter only). For local/custom endpoints, provide a base URL and model name; the API key can be left blank.

## Supported Providers

<CardGroup cols={2}>
  <Card title="OpenRouter" href="https://openrouter.ai/">
    Access 100+ models (GPT-4o, Claude, Llama) with one API key.
  </Card>

  <Card title="Local Models (Ollama)" href="/configuration/ai-providers#ollama">
    Run AI entirely on your Mac for privacy, offline use, and zero cost.
  </Card>
</CardGroup>

## AI Modes

| Mode                       | Description                                                       |
| -------------------------- | ----------------------------------------------------------------- |
| **Transcription Enhancer** | Fixes grammar and punctuation while preserving your natural voice |
| **AI Assistant**           | Rewrites text with improved tone and structure                    |

## Context-Aware Enhancement

Pipit's AI detects what you're writing and applies specialized formatting:

| Context           | What It Does                                                  |
| ----------------- | ------------------------------------------------------------- |
| **Email**         | Formal greetings, proper closings, professional tone          |
| **Code/Terminal** | Backtick code formatting, converts "cd into src" to `cd src/` |
| **Git Commands**  | "git commit dash m fix" becomes `git commit -m "fix"`         |
| **Chat/Messages** | Casual tone preservation, emoji support                       |
| **Social Media**  | Minimal changes, preserves your exact voice                   |
| **Spreadsheet**   | Data-optimized formatting                                     |

## Creative Use Cases

### Privacy-Sensitive Dictation

Use local AI (Ollama) for medical notes, legal documents, or any content that shouldn't leave your machine.

### Offline Enhancement

Traveling or on a plane? Local AI keeps working without internet.

### Custom Vocabulary

Configure local models with custom system prompts for domain-specific terminology.

## Fallback Behavior

If AI processing fails, raw transcription is inserted with a notification. Your dictation is never lost.

## Cost

**Cloud:** Uses your own API key through OpenRouter (google/gemini-2.5-flash-lite is affordable).

**Local:** One-time Ollama setup, then free inference forever.
