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

# Quickstart

> Start protecting PII before sending to OpenAI, Anthropic Claude, Google Gemini, or any LLM

Start detecting PII in under 5 minutes. Local mode is **free forever** — no signup, no API key, no network calls.

## Try It Instantly (Free, No API Key)

All SDKs include **local mode** with 86 regex-based entity types and all 8 operations (detect, tokenize, redact, mask, hash, encrypt, synthesize, detokenize). Your data never leaves your infrastructure. You only need an API key if you want NLP-powered detection via the Cloud API.

<Tabs>
  <Tab title="Python">
    ```bash theme={null}
    pip install blindfold-sdk
    ```

    ```python theme={null}
    from blindfold import Blindfold

    # No API key needed — runs entirely in-process
    client = Blindfold()

    result = client.tokenize("Contact john@example.com or call +1-555-1234")
    print(result.text)
    # "Contact <Email Address_1> or call <Phone Number_1>"
    ```
  </Tab>

  <Tab title="JavaScript">
    ```bash theme={null}
    npm install @blindfold/sdk
    ```

    ```javascript theme={null}
    import { Blindfold } from '@blindfold/sdk';

    // No API key needed — runs entirely in-process
    const client = new Blindfold();

    const result = await client.tokenize("Contact john@example.com or call +1-555-1234");
    console.log(result.text);
    // "Contact <Email Address_1> or call <Phone Number_1>"
    ```
  </Tab>

  <Tab title="Java">
    ```xml theme={null}
    <dependency>
        <groupId>dev.blindfold</groupId>
        <artifactId>blindfold-sdk</artifactId>
        <version>1.0.0</version>
    </dependency>
    ```

    ```java theme={null}
    import dev.blindfold.sdk.Blindfold;

    // No API key needed — runs entirely in-process
    Blindfold client = new Blindfold();

    var result = client.tokenize("Contact john@example.com or call +1-555-1234");
    System.out.println(result.getText());
    // "Contact <Email Address_1> or call <Phone Number_1>"
    ```
  </Tab>

  <Tab title="Go">
    ```bash theme={null}
    go get github.com/blindfold-dev/Blindfold/packages/go-sdk
    ```

    ```go theme={null}
    import blindfold "github.com/blindfold-dev/Blindfold/packages/go-sdk"

    // No API key needed — runs entirely in-process
    client := blindfold.New()

    result, _ := client.Tokenize(ctx, "Contact john@example.com or call +1-555-1234")
    fmt.Println(result.Text)
    // "Contact <Email Address_1> or call <Phone Number_1>"
    ```
  </Tab>

  <Tab title=".NET">
    ```bash theme={null}
    dotnet add package Blindfold.Sdk
    ```

    ```csharp theme={null}
    using Blindfold.Sdk;

    // No API key needed — runs entirely in-process
    using var client = new BlindfoldClient();

    var result = await client.TokenizeAsync("Contact john@example.com or call +1-555-1234");
    Console.WriteLine(result.Text);
    // "Contact <Email Address_1> or call <Phone Number_1>"
    ```
  </Tab>
</Tabs>

<Info>
  **Local mode is free forever.** No data leaves your infrastructure — everything runs in-process with zero network calls. Supports 86 regex-based entity types (emails, phones, credit cards, SSNs, IBANs, and more) and all 8 privacy operations.
</Info>

Need NLP-powered detection (names, addresses, organizations), compliance policies, or audit logs? Continue below to set up the optional Cloud API.

***

## Step 1: Create an Account

Sign up for a Blindfold account to get started.

<Card title="Create Account" icon="user-plus" href="https://app.blindfold.dev" horizontal>
  Create your free account at app.blindfold.dev
</Card>

After signing up, you will be automatically logged into the dashboard.

## Step 2: Generate an API Key

Once logged in, navigate to the API Keys section to create your first API key.

<Steps>
  <Step title="Go to API Keys">
    In the dashboard, click on **API Keys** in the sidebar navigation.
  </Step>

  <Step title="Create New Key">
    Click the **Create API Key** button.
  </Step>

  <Step title="Name Your Key">
    Give your API key a descriptive name (e.g., "Development", "Production App").
  </Step>

  <Step title="Copy Your Key">
    Copy the generated API key and store it securely. You will not be able to see it again.
  </Step>
</Steps>

<Warning>
  Keep your API key secure and never commit it to version control. Use environment variables to store your keys.
</Warning>

## Step 3: Make Your First API Call

Choose your preferred integration method and make your first request.

<Tabs>
  <Tab title="Python">
    Install the Python SDK and tokenize your first text.

    ```bash theme={null}
    pip install blindfold-sdk
    ```

    ```python theme={null}
    from blindfold import Blindfold

    # Initialize the client
    client = Blindfold(api_key="your-api-key-here")

    # Tokenize text with sensitive data
    response = client.tokenize(
        "My email is john@example.com and phone is +1-555-1234"
    )

    print(response.text)
    # Output: "My email is <EMAIL_ADDRESS_1> and phone is <PHONE_NUMBER_1>"

    print(response.mapping)
    # Output: {'<EMAIL_ADDRESS_1>': 'john@example.com', '<PHONE_NUMBER_1>': '+1-555-1234'}
    ```

    <Tip>
      The SDK automatically handles API authentication and request formatting.
    </Tip>
  </Tab>

  <Tab title="JavaScript">
    Install the JavaScript SDK and tokenize your first text.

    ```bash theme={null}
    npm install @blindfold/sdk
    ```

    ```javascript theme={null}
    import { Blindfold } from '@blindfold/sdk';

    // Initialize the client
    const client = new Blindfold({
      apiKey: 'your-api-key-here'
    });

    // Tokenize text with sensitive data
    const response = await client.tokenize(
      "My email is john@example.com and phone is +1-555-1234"
    );

    console.log(response.text);
    // Output: "My email is <EMAIL_ADDRESS_1> and phone is <PHONE_NUMBER_1>"

    console.log(response.mapping);
    // Output: {'<EMAIL_ADDRESS_1>': 'john@example.com', '<PHONE_NUMBER_1>': '+1-555-1234'}
    ```

    <Tip>
      The SDK works in both Node.js and browser environments.
    </Tip>
  </Tab>

  <Tab title="Java">
    Install the Java SDK and tokenize your first text.

    ```xml theme={null}
    <dependency>
        <groupId>dev.blindfold</groupId>
        <artifactId>blindfold-sdk</artifactId>
        <version>1.0.0</version>
    </dependency>
    ```

    ```java theme={null}
    import dev.blindfold.sdk.Blindfold;

    // Initialize the client
    Blindfold client = new Blindfold("your-api-key-here");

    // Tokenize text with sensitive data
    var response = client.tokenize(
        "My email is john@example.com and phone is +1-555-1234"
    );

    System.out.println(response.getText());
    // Output: "My email is <EMAIL_ADDRESS_1> and phone is <PHONE_NUMBER_1>"

    System.out.println(response.getMapping());
    // Output: {<EMAIL_ADDRESS_1>=john@example.com, <PHONE_NUMBER_1>=+1-555-1234}
    ```

    <Tip>
      The SDK works with Java 11+ and has no external HTTP dependencies.
    </Tip>
  </Tab>

  <Tab title="Go">
    Install the Go SDK and tokenize your first text.

    ```bash theme={null}
    go get github.com/blindfold-dev/Blindfold/packages/go-sdk
    ```

    ```go theme={null}
    import blindfold "github.com/blindfold-dev/Blindfold/packages/go-sdk"

    // Initialize the client
    client := blindfold.New(blindfold.WithAPIKey("your-api-key-here"))

    // Tokenize text with sensitive data
    result, err := client.Tokenize(ctx,
        "My email is john@example.com and phone is +1-555-1234",
    )

    fmt.Println(result.Text)
    // Output: "My email is <EMAIL_ADDRESS_1> and phone is <PHONE_NUMBER_1>"

    fmt.Println(result.Mapping)
    // Output: map[<EMAIL_ADDRESS_1>:john@example.com <PHONE_NUMBER_1>:+1-555-1234]
    ```

    <Tip>
      The SDK has zero external dependencies — uses only the Go standard library.
    </Tip>
  </Tab>

  <Tab title=".NET">
    Install the .NET SDK and tokenize your first text.

    ```bash theme={null}
    dotnet add package Blindfold.Sdk
    ```

    ```csharp theme={null}
    using Blindfold.Sdk;

    // Initialize the client
    using var client = new BlindfoldClient("your-api-key-here");

    // Tokenize text with sensitive data
    var result = await client.TokenizeAsync(
        "My email is john@example.com and phone is +1-555-1234"
    );

    Console.WriteLine(result.Text);
    // Output: "My email is <EMAIL_ADDRESS_1> and phone is <PHONE_NUMBER_1>"

    Console.WriteLine(result.Mapping);
    // Output: {<EMAIL_ADDRESS_1>: john@example.com, <PHONE_NUMBER_1>: +1-555-1234}
    ```

    <Tip>
      The SDK targets net6.0, net8.0, and netstandard2.1. Zero external dependencies.
    </Tip>
  </Tab>

  <Tab title="cURL">
    Make a direct API call using cURL or any HTTP client.

    ```bash theme={null}
    curl -X POST https://api.blindfold.dev/api/public/v1/tokenize \
      -H "X-API-Key: your-api-key-here" \
      -H "Content-Type: application/json" \
      -d '{
        "text": "My email is john@example.com and phone is +1-555-1234"
      }'
    ```

    **Response:**

    ```json theme={null}
    {
      "text": "My email is <EMAIL_ADDRESS_1> and phone is <PHONE_NUMBER_1>",
      "mapping": {
        "<EMAIL_ADDRESS_1>": "john@example.com",
        "<PHONE_NUMBER_1>": "+1-555-1234"
      },
      "entities_count": 2,
      "detected_entities": [
        {
          "type": "EMAIL_ADDRESS",
          "text": "john@example.com",
          "start": 12,
          "end": 28,
          "score": 1.0
        },
        {
          "type": "PHONE_NUMBER",
          "text": "+1-555-1234",
          "start": 42,
          "end": 53,
          "score": 0.85
        }
      ]
    }
    ```

    <Tip>
      Replace `your-api-key-here` with your actual API key from Step 2.
    </Tip>
  </Tab>
</Tabs>

<Tip>
  **Data Residency**: Need your data processed in a specific region? Use `region="eu"` or `region="us"` when initializing the client. See [Regions](/essentials/regions) for details.
</Tip>

## Step 4: Restore Original Data (Detokenize)

After sending tokenized data to AI or processing, you can restore the original values using the mapping.

<Tabs>
  <Tab title="Python">
    ```python theme={null}
    from blindfold import Blindfold

    client = Blindfold(api_key="your-api-key-here")

    # Step 1: Tokenize sensitive data
    protected = client.tokenize(
        "Contact John Doe at john@example.com or call +1-555-1234"
    )

    print(protected.text)
    # "Contact <PERSON_1> at <EMAIL_ADDRESS_1> or call <PHONE_NUMBER_1>"

    # Step 2: Send to AI (protected data only)
    ai_response = f"We received your request: {protected.text}"
    # AI never sees real PII!

    # Step 3: Restore original data
    original = client.detokenize(
        text=ai_response,
        mapping=protected.mapping
    )

    print(original)
    # "We received your request: Contact John Doe at john@example.com or call +1-555-1234"
    ```

    <Tip>
      Store the mapping securely. Without it, you cannot restore original values.
    </Tip>
  </Tab>

  <Tab title="JavaScript">
    ```javascript theme={null}
    import { Blindfold } from '@blindfold/sdk';

    const client = new Blindfold({ apiKey: 'your-api-key-here' });

    // Step 1: Tokenize sensitive data
    const protected = await client.tokenize(
      "Contact John Doe at john@example.com or call +1-555-1234"
    );

    console.log(protected.text);
    // "Contact <PERSON_1> at <EMAIL_ADDRESS_1> or call <PHONE_NUMBER_1>"

    // Step 2: Send to AI (protected data only)
    const aiResponse = `We received your request: ${protected.text}`;
    // AI never sees real PII!

    // Step 3: Restore original data
    const original = await client.detokenize(
      aiResponse,
      protected.mapping
    );

    console.log(original);
    // "We received your request: Contact John Doe at john@example.com or call +1-555-1234"
    ```
  </Tab>

  <Tab title="Java">
    ```java theme={null}
    import dev.blindfold.sdk.Blindfold;

    Blindfold client = new Blindfold("your-api-key-here");

    // Step 1: Tokenize sensitive data
    var protected_ = client.tokenize(
        "Contact John Doe at john@example.com or call +1-555-1234"
    );

    System.out.println(protected_.getText());
    // "Contact <PERSON_1> at <EMAIL_ADDRESS_1> or call <PHONE_NUMBER_1>"

    // Step 2: Send to AI (protected data only)
    String aiResponse = "We received your request: " + protected_.getText();
    // AI never sees real PII!

    // Step 3: Restore original data
    var original = client.detokenize(aiResponse, protected_.getMapping());

    System.out.println(original.getText());
    // "We received your request: Contact John Doe at john@example.com or call +1-555-1234"
    ```
  </Tab>

  <Tab title="Go">
    ```go theme={null}
    import blindfold "github.com/blindfold-dev/Blindfold/packages/go-sdk"

    client := blindfold.New(blindfold.WithAPIKey("your-api-key-here"))

    // Step 1: Tokenize sensitive data
    protected, _ := client.Tokenize(ctx,
        "Contact John Doe at john@example.com or call +1-555-1234",
    )

    fmt.Println(protected.Text)
    // "Contact <PERSON_1> at <EMAIL_ADDRESS_1> or call <PHONE_NUMBER_1>"

    // Step 2: Send to AI (protected data only)
    aiResponse := fmt.Sprintf("We received your request: %s", protected.Text)

    // Step 3: Restore original data
    original := client.Detokenize(aiResponse, protected.Mapping)

    fmt.Println(original.Text)
    // "We received your request: Contact John Doe at john@example.com or call +1-555-1234"
    ```
  </Tab>

  <Tab title=".NET">
    ```csharp theme={null}
    using Blindfold.Sdk;

    using var client = new BlindfoldClient("your-api-key-here");

    // Step 1: Tokenize sensitive data
    var safe = await client.TokenizeAsync(
        "Contact John Doe at john@example.com or call +1-555-1234"
    );

    Console.WriteLine(safe.Text);
    // "Contact <PERSON_1> at <EMAIL_ADDRESS_1> or call <PHONE_NUMBER_1>"

    // Step 2: Send to AI (protected data only)
    var aiResponse = $"We received your request: {safe.Text}";

    // Step 3: Restore original data
    var original = client.Detokenize(aiResponse, safe.Mapping);

    Console.WriteLine(original.Text);
    // "We received your request: Contact John Doe at john@example.com or call +1-555-1234"
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={null}
    # Step 1: Tokenize
    curl -X POST https://api.blindfold.dev/api/public/v1/tokenize \
      -H "X-API-Key: your-api-key-here" \
      -H "Content-Type: application/json" \
      -d '{
        "text": "Contact John Doe at john@example.com or call +1-555-1234"
      }'

    # Save the mapping from response
    # {
    #   "text": "Contact <PERSON_1> at <EMAIL_ADDRESS_1> or call <PHONE_NUMBER_1>",
    #   "mapping": {
    #     "<PERSON_1>": "John Doe",
    #     "<EMAIL_ADDRESS_1>": "john@example.com",
    #     "<PHONE_NUMBER_1>": "+1-555-1234"
    #   }
    # }

    # Step 2: Send tokenized text to AI (not shown)

    # Step 3: Detokenize to restore original
    curl -X POST https://api.blindfold.dev/api/public/v1/detokenize \
      -H "X-API-Key: your-api-key-here" \
      -H "Content-Type: application/json" \
      -d '{
        "text": "We received: Contact <PERSON_1> at <EMAIL_ADDRESS_1>",
        "mapping": {
          "<PERSON_1>": "John Doe",
          "<EMAIL_ADDRESS_1>": "john@example.com"
        }
      }'

    # Response:
    # {
    #   "text": "We received: Contact John Doe at john@example.com"
    # }
    ```
  </Tab>
</Tabs>

<Info>
  **Complete Privacy Flow**: Tokenize → Process with AI → Detokenize

  This ensures AI providers never see real PII, meeting GDPR and EU AI Act requirements.
</Info>

## Response Format

All responses include:

* `text` - Protected text
* `entities_count` - Number of PII items found
* `detected_entities` - Details about what was found
* `mapping` - Token mapping (tokenize only)

## Use Policies for Easy Compliance

Instead of specifying entities manually, use pre-configured compliance policies:

<Tabs>
  <Tab title="Python">
    ```python theme={null}
    # GDPR compliance (European data)
    response = client.tokenize(
        "Contact: John Doe, john@example.com, +49 30 12345",
        policy="gdpr_eu"
    )

    # HIPAA compliance (Healthcare data)
    response = client.tokenize(
        "Patient: Jane Smith, SSN: 123-45-6789",
        policy="hipaa_us"
    )
    ```
  </Tab>

  <Tab title="JavaScript">
    ```javascript theme={null}
    // GDPR compliance (European data)
    const response = await client.tokenize(
      "Contact: John Doe, john@example.com, +49 30 12345",
      { policy: "gdpr_eu" }
    );

    // HIPAA compliance (Healthcare data)
    const response2 = await client.tokenize(
      "Patient: Jane Smith, SSN: 123-45-6789",
      { policy: "hipaa_us" }
    );
    ```
  </Tab>

  <Tab title="Java">
    ```java theme={null}
    // GDPR compliance (European data)
    var response = client.tokenize(
        "Contact: John Doe, john@example.com, +49 30 12345"
    );

    // HIPAA compliance (Healthcare data)
    var response2 = client.tokenize(
        "Patient: Jane Smith, SSN: 123-45-6789"
    );
    ```
  </Tab>

  <Tab title="Go">
    ```go theme={null}
    // GDPR compliance (European data)
    result, _ := client.Tokenize(ctx,
        "Contact: John Doe, john@example.com, +49 30 12345",
        blindfold.WithCallPolicy("gdpr_eu"),
    )

    // HIPAA compliance (Healthcare data)
    result2, _ := client.Tokenize(ctx,
        "Patient: Jane Smith, SSN: 123-45-6789",
        blindfold.WithCallPolicy("hipaa_us"),
    )
    ```
  </Tab>

  <Tab title=".NET">
    ```csharp theme={null}
    // GDPR compliance (European data)
    var result = await client.TokenizeAsync(
        "Contact: John Doe, john@example.com, +49 30 12345",
        policy: "gdpr_eu"
    );

    // HIPAA compliance (Healthcare data)
    var result2 = await client.TokenizeAsync(
        "Patient: Jane Smith, SSN: 123-45-6789",
        policy: "hipaa_us"
    );
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={null}
    # GDPR compliance
    curl -X POST https://api.blindfold.dev/api/public/v1/tokenize \
      -H "X-API-Key: your-api-key-here" \
      -H "Content-Type: application/json" \
      -d '{
        "text": "Contact: John Doe, john@example.com",
        "policy": "gdpr_eu"
      }'
    ```
  </Tab>
</Tabs>

**Available Policies:**

* `basic` - Names, emails, phones
* `gdpr_eu` - GDPR compliance
* `hipaa_us` - Healthcare compliance
* `pci_dss` - Payment card compliance
* `strict` - Maximum protection

## Next Steps

Now that you have made your first API call, explore more features:

<CardGroup cols={2}>
  <Card title="Python SDK Guide" icon="python" href="/sdks/python-sdk">
    Learn about all Python SDK features and methods.
  </Card>

  <Card title="JavaScript SDK Guide" icon="js" href="/sdks/javascript-sdk">
    Explore JavaScript/TypeScript SDK capabilities.
  </Card>

  <Card title="Java SDK Guide" icon="java" href="/sdks/java-sdk">
    Sync and async clients for Java 11+.
  </Card>

  <Card title="Go SDK Guide" icon="golang" href="/sdks/go-sdk">
    Zero-dependency SDK with context support.
  </Card>

  <Card title=".NET SDK Guide" icon="microsoft" href="/sdks/dotnet-sdk">
    async/await for .NET 6, 8, and Standard 2.1.
  </Card>

  <Card title="REST API Reference" icon="terminal" href="/api-reference/rest-api">
    Complete API endpoint documentation.
  </Card>

  <Card title="AI Integrations" icon="puzzle-piece" href="/integrations">
    OpenAI, Anthropic Claude, Gemini, LangChain, and more.
  </Card>

  <Card title="See Examples" icon="code" href="/examples">
    Real-world use cases and integration patterns.
  </Card>
</CardGroup>

## Need Help?

<Card title="Support" icon="headset" href="mailto:support@blindfold.dev" horizontal>
  Contact us at [support@blindfold.dev](mailto:support@blindfold.dev) for support and questions.
</Card>
