// Documentation
Everything you need to integrate Frisby AI Operations into your workflow. From quick-start authentication to advanced batch auditing, this guide covers the full platform.
Getting Started
Frisby AI Operations is an enterprise-grade platform that audits AI-generated content for accuracy, hallucinations, fabricated citations, and compliance violations. Submit documents via our REST API and receive detailed findings with severity scores, source verification, and framework-mapped compliance reports.
Authentication
All API requests require a valid API key. Generate keys from your Dashboard → Settings → API Keys panel. Include the key as a Bearer token in the Authorization header:
HTTPAuthorization: Bearer YOUR_API_KEY
API keys are scoped to your organization. You can create multiple keys with different permissions: read-only, audit, or admin.
Base URL
All endpoints are relative to:
URLhttps://api.frisbyaiops.com/v1
Rate Limits
Rate limits are enforced per API key. Exceeding limits returns 429 Too Many Requests.
| Tier | Requests / Hour | Burst |
|---|---|---|
| Essentials | 100 | 20/min |
| Professional | 500 | 60/min |
| Enterprise | 2,000 | 200/min |
| Lender | 5,000 | 500/min |
Response Format
All responses are returned as JSON. Successful responses use HTTP 200 or 201. Errors include a structured error object:
JSON{
"error": {
"code": "rate_limit_exceeded",
"message": "You have exceeded 100 requests/hour",
"retry_after": 42
}
}
API Reference
Complete reference for all Frisby AI Operations API endpoints. Each endpoint includes request/response examples with full JSON payloads.
Submit a document for accuracy auditing. Returns audit results with findings, severity scores, and framework mappings.
Request Body
JSON{
"document": "base64_encoded_content",
"format": "pdf",
"options": {
"frameworks": ["HIPAA", "SOX"],
"depth": "comprehensive",
"include_citations": true
}
}
Response
JSON{
"audit_id": "aud_7x9k2m",
"status": "completed",
"score": 72,
"findings": [
{
"id": "f_001",
"severity": "critical",
"type": "fabricated_citation",
"claim": "According to Harvard 2024 study...",
"evidence": "No matching publication found",
"location": { "page": 3, "paragraph": 2 },
"frameworks": ["SOX"]
}
],
"metadata": {
"claims_checked": 47,
"sources_verified": 31,
"processing_time_ms": 4200
}
}
Retrieve the results of a previously submitted audit. Returns the full audit object including findings and metadata.
| Parameter | Type | Description |
|---|---|---|
| audit_id | string | The unique audit identifier (e.g., aud_7x9k2m) |
Submit a document for underwriting validation. Verifies income statements, appraisals, and regulatory documents against known data sources.
Request Body
JSON{
"document": "base64_encoded_content",
"format": "pdf",
"validation_type": "underwriting",
"options": {
"check_income": true,
"check_appraisal": true,
"regulatory_frameworks": ["TRID", "HMDA"]
}
}
Response
JSON{
"validation_id": "val_3m8nq2",
"status": "completed",
"pass": false,
"flags": [
{ "field": "stated_income", "issue": "Exceeds IRS reported income by 34%" }
]
}
Generate a compliance report from existing audit results. Maps findings to regulatory frameworks and produces remediation steps.
Request Body
JSON{
"audit_id": "aud_7x9k2m",
"format": "pdf",
"include_remediation": true,
"frameworks": ["SOX", "HIPAA"]
}
Response
JSON{
"report_id": "rpt_9v2xk1",
"status": "generated",
"download_url": "https://api.frisbyaiops.com/v1/report/rpt_9v2xk1/download",
"expires_at": "2026-04-22T12:00:00Z"
}
List recent audits with pagination and filtering.
| Parameter | Type | Description |
|---|---|---|
| page | integer | Page number (default: 1) |
| limit | integer | Results per page (default: 20, max: 100) |
| status | string | Filter by status: completed, processing, failed |
| framework | string | Filter by compliance framework: HIPAA, SOX, etc. |
Permanently delete an audit and all associated data including findings, reports, and uploaded documents.
| Parameter | Type | Description |
|---|---|---|
| audit_id | string | The unique audit identifier |
Submit a batch of documents for auditing. Supports up to 500 documents per request with priority queue processing.
Request Body
JSON{
"documents": [
{ "id": "doc_1", "content": "base64...", "format": "pdf" },
{ "id": "doc_2", "content": "base64...", "format": "docx" }
],
"options": {
"frameworks": ["HIPAA"],
"depth": "standard",
"webhook_url": "https://your-app.com/webhook"
}
}
Response
JSON{
"batch_id": "bat_4k7m2n",
"status": "queued",
"document_count": 2,
"estimated_completion": "2026-04-21T14:30:00Z"
}
List all configured webhooks for your organization, including delivery status and event types.
Create a new webhook to receive POST notifications when audit events occur (completion, threshold alerts, failures).
Request Body
JSON{
"url": "https://your-app.com/frisby-webhook",
"events": ["audit.completed", "audit.failed", "score.threshold"],
"secret": "whsec_your_signing_secret"
}
Response
JSON{
"webhook_id": "wh_8n3kq1",
"status": "active",
"events": ["audit.completed", "audit.failed", "score.threshold"],
"created_at": "2026-04-21T10:00:00Z"
}
Integration Guide
Practical examples for integrating the Frisby API into your applications, CI/CD pipelines, and monitoring workflows.
cURL Examples
Submit an audit directly from the command line:
bash# Submit a document for auditing
curl -X POST https://api.frisbyaiops.com/v1/audit \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"document": "'$(base64 -w0 report.pdf)'",
"format": "pdf",
"options": { "frameworks": ["HIPAA"], "depth": "standard" }
}'
# Check audit status
curl https://api.frisbyaiops.com/v1/audit/aud_7x9k2m \
-H "Authorization: Bearer YOUR_API_KEY"
JavaScript / Node.js SDK
javascriptconst frisby = require('@frisbyai/sdk');
const fs = require('fs');
const client = new frisby.Client({ apiKey: 'your_api_key' });
const result = await client.audit({
document: fs.readFileSync('report.pdf'),
frameworks: ['HIPAA']
});
console.log(`Score: ${result.score}`);
console.log(`Findings: ${result.findings.length}`);
Python SDK
pythonfrom frisbyai import Client
client = Client(api_key="your_api_key")
result = client.audit(
document=open("report.pdf", "rb"),
frameworks=["HIPAA"]
)
print(f"Score: {result.score}")
print(f"Findings: {len(result.findings)}")
Webhook Integration
Configure a webhook to receive a POST request when an audit completes. The payload includes the full audit result:
JSON// Webhook payload delivered to your endpoint
{
"event": "audit.completed",
"timestamp": "2026-04-21T14:32:00Z",
"data": {
"audit_id": "aud_7x9k2m",
"score": 72,
"findings_count": 5,
"critical_count": 1
}
}
CI/CD Integration
Add Frisby auditing to your GitHub Actions workflow to automatically audit AI-generated content on every push:
yamlname: Frisby Audit
on: [push, pull_request]
jobs:
audit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run Frisby Audit
uses: frisbyai/audit-action@v1
with:
api-key: ${{ secrets.FRISBY_API_KEY }}
files: "docs/**/*.md"
frameworks: "HIPAA,SOX"
fail-below: 80
Error Handling & Retry Patterns
Implement exponential backoff for transient errors. The API returns standard HTTP status codes:
400— Invalid request (check payload)401— Invalid or missing API key403— Insufficient permissions or tier404— Resource not found429— Rate limit exceeded (checkRetry-Afterheader)500— Server error (safe to retry with backoff)
javascript// Retry with exponential backoff
async function auditWithRetry(payload, maxRetries = 3) {
for (let i = 0; i < maxRetries; i++) {
try {
return await client.audit(payload);
} catch (err) {
if (err.status === 429 || err.status >= 500) {
await sleep(1000 * 2 ** i);
continue;
}
throw err;
}
}
}
How the Auditor Works
A deep dive into the six-stage pipeline that powers every Frisby audit. Each stage is designed for accuracy, transparency, and regulatory compliance.
Document Ingestion
Extracts text, tables, and images via OCR from uploaded documents. Supports PDF, DOCX, HTML, and TXT formats. Tables are parsed into structured data for numerical verification. Images with embedded text are processed through multi-language OCR.
Claim Extraction
NLP models identify every verifiable claim in the document: statistics, citations, attributions, dates, and monetary figures. Each claim is tagged with a confidence level and categorized by type for downstream verification.
Source Verification
Scans for patterns matching academic citations, government references, financial filing formats, and legal terminology. Claims without verifiable sources are flagged.
Cross-Reference Analysis
Checks internal consistency across the document. Do numbers in the executive summary match the body? Do dates align between sections? Are figures in tables consistent with narrative text? Contradictions are flagged with exact locations.
Risk Scoring
A weighted algorithm produces a 0-100 accuracy score. The formula considers: severity (critical/high/medium/low) × confidence (how certain the finding is) × regulatory impact (which frameworks are affected). Scores below 70 trigger automatic alerts.
Report Generation
Structures all findings by severity, maps each to applicable compliance frameworks (HIPAA, SOX, GDPR, etc.), and generates actionable remediation steps. Reports can be exported as PDF, JSON, or viewed in the dashboard.
Workflow Diagrams
Visual representations of common Frisby workflows and integration patterns.
+-----------+ +-----------+ +-----------+ +-----------+ +-----------+
| UPLOAD | --> | PROCESS | --> | VERIFY | --> | SCORE | --> | REPORT |
| PDF/DOCX | | OCR+NLP | | Sources | | 0 - 100 | | PDF/JSON |
+-----------+ +-----------+ +-----------+ +-----------+ +-----------+
+-----------+ +-----------+ +-----------+ +-----------+ +-----------+
| CI/CD | --> | FRISBY API| --> | WEBHOOK | --> | DASHBOARD | --> | ALERT |
| GitHub | | POST/v1/ | | your-app/ | | Results | | Slack/PD |
| Actions | | audit | | webhook | | & Trends | | Email/SMS |
+-----------+ +-----------+ +-----------+ +-----------+ +-----------+
+-----------+ +-----------+ +-----------+ +-----------+ +-----------+
| AUDIT | --> | FRAMEWORK | --> | REPORT | --> | AUDIT | --> | MONITOR |
| Run scan | | HIPAA/SOX | | Findings | | TRAIL | | Recurring |
| on docs | | GDPR/PCI | | + Remed. | | 7yr retain| | Schedules |
+-----------+ +-----------+ +-----------+ +-----------+ +-----------+