---
url: https://lettuceai.app/docs/security
title: "Security — LettuceAI"
description: "Pure Mode content filtering, trusted certificates, and analytics controls in LettuceAI."
---

Menu 

# Security

LettuceAI runs locally on your device. The Security settings page is where you tune content filtering, manage TLS trust for self-hosted endpoints, and decide whether anonymous analytics events leave the app.

Every setting on this page is opt-in or locally enforced. Nothing is synced to a remote account.

## Pure Mode

Pure Mode is an on-device adversarial content filter that scores AI responses (and your own inputs) against a built-in dictionary of explicit terms, slurs, and graphic violence. It runs locally with no network calls. The filter checks both completed text and streaming deltas as tokens arrive.

Pure Mode has four levels you can switch between in **Settings, Security, Pure Mode**:

-   **Off.** The filter is fully disabled. No scoring runs and nothing is logged.
-   **Low.** Only high-weight explicit sexual terms and slurs are scored. Graphic violence is ignored. Threshold is lenient, so casual profanity passes through.
-   **Standard.** The default. Explicit sexual content, graphic violence, and slurs are all scored against a balanced threshold.
-   **Strict.** Same dictionaries as Standard, with a tighter threshold. Single explicit terms can trigger a block.

### How the filter handles evasion

The scoring pipeline normalizes text before matching so common obfuscation tricks do not slip past:

-   Markdown emphasis characters (asterisks, underscores, tildes) are stripped.
-   Zero-width and invisible Unicode characters are removed.
-   Cyrillic and Greek homoglyphs map to their Latin equivalents.
-   Diacritics are reduced to base ASCII letters.
-   Leet-speak digits and symbols (0, 1, 3, 4, 5, 7, 8, 9, @, $, !, +) are decoded back to letters.
-   Runs of three or more identical characters collapse to one (so "fuuuck" still matches "fuck").

Matching also uses word-boundary and N-gram rules, so words like "cocktail", "dictionary", or "analysis of sex education" do not trigger false positives.

A context allowlist (medical, educational language) halves the weight of dictionary hits when present, so legitimate clinical writing is less likely to be blocked.

### Filter log

When you run a development build, the Security page exposes a Filter Log panel that lists recent hits and blocks with a redacted snippet, the score, and which dictionary terms matched. The log is capped at the most recent entries and is held only in memory. Production builds do not expose this panel.

## Remote avatar download

When you import a character card that references an avatar URL, LettuceAI can fetch the image automatically. Toggle **Remote Avatar Download** off if you want to block network requests during card import. Avatars then stay empty until you attach one manually.

## Analytics

Analytics in LettuceAI uses Aptabase. The events are anonymous and contain only the event name plus non-identifying properties defined by the app. Message content, prompts, and personal identifiers are never sent.

-   The toggle is only available when the app was built with an analytics API key. If no key is present the toggle shows as "Unavailable" and analytics is hard-disabled.
-   Changing the toggle requires an app restart to take effect. The app offers a "Restart now" action after you flip the switch.

## Trusted certificates

If you point LettuceAI at a self-hosted endpoint (for example, Ollama behind a reverse proxy with a private CA), the default trust store will reject the connection. The Trusted Certificates panel lets you import PEM certificates that are added to the app trust store for outbound HTTPS calls.

-   Supported file extensions: `.pem`, `.crt`, `.cer`.
-   The file must contain a `BEGIN CERTIFICATE` / `END CERTIFICATE` block.
-   Duplicates are detected on import.
-   You can remove any imported certificate from the same panel.

Certificates you import here apply to every outbound HTTPS request the app makes, including image generation. So if your image provider sits behind the same private CA as your text provider, a single imported certificate covers both.

TLS verification stays on

Importing a certificate adds it to the app trust store. It does not disable certificate validation or allow self-signed certificates that were not explicitly imported.

## What is not on this page

The Security page does not include an app lock, biometric prompt, or local password. If you need device-level protection, rely on your operating system lock screen.

API keys and conversation data live in the local app database on your device. Your keys are never sent to LettuceAI. They are used only to talk to the provider you configured them for. Because they are stored in the app database rather than your operating system keychain, treat a device backup or an exported backup file as sensitive: anyone who can read it (and, for backups, knows the password) can read your keys.

[

PreviousSmart Creator

](/docs/smart-creator)[

NextUsage

](/docs/usage)
