WritersLogic Verifiable AI Agent Hub Redact Text API
The Redact Text API from WritersLogic Verifiable AI Agent Hub — 1 operation(s) for redact text.
The Redact Text API from WritersLogic Verifiable AI Agent Hub — 1 operation(s) for redact text.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/writerslogic-com:writerslogic-com-redact-text-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: WritersLogic Verifiable AI Agent Hub Redact Text API
version: 2.0.0
description: Pay-per-call agents settled in USDC on Base via x402. Every response carries a signed provenance envelope.
contact:
name: WritersLogic
url: https://writerslogic.com/agents
email: agents@writerslogic.com
servers:
- url: https://agents.writerslogic.com
tags:
- name: Redact Text
paths:
/api/v1/redact-text:
post:
operationId: redact_text
summary: Selective PII redaction with a self-check
description: 'Redacts detected personal data at the level you choose and rescans the output with the same rules. This self-check does not prove that all personal data is gone. Pick a level: 1 government identifiers (SSN, ITIN, EIN, UK NINO, Canadian SIN, driver''s license, passport), 2 adds dates of birth, 3 adds street addresses and phone numbers, 4 adds person names and email addresses. Then switch single categories on or off with include and exclude, or name the exact set with categories; extras are credit cards, IBANs, routing and account numbers, IP addresses, URLs, every date, and organizations. minDigitRun redacts any run of that many digits, terms redacts words you list (business names, project names), and keep protects strings such as your own email address. Detectors use checksums and structure rules (Luhn, ABA, mod-97, SSN and EIN rules) so ordinary numbers are not swallowed, and every later mention of a redacted value is redacted too. Replacements are labels like [REDACTED:SSN], one generic marker, numbered tokens like [PERSON_2] that stay consistent, or labels that keep the last four characters. The response lists category, position and confidence for each redaction and never repeats the original values. The engine rescans its own output and returns an error (payment released) rather than a result that still contains a detected value. Names and organizations are heuristic; set useModel to add a model pass for names, organizations and addresses, which sends the text to the configured language-model provider. Text only, up to 1,000,000 characters (the request body may be up to 4 MB of UTF-8); nothing is stored and no digest of the input is returned.
Price: 0.02 USDC on Base (x402).'
x-x402-price-usdc: '0.02'
x-x402-amount: '20000'
x-payment-info:
protocols:
- x402
price:
mode: fixed
currency: USD
amount: '0.02'
x-audience: business
x-sample-url: https://agents.writerslogic.com/api/v1/samples/redact-text
security:
- x402: []
- apiKey: []
requestBody:
required: true
content:
application/json:
schema:
type: object
additionalProperties: false
required:
- text
properties:
text:
type: string
minLength: 1
maxLength: 1000000
description: The document text to redact (plain text, Markdown, CSV, JSON or HTML source).
level:
type: integer
minimum: 1
maximum: 4
description: 'Cumulative preset, default 1. 1: government identifiers (SSN, ITIN, EIN, UK NINO, Canadian SIN, driver''s license, passport); 2: level 1 plus dates of birth; 3: level 2 plus street addresses and phone numbers; 4: level 3 plus person names and email addresses.'
categories:
type: array
maxItems: 20
items:
type: string
enum:
- ssn
- itin
- ein
- nino
- sin
- drivers_license
- passport
- date_of_birth
- address
- phone
- person_name
- email
- credit_card
- iban
- routing_number
- account_number
- ip_address
- url
- date
- organization
description: Exact set of categories to redact; replaces the level preset when given.
include:
type: array
maxItems: 20
items:
type: string
enum:
- ssn
- itin
- ein
- nino
- sin
- drivers_license
- passport
- date_of_birth
- address
- phone
- person_name
- email
- credit_card
- iban
- routing_number
- account_number
- ip_address
- url
- date
- organization
description: Categories to add to the level preset.
exclude:
type: array
maxItems: 20
items:
type: string
enum:
- ssn
- itin
- ein
- nino
- sin
- drivers_license
- passport
- date_of_birth
- address
- phone
- person_name
- email
- credit_card
- iban
- routing_number
- account_number
- ip_address
- url
- date
- organization
description: Categories to remove from the level preset.
minDigitRun:
type: integer
minimum: 4
maximum: 40
description: Also redact every run of at least this many digits (spaces, dots and hyphens between digits count as part of the run). This is the number of digits, not the numeric value.
terms:
type: array
maxItems: 200
items:
type: string
minLength: 1
maxLength: 200
description: Words or phrases to redact wherever they appear (business names, project names, people you already know). Case-insensitive.
keep:
type: array
maxItems: 200
items:
type: string
minLength: 1
maxLength: 200
description: Strings that must never be redacted, such as your own email address or company name. Case-insensitive, whole match.
style:
type: string
enum:
- label
- generic
- numbered
- last4
description: 'label (default): [REDACTED:SSN]. generic: [REDACTED]. numbered: [PERSON_1], same value same number. last4: [REDACTED:SSN:*6789] for numeric identifiers; this discloses the last four characters.'
useModel:
type: boolean
description: Add a language-model pass for names, organizations and addresses (when those categories are on). Sends the text, up to 60000 characters, to the configured model provider. Default false.
example:
text: 'Patient: Maria Gonzalez, DOB 04/12/1980, SSN 123-45-6789. Reach her at maria.gonzalez@example.org or (555) 010-0199. Maria Gonzalez was seen at Acme Clinic, Inc.'
level: 4
include:
- organization
style: label
responses:
'200':
description: Paid result with provenance
content:
application/json:
schema:
type: object
properties:
data:
type: object
properties:
redactedText:
type: string
status:
type: string
enum:
- complete
summary:
type: object
description: total redactions, byCategory counts and charactersRemoved.
redactions:
type: array
items:
type: object
description: category, start and end offsets into the ORIGINAL text, length, the replacement written, confidence (validated, pattern, context, heuristic, model) and the rule. The original value is never included.
verification:
type: object
description: passed, residualDetections (rescan of the output), leakedValues (redacted values found again), distinctValues and outputSha256. No digest of the input is returned or signed, because a digest of guessable text would let a recipient recover what was redacted.
config:
type: object
description: The level, final category list, minDigitRun, style and useModel actually applied.
coverage:
type: array
items:
type: object
description: 'For each enabled category: count redacted, method and what it can and cannot find.'
limits:
type: array
items:
type: string
deterministic:
type: boolean
description: True when no model was used.
_provenance:
type: object
description: C2PA-aligned manifest and W3C VC 2.0 (eddsa-jcs-2022) issued by the hub DID; verify at POST /api/v1/verify-provenance
required:
- data
- _provenance
'400':
description: Invalid request (no payment consumed)
content:
application/json:
schema:
type: object
properties:
error:
type: string
code:
type: string
'401':
description: Invalid X-API-KEY
content:
application/json:
schema:
type: object
properties:
error:
type: string
code:
type: string
'402':
description: Payment required or invalid
content:
application/json:
schema:
type: object
description: x402 v2 PaymentRequired (also base64 in the PAYMENT-REQUIRED header)
properties:
x402Version:
type: integer
error:
type: string
code:
type: string
resource:
type: object
accepts:
type: array
items:
type: object
extensions:
type: object
'502':
description: Upstream failure; the payment is released or not settled
content:
application/json:
schema:
type: object
properties:
error:
type: string
code:
type: string
tags:
- Redact Text
components:
securitySchemes:
x402:
type: apiKey
in: header
name: PAYMENT-SIGNATURE
description: x402 v2 payment payload (base64) sent after a 402 challenge
apiKey:
type: apiKey
in: header
name: X-API-KEY