@deckrd/sdk
v0.1.2
Published
Deckrd: AI-vs-human detection. Drop-in SDK for vibe coders and app developers. Detection runs locally, message content never leaves your device.
Maintainers
Readme
@deckrd/sdk
AI-vs-human detection. Drop-in for vibe coders, app developers, and B2B integrators. Detection runs locally — message content never leaves your runtime.
npm install @deckrd/sdkQuickstart
import { Deckrd } from '@deckrd/sdk';
const deckrd = new Deckrd({
licenseKey: process.env.DECKRD_LICENSE_KEY, // optional; free tier works without
});
const result = await deckrd.score({
messages: [
{ direction: 'incoming', content: 'hey there!', timestamp: Date.now() },
{ direction: 'incoming', content: 'I noticed your profile…', timestamp: Date.now() },
],
});
console.log(result);
// {
// score: 0.78,
// label: 'ai_likely',
// confidence: 0.62,
// perDetector: { temporal: 0.5, linguistic: 0.4, ... },
// modelVersion: '0.1.0+lex@2026-05-07'
// }Streaming sessions
const session = deckrd.session({ conversationId: 'chat-abc' });
session.add({ direction: 'incoming', content: 'hi!', timestamp: Date.now() });
session.add({ direction: 'outgoing', content: 'hey', timestamp: Date.now() });
const verdict = session.score();Each score() is one billable detection. Customer controls re-evaluation cadence.
Privacy claim — auditable
The SDK only ever makes three network calls, all of which are visible
in this source. Grep for fetch( to verify.
| Call | What it carries | When |
|------|-----------------|------|
| License validate | hashed key, no content | Lazy, cached 24h |
| Usage ping | per-period count + label distribution, no content | Batched periodically |
| Config OTA | one-way pull of lexicon updates (paid only) | Weekly or on refreshConfig() |
Message content never leaves the consumer's runtime.
Tiers
| | Free | Developer | Business | Enterprise | |---|------|-----------|----------|------------| | Detections / month | 10,000 (hard cap) | metered | metered, volume discount | custom | | Lexicons | npm-package version | OTA, weekly | OTA, push within 24h | custom | | Attribution badge | required | suppressible | suppressible | suppressible | | Modality access | text | text + voice (when shipped) | all | all |
Get a license key at deckrd.ai/account.
Sub-modules
import { Deckrd } from '@deckrd/sdk'; // full
import { Deckrd } from '@deckrd/sdk/text'; // text only (smaller bundle in v2+)
import { DeckrdBadge } from '@deckrd/sdk/badge'; // attribution component@deckrd/sdk/voice, @deckrd/sdk/image, @deckrd/sdk/video are
reserved namespaces that ship with the corresponding modality.
Attribution badge (free tier)
import { DeckrdBadge } from '@deckrd/sdk/badge';
<DeckrdBadge />Vanilla equivalent:
import { renderBadge } from '@deckrd/sdk/badge';
renderBadge(document.getElementById('deckrd-badge'));Runtime support
Node 20+, modern browsers (ES2022), Cloudflare Workers, Vercel Edge,
Deno (via npm: specifier), React Native, Bun.
Native iOS/Android and wearables ship later via WASM build.
License
FSL-1.1-MIT — source-available, becomes MIT after 2 years. You can read, audit, modify, and embed Deckrd in your own products under the Permitted Purpose grant. Use the Software to build a competing detection product, and you don't have a license. Everything else is fair game.
