Unprofane
DocsSDKs

SDKs

The JavaScript and Python clients: typed, no dependencies beyond the runtime, retries with jitter, and a batch helper for any number of texts.

Both clients wrap the same endpoints with the same field names as the API reference, so nothing in them can drift from the contract without the contract changing. Both retry a 429, 502, 503 or 504 with jitter and honor Retry-After; any other failure raises an error carrying the problem details and the request id.

JavaScript and TypeScript#

Shell
npm install @unprofane/sdk
TypeScript
import { Unprofane } from '@unprofane/sdk';

const unprofane = new Unprofane(process.env.UNPROFANE_API_KEY!);
const r = await unprofane.check({ text: 'xXsh1tXx', context: 'username', policy: 'teen' });
if (!r.allowed) console.log(r.action, r.evasion, r.censored);

// Any number of texts, chunked into batches of up to 100 texts and 30,000 characters, results in order.
const results = await unprofane.checkMany(comments, { context: 'comment' });

check, checkBatch, checkMany, feedback, usage, getList, putList, deleteList. Works in Node 18 and later, Bun, Deno, Workers, and browsers with a publishable key. Options: baseUrl, retries (3), timeoutMs (10,000), fetch.

Python#

Shell
pip install unprofane
Python
from unprofane import Unprofane

client = Unprofane("up_live_YOUR_KEY")
r = client.check("xXsh1tXx", context="username", policy="teen")
if not r["allowed"]:
    print(r["action"], r["evasion"], r["censored"])
Python
from unprofane import AsyncUnprofane

async with AsyncUnprofane("up_live_YOUR_KEY") as client:
    results = await client.check_many(comments, context="comment", concurrency=4)

check, check_batch, check_many, feedback, usage, get_list, put_list, delete_list, sync and async. Python 3.9 and later; the only dependency is httpx.

Everything else#

Eight languages of plain HTTP are in the API reference, and the MCP server gives an agent the same calls as tools. To check texts in bulk without writing code, run the Unprofane Actor on Apify with your key: give it a list of texts or another Actor’s dataset (scraped comments, say), and it writes one row per text with the action, the matched words and the reason.