Skip to content
Tutorials

Privacy & security

Reduce sensitive data in AI requests

Review past disclosures, adjust routing preferences, and sanitize documents locally before submitting them to an AI service.

When to use this

Use this workflow when preparing work documents for AI assistance or checking whether earlier conversations exposed confidential information.

What you’ll need

  • Access to your saved AI conversations and configuration
  • Permission to revoke and replace exposed credentials
  • An OpenRouter account if you use its routing service
  • Python installed locally if you want a sanitization script
Open OpenRouter
  1. 1. Review previous submissions

    Inspect conversation histories, project instructions, and saved prompts for credentials or confidential references. Revoke and replace exposed credentials rather than assuming that deleting a conversation removes all copies.

  2. 2. Restrict routing

    If you use OpenRouter, enable its zero-retention routing option in the account privacy controls. Treat this as a provider-selection safeguard, not a substitute for keeping secrets out of requests.

  3. 3. Sanitize documents locally

    Replace identifying details and credentials with meaningful labels before uploading text. For repeated work, generate a local Python utility using the starter request, and inspect its output because automated detection can miss sensitive material.

    Starter request

    Create a local Python utility for sanitizing [INPUT_FILE_PATH]. Rely exclusively on built-in Python modules. Detect likely credentials, password assignments, authentication tokens, nonpublic web addresses, and personal contact details, then substitute unique numbered labels such as [REDACTED_1]. Write the sanitized document to [CLEAN_OUTPUT_PATH] and a separate restoration dictionary to [LOCAL_MAPPING_PATH]. Never transmit the input or mapping over a network. Explain detection limitations and provide three concise lines showing how to execute the program.

  4. 4. Protect the restoration file

    Keep any file that maps placeholders back to original values on your own computer. Do not upload that mapping alongside the sanitized document, since it contains the information you removed.

  5. 5. Review the service path

    For highly confidential workloads, consider accessing the model provider directly instead of adding an intermediary. Check the provider's retention terms and your organization's rules before sending any sensitive material.

AI-generated results need independent checking before use.