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.
Python
JavaScript
Java
Go
.NET
Copy
pip install blindfold-sdk
Copy
from blindfold import Blindfold# No API key needed — runs entirely in-processclient = 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>"
Copy
npm install @blindfold/sdk
Copy
import { Blindfold } from '@blindfold/sdk';// No API key needed — runs entirely in-processconst 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>"
import dev.blindfold.sdk.Blindfold;// No API key needed — runs entirely in-processBlindfold 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>"
Copy
go get github.com/blindfold-dev/Blindfold/packages/go-sdk
Copy
import blindfold "github.com/blindfold-dev/Blindfold/packages/go-sdk"// No API key needed — runs entirely in-processclient := 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>"
Copy
dotnet add package Blindfold.Sdk
Copy
using Blindfold.Sdk;// No API key needed — runs entirely in-processusing 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>"
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.
Need NLP-powered detection (names, addresses, organizations), compliance policies, or audit logs? Continue below to set up the optional Cloud API.
Choose your preferred integration method and make your first request.
Python
JavaScript
Java
Go
.NET
cURL
Install the Python SDK and tokenize your first text.
Copy
pip install blindfold-sdk
Copy
from blindfold import Blindfold# Initialize the clientclient = Blindfold(api_key="your-api-key-here")# Tokenize text with sensitive dataresponse = 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'}
The SDK automatically handles API authentication and request formatting.
Install the JavaScript SDK and tokenize your first text.
Copy
npm install @blindfold/sdk
Copy
import { Blindfold } from '@blindfold/sdk';// Initialize the clientconst client = new Blindfold({ apiKey: 'your-api-key-here'});// Tokenize text with sensitive dataconst 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'}
The SDK works in both Node.js and browser environments.
Install the Java SDK and tokenize your first text.
import dev.blindfold.sdk.Blindfold;// Initialize the clientBlindfold client = new Blindfold("your-api-key-here");// Tokenize text with sensitive datavar 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}
The SDK works with Java 11+ and has no external HTTP dependencies.
Install the Go SDK and tokenize your first text.
Copy
go get github.com/blindfold-dev/Blindfold/packages/go-sdk
Copy
import blindfold "github.com/blindfold-dev/Blindfold/packages/go-sdk"// Initialize the clientclient := blindfold.New(blindfold.WithAPIKey("your-api-key-here"))// Tokenize text with sensitive dataresult, 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]
The SDK has zero external dependencies — uses only the Go standard library.
Install the .NET SDK and tokenize your first text.
Copy
dotnet add package Blindfold.Sdk
Copy
using Blindfold.Sdk;// Initialize the clientusing var client = new BlindfoldClient("your-api-key-here");// Tokenize text with sensitive datavar 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}
The SDK targets net6.0, net8.0, and netstandard2.1. Zero external dependencies.
Make a direct API call using cURL or any HTTP client.
Copy
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" }'
After sending tokenized data to AI or processing, you can restore the original values using the mapping.
Python
JavaScript
Java
Go
.NET
cURL
Copy
from blindfold import Blindfoldclient = Blindfold(api_key="your-api-key-here")# Step 1: Tokenize sensitive dataprotected = 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 dataoriginal = 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"
Store the mapping securely. Without it, you cannot restore original values.
Copy
import { Blindfold } from '@blindfold/sdk';const client = new Blindfold({ apiKey: 'your-api-key-here' });// Step 1: Tokenize sensitive dataconst 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 dataconst 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"
Copy
import dev.blindfold.sdk.Blindfold;Blindfold client = new Blindfold("your-api-key-here");// Step 1: Tokenize sensitive datavar 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 datavar 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"
Copy
import blindfold "github.com/blindfold-dev/Blindfold/packages/go-sdk"client := blindfold.New(blindfold.WithAPIKey("your-api-key-here"))// Step 1: Tokenize sensitive dataprotected, _ := 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 dataoriginal := 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"
Copy
using Blindfold.Sdk;using var client = new BlindfoldClient("your-api-key-here");// Step 1: Tokenize sensitive datavar 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 datavar 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"
Copy
# Step 1: Tokenizecurl -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 originalcurl -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"# }
Complete Privacy Flow: Tokenize → Process with AI → DetokenizeThis ensures AI providers never see real PII, meeting GDPR and EU AI Act requirements.