Support: support@tinplate.dev · Zero-Retention Edge Security Support Trust Center DPA GitHub Issues
Security & Secrets Tier 1 All-Access

Secret Scanner & Log Redaction API — Detect & Mask API Keys, JWTs & Tokens

Detect and mask leaked API keys, JWTs, and private keys in logs, diffs, and prompts. Scan logs, diffs, and LLM prompts for leaked AWS keys, GitHub tokens, Stripe keys, Slack webhooks, JWTs, and private keys with reversible redaction.

Additional endpoints in this module: POST /v1/secret-scanner/restore

Interactive Sandbox · No API Key Required 200 OK · Ready
POST /v1/secret-scannerinput
200 OK sample / live responsejson
{
  "ok": true,
  "data": {
    "verdict": "block",
    "risk_score": 55,
    "redacted_text": "Authorization: Bearer [SECRET_STRIPE_KEY_1]",
    "findings": [
      {
        "type": "STRIPE_KEY",
        "severity": "critical",
        "start": 22,
        "end": 61,
        "line": 1,
        "replacement": "[SECRET_STRIPE_KEY_1]",
        "entropy": 4.88,
        "validated": true
      }
    ],
    "counts": {
      "STRIPE_KEY": 1
    },
    "total_secrets": 1,
    "tokens": {
      "[SECRET_STRIPE_KEY_1]": "sk_live_51Nq9abcDEF1234567890ghijklMNOP"
    }
  },
  "meta": {
    "request_id": "req_sec_01",
    "ms": 1
  }
}
OpenAPI 3.0.3 Get All-Access Key ($29/mo) No signup. No payload storage.
Quickstart Code Examples
curl -X POST "https://api.tinplate.dev/v1/secret-scanner" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $TINPLATE_KEY" \
  -d '{"text":"Authorization: Bearer sk_live_51Nq9abcDEF1234567890ghijklMNOP","mode":"token"}'
import { TinplateClient } from "@tinplate/sdk";

const tinplate = new TinplateClient({
  apiKey: process.env.TINPLATE_API_KEY!,
});

const { data, meta } = await tinplate.call("/v1/secret-scanner", {
  "text": "Authorization: Bearer sk_live_51Nq9abcDEF1234567890ghijklMNOP",
  "mode": "token"
});
console.log(`[${meta.ms} ms]`, data);
import requests

response = requests.post(
    "https://api.tinplate.dev/v1/secret-scanner",
    headers={
        "Content-Type": "application/json",
        "Authorization": "Bearer YOUR_TINPLATE_KEY",
    },
    json={
  "text": "Authorization: Bearer sk_live_51Nq9abcDEF1234567890ghijklMNOP",
  "mode": "token"
}
)
print(response.json())
const response = await fetch("https://api.tinplate.dev/v1/secret-scanner", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Authorization": "Bearer YOUR_TINPLATE_KEY",
  },
  body: JSON.stringify({
  "text": "Authorization: Bearer sk_live_51Nq9abcDEF1234567890ghijklMNOP",
  "mode": "token"
}),
});
const result = await response.json();
console.log(result);
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "tinplate_secret_scanner",
    "arguments": {
      "text": "Authorization: Bearer sk_live_51Nq9abcDEF1234567890ghijklMNOP",
      "mode": "token"
    }
  }
}
OpenAPI 3.0.3 Schema Contract

Request Parameters & Response Schema Reference

Request Body Parameters (POST /v1/secret-scanner)

ParameterType & ConstraintsDescription
text required string
minLen: 1, maxLen: 262144
Raw log output, .env file, code snippet, or unified git diff to scan.
mode optional "token" | "mask" | "partial"
default: "token"
'token' replaces each unique secret with [SECRET_<TYPE>_<N>] and returns a caller-only map; 'mask' replaces with [REDACTED:<TYPE>]; 'partial' preserves a short prefix/suffix.
types optional string[] Optional allowlist of secret types to scan for. Scans all 28 types when omitted.
diff_only_added optional boolean
default: false
When true on a unified git diff, ignores removed lines ('-...') and only scans added/context lines.
min_entropy optional number
min: 2.5, max: 6, default: 3.8
Minimum Shannon entropy (bits/char) required for GENERIC_HIGH_ENTROPY matches.

Response data Object Fields (200 OK)

FieldTypeDescription
verdict "allow" | "warn" | "block" Field 'verdict'
risk_score integer Field 'risk_score'
redacted_text string Field 'redacted_text'
findings object[] Field 'findings'
counts object Field 'counts'
total_secrets integer Field 'total_secrets'
tokens object Token-to-secret lookup map (populated only when mode === 'token', never persisted).

What Log Redact & Secret Scanner API Detects & Validates

  • 28 secret categories & 38+ high-precision credential signatures: AWS AKIA/ASIA, GitHub ghp_/github_pat_, GitLab glpat-, Stripe sk_live_/rk_live_, Slack xoxb-/xoxp- & webhooks, OpenAI, Anthropic, Google AI/GCP, HuggingFace hf_, SendGrid, Twilio, Mailgun, NPM, PyPI, Docker, Shopify, Databricks, DigitalOcean, Linear, Supabase, Postman, Discord, and Telegram
  • Cryptographic material & URIs: RSA/EC/DSA/OpenSSH/PGP PEM private keys, JWT tokens, Basic/Bearer Auth headers, and database connection URIs (Postgres, MySQL, MongoDB, Redis, AMQP)
  • Shannon entropy detector for generic high-entropy assignments (api_key = '...') with false-positive filtering for UUIDs, 40/64-char hex SHAs, SRI hashes, and file paths
  • Reversible placeholder masking + POST /v1/secret-scanner/restore endpoint
Honest Engineering Boundaries

Known Limitations & Test Verification

Release: v1.0.39 · Verified: 16 November 2026 · Portfolio Median: 0.318 ms in-Worker V8 compute (add 15–65 ms HTTPS RTT) · See Full Portfolio Benchmarks →

  • Benchmark v1.0.39 (60-case corpus across 28 secret categories + 20 benign logs/UUIDs/SHAs): 100.0% recall (40/40 structured & high-entropy secrets detected, 0 misses), 0.0% false-positive rate (0/20 benign cases flagged), P50 0.044 ms / P99 8.129 ms in deterministic mode.
  • Near-zero misses on well-defined vendor prefix formats (AWS, GitHub, Stripe, Slack, etc.); generic unprefixed high-entropy detection is heuristic and intentionally tunes out UUIDs, Git SHAs, and lockfile SRI hashes to prevent false positives.
  • Does not make live outbound calls to vendor APIs to verify whether a leaked key is still active.

Direct All-Access & Marketplace Plans

Direct Polar All-Access Keys unlock all 42 APIs (49 endpoints), /v1/pipeline, and /mcp on api.tinplate.dev: Pro ($29/mo · 120 req/min · 100k/mo · 128 KB) or Team ($79/mo · 300 req/min · 500k/mo · 256 KB).

PlanMonthly PriceIncluded RequestsRate LimitMax PayloadBest For
BASIC$0.00 / mo500 / month10 req / min64 KBEvaluation & CI smoke tests
PRO$9.99 / mo15,000 / month60 req / min128 KBSolo devs & production apps
ULTRA$29.99 / mo100,000 / month300 req / min256 KBGrowing SaaS & multi-agent pipelines
MEGA$79.99 / mo500,000 / month1,000 req / min256 KBHigh-volume enterprise workloads

Frequently Asked Questions

Is it safe to send logs containing secrets to this API?

Tinplate runs with Cloudflare Workers Observability and invocation logging completely disabled (observability.enabled = false). Payloads are processed in volatile memory and immediately garbage-collected.

How does it avoid false positives on UUIDs or Git commit hashes?

UUIDs, 40-char hex git SHAs, CSS hashes, and common lockfile integrity hashes are explicitly filtered before entropy scoring.

Can I use it alongside the PII Redactor API?

Yes—run Secret Scanner on logs/code diffs and PII Redactor on customer support text or combine both before LLM ingestion.

Zero Payload Logging

Data Handling, Privacy & Proxy Disclosure

Critical security guarantee: scanned secrets and logs exist strictly in volatile V8 memory for ~1 ms and are never logged or stored anywhere.

Worker Zero-Logging Guarantee: Cloudflare Workers Observability and invocation logging are disabled (observability.enabled = false, head_sampling_rate = 0, invocation_logs = false). Requests via RapidAPI or Zyla traverse marketplace proxies; use a Direct Bearer Key for zero-intermediary routing.

Related Tinplate APIs

POST /v1/pii-redactor Live

PII Redactor API

Mask emails, phones, IBANs, cards, and EU IDs with reversible tokens before LLM calls.

POST /v1/prompt-guard Live

Prompt Injection Detection API

Catch prompt injections, role hijacks, and encoded jailbreaks in user inputs and RAG chunks.

POST /v1/mcp-manifest-linter Tier 1

MCP Server Manifest & Tool Security Linter API

Audit MCP server manifests for hidden tool poisoning, shell risks, and excessive permissions.