Run an audit
Run a Standard or Artifact audit against supplied context, schema, code, config, or policy.
Docs
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.
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.
All server-to-server and agent integrations use a single base URL.
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"
}'Across the web app, SDK, HTTP API, CLI, MCP, and OpenAI-compatible integrations, Taplid allows the following operations.
Run a Standard or Artifact audit against supplied context, schema, code, config, or policy.
Retrieve a persisted public result by auditId. No API key is required; treat the audit ID like a share link.
Verify the ES256 attestation, issuer, signed fields, and result hash for a saved audit. Token-only verification checks the signature and issuer.
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.
Load an example in Taplid Audit.
Open PowerShell and run this - package installs, runs and outputs a result.
npx @taplid/cli audit request.jsonUse the SDK or API when integrating into your backend.
npm install @taplid/clientUse the MCP server from Claude, Cursor, or any MCP-capable agent.
npx @taplid/mcpUse OpenAI-compatible mode to run, retrieve, and verify from OpenAI-style tools and gateways.
{
"context": "The number is 1.",
"prompt": "What is the number?",
"response": "The number is 2.",
"auditMode": "standard"
}{
"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..."
}
}The response may include more fields than listed here. These are the primary fields.
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);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);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=The CLI is a thin wrapper over the API. It can run audits, retrieve saved audits, and verify signed attestations.
npx @taplid/cli audit request.jsonFlags: --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>
Retrieval and verification do not require an API key.
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..." --jsonPrefer to skip the file? Pass context, prompt, and response as inline flags:
npx @taplid/cli audit --context "The number is 1." --prompt "What is the number?" --response "The number is 2." --audit-mode standardBy default the CLI writes the full audit result JSON to a sibling file:
request.jsonrequest.response.jsontaplid.response.jsonnpx @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.The CLI supports three ways of providing TAPLID env values:
--envfile <path>.env from the current working directoryIf --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:
$env:TAPLID_API_KEY = "your_api_key"
$env:TAPLID_AUDIT_MODE = "artifact"
npx @taplid/cli audit request.jsonExample explicit env file usage:
npx @taplid/cli audit request.json --envfile .env.taplidSupported 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.
context, prompt, response): CLI > shell env > --envfile > local .env > request.jsonrequest.json > shell env > --envfile > local .env > built-in defaultsHosted usage limits are enforced per access mode. Use /api/review for anonymous access, or API keys for authenticated account usage and saved dashboard thresholds.
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.
npx @taplid/cli eval request.json --api-key tap_live_... --pass-threshold 80The 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.
npx @taplid/[email protected]{
"mcpServers": {
"taplid": {
"command": "npx",
"args": ["-y", "@taplid/[email protected]"],
"env": {
"TAPLID_API_KEY": "tap_live_...",
"TAPLID_API_URL": "https://api.taplid.com"
}
}
}
}{
"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.
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.
{
"type": "mcp",
"server_label": "taplid",
"server_url": "https://api.taplid.com/mcp",
"require_approval": "never",
"headers": {
"Authorization": "Bearer <taplid_api_key>"
}
}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.
{
"mcp_servers": [
{
"url": "https://api.taplid.com/mcp",
"authorization_token": "<taplid_api_key>"
}
]
}anthropic-beta: mcp-client-2025-11-20Install 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.
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);{
"taplid": {
"operation": "audit | get_audit | verify_audit",
"auditId": "AUD-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
}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.
curl https://api.taplid.com/review/audits/AUD-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxconst taplid = new Taplid();
const audit = await taplid.getAudit(
'AUD-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx',
);npx @taplid/cli audit get --audit-id AUD-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx --pretty{
"auditId": "AUD-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}{
"model": "taplid",
"messages": [
{
"role": "user",
"content": "Retrieve this Taplid audit."
}
],
"taplid": {
"operation": "get_audit",
"auditId": "AUD-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
}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.
const taplid = new Taplid();
const report = await taplid.verifyAudit({
auditId: 'AUD-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx',
});curl -X POST https://api.taplid.com/verify-audit \
-H "Content-Type: application/json" \
-d '{"auditId":"AUD-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}'npx @taplid/cli audit verify --audit-id AUD-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx --pretty{
"auditId": "AUD-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}{
"model": "taplid",
"messages": [
{
"role": "user",
"content": "Verify this Taplid audit."
}
],
"taplid": {
"operation": "verify_audit",
"auditId": "AUD-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
}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.
Paste a request payload and run the Taplid audit in the browser.
Open the repo README and supporting docs on GitHub.
Install the SDK for server-side use or use the CLI for quick local and CI runs.
npm i @taplid/clientnpm i @taplid/clinpx @taplid/mcpYou detect AI hallucinations by checking whether the answer makes claims that are unsupported, unverifiable, or inconsistent with your provided context.
LLM output validation is the process of checking if an AI answer is reliable enough for the task and user risk level.
To check if an AI answer is correct, break it into actionable claims, verify key claims against trusted sources, and route uncertain output before use.