Developer SDK & CLI

Integrate Frisby compliance into your apps and pipelines with our JavaScript SDK and command-line tool.

Quick Start

# Install the SDK
npm install @frisby/sdk
import { FrisbyClient } from '@frisby/sdk';

const frisby = new FrisbyClient({ apiKey: 'your-api-key' });

// Run a compliance audit
const result = await frisby.audit({
  text: 'Your content here...',
  mode: 'full',
  industry: 'finance'
});

console.log(result.score, result.findings);
# Audit a document
frisby audit ./document.md --industry finance --threshold 80

# Compare two versions
frisby compare ./v1.md ./v2.md --format table

# Pre-publication gate check
frisby gate ./content.txt --threshold 85

# Upload and audit a PDF
frisby upload ./report.pdf --action audit

Features

🔎

Content Auditing

Single audit, batch processing, and pipeline integration for any content type.

Auto-Remediation

Automatically fix compliance issues with context-aware AI suggestions.

📄

A/B Comparison

Compare two content versions side by side and track compliance deltas.

🌐

URL Monitoring

Create persistent compliance agents that monitor live pages over time.

📝

Custom Rules

Define your own compliance rules and industry-specific guidelines.

CI/CD Integration

GitHub Actions, GitLab CI, and any pipeline with our CLI gate command.

SDK Methods

MethodDescription
frisby.audit(opts)Full compliance audit
frisby.remediate(opts)Auto-fix compliance issues
frisby.compare(opts)Compare two texts
frisby.gate(opts)Pre-publication gate check
frisby.batch(opts)Batch processing
frisby.upload(file, opts)Document upload and audit
frisby.createMonitor(opts)URL monitoring agent
frisby.getRules() / frisby.saveRules(rules)Custom rules management
frisby.explainFinding(opts)Deep regulatory explanation
frisby.multiLangAudit(opts)Multi-language audit
frisby.generateReport(opts)Compliance reports
frisby.generatePolicy(opts)Policy generation

Code Examples

Each SDK method in JavaScript, Python, cURL, and Go.

audit()

const result = await frisby.audit({
  text: 'Your content here...',
  mode: 'full',
  industry: 'finance'
});
console.log(result.score, result.findings);
result = frisby.audit(
    text="Your content here...",
    mode="full",
    industry="finance"
)
print(result["score"], result["findings"])
curl -X POST https://api.frisby.ai/v1/audit \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "Your content here...",
    "mode": "full",
    "industry": "finance"
  }'
result, err := client.Audit(ctx, &frisby.AuditRequest{
    Text:     "Your content here...",
    Mode:     "full",
    Industry: "finance",
})
fmt.Println(result.Score, result.Findings)

remediate()

const fixed = await frisby.remediate({
  text: 'Non-compliant content...',
  industry: 'healthcare',
  tone: 'professional'
});
console.log(fixed.remediated);
fixed = frisby.remediate(
    text="Non-compliant content...",
    industry="healthcare",
    tone="professional"
)
print(fixed["remediated"])
curl -X POST https://api.frisby.ai/v1/remediate \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "Non-compliant content...",
    "industry": "healthcare",
    "tone": "professional"
  }'
fixed, err := client.Remediate(ctx, &frisby.RemediateRequest{
    Text:     "Non-compliant content...",
    Industry: "healthcare",
    Tone:     "professional",
})
fmt.Println(fixed.Remediated)

compare()

const diff = await frisby.compare({
  textA: 'Original version...',
  textB: 'Revised version...',
  industry: 'finance'
});
console.log(diff.scoreA, diff.scoreB, diff.delta);
diff = frisby.compare(
    text_a="Original version...",
    text_b="Revised version...",
    industry="finance"
)
print(diff["score_a"], diff["score_b"], diff["delta"])
curl -X POST https://api.frisby.ai/v1/compare \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "text_a": "Original version...",
    "text_b": "Revised version...",
    "industry": "finance"
  }'
diff, err := client.Compare(ctx, &frisby.CompareRequest{
    TextA:    "Original version...",
    TextB:    "Revised version...",
    Industry: "finance",
})
fmt.Println(diff.ScoreA, diff.ScoreB, diff.Delta)

gate()

const check = await frisby.gate({
  text: 'Content to publish...',
  threshold: 85,
  industry: 'finance'
});
if (check.pass) console.log('Ready to publish');
check = frisby.gate(
    text="Content to publish...",
    threshold=85,
    industry="finance"
)
if check["pass"]:
    print("Ready to publish")
curl -X POST https://api.frisby.ai/v1/gate \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "Content to publish...",
    "threshold": 85,
    "industry": "finance"
  }'
check, err := client.Gate(ctx, &frisby.GateRequest{
    Text:      "Content to publish...",
    Threshold: 85,
    Industry:  "finance",
})
if check.Pass {
    fmt.Println("Ready to publish")
}

upload()

const fs = await import('fs');
const file = fs.createReadStream('./report.pdf');
const result = await frisby.upload(file, {
  action: 'audit',
  industry: 'finance'
});
console.log(result.score);
with open("report.pdf", "rb") as f:
    result = frisby.upload(
        file=f,
        action="audit",
        industry="finance"
    )
print(result["score"])
curl -X POST https://api.frisby.ai/v1/upload \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F 'file=@report.pdf' \
  -F 'action=audit' \
  -F 'industry=finance'
f, _ := os.Open("report.pdf")
defer f.Close()
result, err := client.Upload(ctx, f, &frisby.UploadOpts{
    Action:   "audit",
    Industry: "finance",
})
fmt.Println(result.Score)

API Playground

Test endpoints directly from your browser using your API key.

Request Body
Response
Response will appear here...

GitHub Actions

- name: Frisby Compliance Check
  run: |
    npx @frisby/cli gate ./content/*.md \
      --api-key ${{ secrets.FRISBY_API_KEY }} \
      --threshold 80

Webhook Integration

Receive real-time notifications when audits complete, monitors trigger, or gate checks finish.

1. Register a webhook endpoint

curl -X POST https://api.frisby.ai/v1/webhooks \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://your-app.com/webhooks/frisby",
    "events": ["audit.complete", "monitor.alert", "gate.result"],
    "secret": "whsec_your_signing_secret"
  }'

2. Sample webhook payload

{
  "id": "evt_a1b2c3d4",
  "type": "audit.complete",
  "created": "2026-05-11T14:30:00Z",
  "data": {
    "audit_id": "aud_x9y8z7",
    "score": 87,
    "pass": true,
    "findings_count": 3,
    "industry": "finance",
    "threshold": 80
  }
}

3. Verify HMAC signature

import crypto from 'crypto';

function verifyWebhook(payload, signature, secret) {
  const expected = crypto
    .createHmac('sha256', secret)
    .update(payload)
    .digest('hex');
  return crypto.timingSafeEqual(
    Buffer.from(signature),
    Buffer.from('sha256=' + expected)
  );
}
import hmac, hashlib

def verify_webhook(payload: bytes, signature: str, secret: str) -> bool:
    expected = hmac.new(
        secret.encode(), payload, hashlib.sha256
    ).hexdigest()
    return hmac.compare_digest(
        signature, f"sha256={expected}"
    )

Rate Limits

PlanRequests / minBurst
Free35
Essentials1015
Professional3045
Enterprise60100

Rate-limited responses return 429 Too Many Requests with a Retry-After header.

Ready to integrate?

Get started with the Frisby SDK in minutes.

Get your API key View full docs