Taplid
Home/Docs

Docs

Integrate Taplid into your product, pipeline, or agent stack.

Most users only use the Audit page. This section is for development teams integrating Taplid into internal tools, APIs, CI/CD pipelines, and production workflows.

Taplid is updated frequently. The examples below document the core system.

For AI agents and coding assistants

If you are an AI agent, coding assistant, or automation tool, read Taplid's plain-text docs instead of scraping this page. The text routes are JS-free, cookie-free, and bot-readable.

Required request field: response. Optional fields: context, prompt, and auditMode. auditMode is artifact or standard.

Canonical public API

All server-to-server and agent integrations use a single base URL.

bashdirect audit (curl)
curl -X POST https://api.taplid.com/review   -H "Content-Type: application/json"   -H "Authorization: Bearer TAPLID_API_KEY"   -d '{
    "context": "The number is 1.",
    "prompt": "What is the number?",
    "response": "The number is 2.",
    "auditMode": "standard"
  }'

Three things Taplid does

Across the web app, SDK, HTTP API, CLI, MCP, and OpenAI-compatible integrations, Taplid allows the following operations.

Run an audit

Run a Standard or Artifact audit against supplied context, schema, code, config, or policy.

Retrieve an audit

Retrieve a persisted public result by auditId. No API key is required; treat the audit ID like a share link.

Verify an audit

Verify the ES256 attestation, issuer, signed fields, and result hash for a saved audit. Token-only verification checks the signature and issuer.

Artifact examples

Taplid includes pre-made Artifact examples for TypeScript / JS, Angular, React / Next.js, C# / .NET, SQL, Docker, YAML / Kubernetes, Terraform / IaC, JSON Schema, CSS / Frontend, Security / Secrets, and API / HTTP / CORS.

Open Taplid Audit, choose Artifact, then click Load on an example to inspect it or Run live to test it.

Many ways to use Taplid

  1. Load an example in Taplid Audit.

  2. Open PowerShell and run this - package installs, runs and outputs a result.

    bash@taplid/cli
    npx @taplid/cli audit request.json
  3. Use the SDK or API when integrating into your backend.

    bash@taplid/client
    npm install @taplid/client
  4. Use the MCP server from Claude, Cursor, or any MCP-capable agent.

    bash@taplid/mcp
    npx @taplid/mcp
  5. Use OpenAI-compatible mode to run, retrieve, and verify from OpenAI-style tools and gateways.

What you send - the payload

jsonrequest json
{
  "context": "The number is 1.",
  "prompt": "What is the number?",
  "response": "The number is 2.",
  "auditMode": "standard"
}

Request fields

  • context: optional policy, rules, or background context for the audit.
  • prompt: optional user prompt that produced the response.
  • response: required AI-generated output to audit.
  • auditMode: optional string - "standard" or "artifact". Defaults to "artifact".

What you get back - the response

jsonresponse json
{
  "auditId": "AUD-XXX",
  "auditMode": "standard",
  "decision": "BLOCK",
  "trustScore": 20,
  "summary": "This answer conflicts with the provided context.",
  "issues": [
    {
      "message": "Contradicts the provided context.",
      "reason": "The context states one thing; the response says the opposite."
    }
  ],
  "nextStep": "Do not use this yet. Adjust the answer to match the provided context, then re-run the check.",
  "repairActions": [
    {
      "action": "Rewrite the answer so it aligns with the provided context.",
      "priority": "critical",
      "target": "response"
    }
  ],
  "claims": [
    {
      "text": "The number is 2.",
      "status": "contradicted",
      "evidence": [
        "Response value: 2",
        "Context value: 1"
      ]
    }
  ],
  "diagnosis": {
    "action": "revise_answer",
    "confidence": "high",
    "severity": "error",
    "nextSteps": [
      "Verify the answer is consistent with the provided context before re-running."
    ],
    "explanation": "The answer contradicts the provided context. Revise the answer to align with the source material before re-running the audit."
  },
  "claimStats": {
    "total": 1,
    "supported": 0,
    "unsupported": 0,
    "contradicted": 1,
    "evaluated": 1
  },
  "evidenceCoverage": 1,
  "metadata": {
    "auditDurationMs": 1,
    "claimsDetected": 1,
    "engine": "taplid",
    "version": "1"
  },
  "meta": {
    "policy": {
      "profileId": "balanced",
      "passThreshold": 80,
      "reviewThreshold": 60
    }
  },
  "requestId": "aud_XXX",
  "attestation": {
    "alg": "ES256",
    "kid": "taplid-es256-2026-06",
    "typ": "JWT",
    "issuer": "https://api.taplid.com",
    "issuedAt": "2026-06-12T21:28:52.000Z",
    "inputHash": "91f5884c9a9be6152e6d75534df82dada5965e7905bc80eca95df02970c6f3b1",
    "resultHash": "f95e77eb3224d987fa0baf35b5ee4c4e04029960cdcd6fd16c9171ffad929a7e",
    "token": "eyJhbGciOiJFUzI1NiIsImtpZCI6InRhcGxpZC1lczI1Ni0yMDI2LTA2IiwidHlwIjoiSldUIn0..."
  }
}

Response fields

The response may include more fields than listed here. These are the primary fields.

  • auditId: unique identifier for this audit run
  • auditMode: the effective mode that actually ran (artifact or standard)
  • decision: ALLOW, REVIEW, or BLOCK
  • trustScore: 0 to 100 public trust signal
  • summary: short explanation for the verdict
  • issues: concrete problems found in the response
  • nextStep: practical guidance for what to do next
  • repairActions: prioritized steps to fix the response (priority: critical / high / medium / low)
  • claims: individual claims extracted and verified against the context, each with status and evidence
  • diagnosis: structured diagnosis (action, confidence, severity, nextSteps, explanation)
  • claimStats: counts across the claims array (total / supported / unsupported / contradicted / evaluated)
  • evidenceCoverage: 0 to 1 fraction of claims grounded against the supplied context
  • metadata: engine metadata (auditDurationMs, claimsDetected, engine, version)
  • meta.policy: profileId plus passThreshold / reviewThreshold actually applied to this run
  • requestId: server-assigned request id for support and tracing
  • attestation: ES256 signed proof that Taplid issued this decision for the audited input and returned public result

Run from Backend (SDK + API)

ts@taplid/client
import { Taplid } from '@taplid/client';

const taplid = new Taplid({
  apiKey: TAPLID_API_KEY,
});

const result = await taplid.audit({
  context: 'The number is 1.',
  prompt: 'What is the number?',
  response: 'The number is 2.',
  auditMode: 'standard',
});

console.log(result);
tsPOST https://api.taplid.com/review
const payload = {
  context: 'The number is 1.',
  prompt: 'What is the number?',
  response: 'The number is 2.',
  auditMode: 'standard',
};

const response = await fetch('https://api.taplid.com/review', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': 'Bearer TAPLID_API_KEY',
  },
  body: JSON.stringify(payload),
});

const result = await response.json();
console.log(result);

API environment variables

TAPLID_API_KEY is required for creating audits through the public API. Audit retrieval and Verify Audit do not require an API key. The other variables are optional request defaults.

  • TAPLID_API_KEY= (required)
  • TAPLID_CONTEXT=
  • TAPLID_PROMPT=
  • TAPLID_RESPONSE=
  • TAPLID_AUDIT_MODE=
  • TAPLID_CONTEXT_FILE_LOCATION=
  • TAPLID_PROMPT_FILE_LOCATION=
  • TAPLID_RESPONSE_FILE_LOCATION=
  • TAPLID_REVIEW_THRESHOLD=
  • TAPLID_PASS_THRESHOLD=

Run from CLI

The CLI is a thin wrapper over the API. It can run audits, retrieve saved audits, and verify signed attestations.

bash@taplid/cli
npx @taplid/cli audit request.json

Flags: --context <text>, --prompt <text>, --response <text>, --audit-mode <standard|artifact>, --context-file-location <path>, --prompt-file-location <path>, --response-file-location <path>, --out <path>, --api-url <override>, --api-key <key>

CLI behavior

  • Reads request.json when provided, or runs from flags/env in no-input mode.
  • Sends the same payload shape used by the Taplid Audit tool and the API.
  • Writes the full response to request.response.json (or taplid.response.json in no-input mode).
  • Prints the decision, trust score, and output path in the terminal.

Retrieval and verification do not require an API key.

bash@taplid/cli retrieve and verify
npx @taplid/cli audit get --audit-id AUD-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx --pretty
npx @taplid/cli audit verify --audit-id AUD-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx --pretty
npx @taplid/cli audit verify --token "eyJ..." --json

Prefer to skip the file? Pass context, prompt, and response as inline flags:

bash@taplid/cli (no file)
npx @taplid/cli audit --context "The number is 1." --prompt "What is the number?" --response "The number is 2." --audit-mode standard

CLI environment flags and variables (Optional)

Output

By default the CLI writes the full audit result JSON to a sibling file:

  • Input - request.json
  • Output - request.response.json
  • No-input mode output - taplid.response.json

Optional Flags

bashoptional flags
npx @taplid/cli audit request.json --out custom-response.json
npx @taplid/cli audit --response "Inline response only"
npx @taplid/cli audit --response-file-location ./bundle/response.txt
npx @taplid/cli audit --prompt "Inline prompt" --response-file-location ./bundle/response.txt
npx @taplid/cli audit request.json --audit-mode artifact
npx @taplid/cli audit request.json --api-url http://127.0.0.1:7000
npx @taplid/cli audit request.json --api-key your_api_key
npx @taplid/cli audit request.json --envfile .env.taplid
npx @taplid/cli audit request.json --pass-threshold 85 --review-threshold 65
npx @taplid/cli audit get --audit-id AUD-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx --pretty
npx @taplid/cli audit verify --audit-id AUD-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx --pretty
npx @taplid/cli audit verify --token "eyJ..." --json
  • --context <text> sets context text for this run.
  • --prompt <text> sets prompt text for this run.
  • --response <text> sets response text for this run.
  • --audit-mode <standard|artifact> overrides auditMode for this run. Default artifact. Artifact mode is recommended for code reviews, PRs, implementation plans, long answers, and structured outputs. Standard mode is best for factual, policy, refund, pricing, and entitlement issues. In JSON request files, use auditMode. In CLI flags, use --audit-mode. If both are provided, the CLI flag overrides the value in the request file.
  • --context-file-location <path> resolves context text from a file.
  • --prompt-file-location <path> resolves prompt text from a file.
  • --response-file-location <path> resolves response text from a file.
  • --out <path> writes the response JSON to a custom output path.
  • --api-url <url> overrides the default API origin.
  • --api-key <key> sends a bearer token for audit and eval. It is not required for audit get or audit verify.
  • --audit-id <AUD-...> retrieves a persisted hosted audit with audit get or verifies it with audit verify.
  • --token <jwt> verifies a signed attestation token with audit verify.
  • --envfile <path> loads TAPLID env defaults from an explicit env file.
  • --pass-threshold <0-100> overrides the pass threshold for this run.
  • --review-threshold <0-100> overrides the review threshold for this run.

Optional Environment Loading

The CLI supports three ways of providing TAPLID env values:

  1. Shell or process environment
  2. Explicit --envfile <path>
  3. Auto-loaded local .env from the current working directory

If --envfile is provided, the CLI loads that file and does not auto-load the local .env.

If --envfile is not provided, the CLI checks process.cwd() for .env and continues silently if the file is absent.

If --envfile is provided but the file does not exist, the CLI fails fast.

Example shell usage:

powershellshell environment
$env:TAPLID_API_KEY = "your_api_key"
$env:TAPLID_AUDIT_MODE = "artifact"
npx @taplid/cli audit request.json

Example explicit env file usage:

bashenv file
npx @taplid/cli audit request.json --envfile .env.taplid

Optional Environment Defaults

Supported variables:

  • TAPLID_PUBLIC_API_URL=
  • TAPLID_API_KEY=
  • TAPLID_CONTEXT=
  • TAPLID_PROMPT=
  • TAPLID_RESPONSE=
  • TAPLID_AUDIT_MODE=
  • TAPLID_CONTEXT_FILE_LOCATION=
  • TAPLID_PROMPT_FILE_LOCATION=
  • TAPLID_RESPONSE_FILE_LOCATION=
  • TAPLID_REVIEW_THRESHOLD=
  • TAPLID_PASS_THRESHOLD=

Blank env values are ignored.

context, prompt, and response can come from CLI text flags, CLI file-location flags, shell env, --envfile, the auto-loaded local .env, or request.json.

Precedence

  1. Text fields (context, prompt, response): CLI > shell env > --envfile > local .env > request.json
  2. Non-text fields: CLI flags > request.json > shell env > --envfile > local .env > built-in defaults

Hosted usage limits are enforced per access mode. Use /api/review for anonymous access, or API keys for authenticated account usage and saved dashboard thresholds.

  • Anonymous Artifact: 5 total
  • Anonymous Standard: 5 total
  • Free Artifact: 50 / month
  • Free Standard: 10 / month
  • Starter Artifact: 1,000 / month
  • Starter Standard: 1,000 / month
  • Pro Artifact: 10,000 / month
  • Pro Standard: 10,000 / month

CLI eval pipeline

Use audit to run an audit and write the result JSON. Use eval as a CI threshold gate - it exits non-zero when the trust score is below --pass-threshold.

bashci eval
npx @taplid/cli eval request.json --api-key tap_live_... --pass-threshold 80

MCP server

Claude Desktop / Cursor (local stdio MCP)

The package does not need to be globally installed. Claude Desktop, Cursor, or any MCP-aware client can run it through npx. You only need Node.js/npm installed so the npx command is available. Your Taplid API key stays in the client config, not in the prompt. The server exposestaplid_audit, taplid_get_audit, and taplid_verify_audit.

For reliability, pin the exact MCP package version instead of using @taplid/mcp or @taplid/mcp@latest. Some MCP clients can keep using a cached package even after restart. When Taplid publishes a new MCP version, update the version number manually, then fully quit and reopen the MCP client. Check the latest published version on npm.

bash@taplid/mcp
npx @taplid/[email protected]
jsonmcp client config - %APPDATA%\\Claude\\claude_desktop_config.json
{
  "mcpServers": {
    "taplid": {
      "command": "npx",
      "args": ["-y", "@taplid/[email protected]"],
      "env": {
        "TAPLID_API_KEY": "tap_live_...",
        "TAPLID_API_URL": "https://api.taplid.com"
      }
    }
  }
}
jsonlocal development (windows path)
{
  "mcpServers": {
    "taplid-local": {
      "command": "node",
      "args": ["C:\\code\\taplid\\packages\\taplid-mcp\\dist\\server.js"],
      "env": {
        "TAPLID_API_KEY": "tap_live_...",
        "TAPLID_API_URL": "http://127.0.0.1:7000"
      }
    }
  }
}

After updating the config file, completely close and reopen Claude Desktop / Cursor. Restarting the chat is not enough.

OpenAI Responses API (remote MCP)

Pass a Taplid MCP tool block in the tools array of any OpenAI Responses API call. The same MCP server exposes audit, retrieval, and verification tools.

jsonopenai responses api — mcp tool block
{
  "type": "mcp",
  "server_label": "taplid",
  "server_url": "https://api.taplid.com/mcp",
  "require_approval": "never",
  "headers": {
    "Authorization": "Bearer <taplid_api_key>"
  }
}

Anthropic Messages API (remote MCP)

Add a Taplid MCP server to your Anthropic Messages API request using the mcp_servers field. Include the anthropic-beta: mcp-client-2025-11-20 header.

jsonanthropic messages api — mcp server block
{
  "mcp_servers": [
    {
      "url": "https://api.taplid.com/mcp",
      "authorization_token": "<taplid_api_key>"
    }
  ]
}
bashrequired beta header
anthropic-beta: mcp-client-2025-11-20

OpenAI-compatible endpoint

Install npm install openai dotenv. This route supports the same three operations through explicit taplid.operation routing: run an audit, retrieve an audit, or verify an audit. The default operation is audit.

tsfetch example
import OpenAI from 'openai';

const response = await fetch(
  "https://api.taplid.com/v1/chat/completions",
  {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
      Authorization: `Bearer ${API_KEY}`,
    },
    body: JSON.stringify({
      model: "taplid-verify",
      messages: [
        { role: "system", content: "The number is 1." },
        { role: "user", content: "What is the number?" },
        { role: "assistant", content: "The number is 2." },
      ],
      taplid: {
        auditMode: "standard",
      },
    }),
  },
);

const result = await response.json();
console.log(result.taplid.decision);
jsontaplid.operation
{
  "taplid": {
    "operation": "audit | get_audit | verify_audit",
    "auditId": "AUD-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
  }
}

Retrieve an audit by ID

Every completed hosted audit returns an auditId. Anyone who has the ID can retrieve the persisted public result — no API key required.

Treat the audit ID like a share link. Retrieval is a public lookup. Hosted audit results include an attestation object, which is the cryptographic proof layer.

bashHTTP (curl)
curl https://api.taplid.com/review/audits/AUD-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
ts@taplid/client
const taplid = new Taplid();

const audit = await taplid.getAudit(
  'AUD-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx',
);
bashCLI
npx @taplid/cli audit get --audit-id AUD-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx --pretty
jsonMCP tool: taplid_get_audit
{
  "auditId": "AUD-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
jsonOpenAI-compatible
{
  "model": "taplid",
  "messages": [
    {
      "role": "user",
      "content": "Retrieve this Taplid audit."
    }
  ],
  "taplid": {
    "operation": "get_audit",
    "auditId": "AUD-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
  }
}

Verify an audit

Verify a persisted audit ID or signed attestation token. No API key is required. Audit ID verification checks the saved public result, signed fields, issuer, signature, and result hash. Token-only verification checks the signature and issuer.

ts@taplid/client
const taplid = new Taplid();

const report = await taplid.verifyAudit({
  auditId: 'AUD-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx',
});
bashHTTP (curl)
curl -X POST https://api.taplid.com/verify-audit \
  -H "Content-Type: application/json" \
  -d '{"auditId":"AUD-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}'
bashCLI
npx @taplid/cli audit verify --audit-id AUD-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx --pretty
jsonMCP tool: taplid_verify_audit
{
  "auditId": "AUD-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
jsonOpenAI-compatible
{
  "model": "taplid",
  "messages": [
    {
      "role": "user",
      "content": "Verify this Taplid audit."
    }
  ],
  "taplid": {
    "operation": "verify_audit",
    "auditId": "AUD-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
  }
}

Signed attestations

Hosted Taplid audit responses include an attestation object: an ES256-signed proof that Taplid issued this decision for the audited input and the returned public result.

Public verification keys are available at https://api.taplid.com/.well-known/jwks.json. Consumers can verify the signature directly, or use Verify Audit through the SDK, HTTP API, CLI, or MCP.

  • Hosted Taplid audit responses include an attestation object.
  • The attestation is an ES256-signed proof that Taplid issued the decision for the audited input and returned public result.
  • Public verification keys are available at https://api.taplid.com/.well-known/jwks.json.
  • The signed token payload includes auditId, auditMode, decision, trustScore, inputHash, and resultHash.

Use cases

Where teams use Taplid

  • LLM output validation
  • Chatbot answer filtering
  • CI/CD safety checks
  • Internal AI tools
  • Audit and review workflows
  • Compliance reporting
  • Knowledge base QA
  • Agent output gating

Start using Taplid in your workflow

Try it

No signup required.

  • GDPR Ready
  • Security Focused
  • Audit Controls
  • Privacy First
  • Production Ready
  • No training on your data