{
  "markdown": "# VeracityAPI\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](./LICENSE) [![Cloudflare Workers](https://img.shields.io/badge/Cloudflare-Workers-f38020.svg)](https://workers.cloudflare.com/) [![OpenAPI](https://img.shields.io/badge/OpenAPI-3.1-blue.svg)](https://veracityapi.com/openapi.json) [![MCP](https://img.shields.io/badge/MCP-ready-purple.svg)](https://veracityapi.com/mcp) [![Status](https://img.shields.io/badge/status-live-10b981.svg)](https://veracityapi.com/status)\n\n**Content trust infrastructure for AI products that ship.** VeracityAPI analyzes text, image URLs, and audio URLs, then returns the one field your workflow can route on: `recommended_action`.\n\n```ts\nswitch (result.recommended_action) {\n  case \"allow\": publish(); break;\n  case \"revise\": requestRevision(result.evidence, result.recommended_fixes); break;\n  case \"human_review\": queueForReview(result); break;\n  case \"reject\": quarantine(); break;\n}\n```\n\nVeracityAPI is **not** a binary AI detector and not forensic proof of authorship, identity, truth, voice cloning, or media provenance. It is a privacy-first workflow gate for teams and agents deciding whether content is safe enough to publish, cite, train on, moderate, or accept.\n\n## Why builders use it\n\n- **Action-first contract:** `allow`, `revise`, `human_review`, or `reject` instead of a naked probability score.\n- **One endpoint:** `POST /v1/analyze` for `type: \"text\" | \"image\" | \"audio\"`.\n- **Evidence-backed routing:** strict-ish enums, evidence spans/categories, recommended fixes, confidence, risk level, and limitations.\n- **Agent-ready by default:** OpenAPI, `/llms.txt`, `/.well-known/agents.json`, local/remote MCP, examples for LangGraph/Vercel/OpenAI Actions.\n- **Privacy defaults:** `store_content=false`; image/audio/video bytes, base64 payloads, frames/contact sheets, and full media URLs are not stored.\n- **Usage-based pricing:** start free, then pay per request/unit; Team plan available for business usage.\n\n## 30-second quickstart\n\n```bash\nexport VERACITY_API_KEY=\"vapi_your_key_here\"\n\ncurl https://api.veracityapi.com/v1/analyze \\\n  -H \"Authorization: Bearer $VERACITY_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"type\": \"text\",\n    \"content\": \"Travelers should always be careful in tourist areas because scams can happen anywhere. Keep your belongings close and avoid strangers.\",\n    \"auto_revise\": true,\n    \"context\": {\n      \"format\": \"article\",\n      \"intended_use\": \"publish\",\n      \"domain\": \"travel safety\"\n    },\n    \"store_content\": false\n  }'\n```\n\nMinimal response shape:\n\n```json\n{\n  \"analysis_id\": \"ana_...\",\n  \"content_trust_score\": 0.22,\n  \"risk_level\": \"high\",\n  \"recommended_action\": \"human_review\",\n  \"confidence\": \"medium\",\n  \"primary_reason\": \"unsupported_generic_claims\",\n  \"evidence\": [\n    { \"type\": \"generic_phrasing\", \"severity\": \"high\", \"span\": \"...\", \"explanation\": \"...\" }\n  ],\n  \"recommended_fixes\": [\"Add concrete places, mechanisms, sources, or firsthand details.\"],\n  \"limitations\": [\"Workflow risk signal, not proof of AI authorship or truth.\"]\n}\n```\n\n## TypeScript SDK\n\n```bash\nnpm install @veracityapi/sdk\n```\n\n```ts\nimport { VeracityAPI } from \"@veracityapi/sdk\";\n\nconst veracity = new VeracityAPI({ apiKey: process.env.VERACITY_API_KEY });\n\nconst result = await veracity.analyzeText({\n  text: draft,\n  auto_revise: true,\n  context: { format: \"article\", intended_use: \"publish\", domain: \"content QA\" },\n});\n\nif (result.recommended_action === \"human_review\") {\n  await createReviewTicket(result.evidence);\n}\n```\n\n## Python SDK\n\n```bash\npip install veracityapi\n```\n\n```py\nfrom veracityapi import VeracityAPI\n\nclient = VeracityAPI()  # reads VERACITY_API_KEY\n\nresult = client.analyze_text(\n    draft,\n    auto_revise=True,\n    context={\"format\": \"article\", \"intended_use\": \"publish\", \"domain\": \"content QA\"},\n)\n\nif result[\"recommended_action\"] == \"human_review\":\n    create_review_ticket(result[\"evidence\"])\n```\n\n## MCP for Claude Desktop, Cursor, and agents\n\nLocal stdio server:\n\n```json\n{\n  \"mcpServers\": {\n    \"veracityapi\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@veracityapi/mcp\"],\n      \"env\": { \"VERACITY_API_KEY\": \"YOUR_API_KEY\" }\n    }\n  }\n}\n```\n\nHosted remote MCP is live at `https://api.veracityapi.com/mcp` for clients that support Streamable HTTP JSON-RPC with bearer auth. Tools include `verify_content`, `analyze_text`, `analyze_image`, `analyze_audio`, `analyze_batch`, and `check_balance`.\n\n## Pricing\n\n| Plan / usage | Price | Best for |\n| --- | ---: | --- |\n| Free starter credit | $1.50 included | First API key and smoke tests |\n| Text analyze-only | $0.005 / 1k chars | QA, source triage, moderation |\n| Text analyze + revise | $0.010 / 1k chars | Agent rewrite loops |\n| Image URL analysis | $0.02 / image | Async UGC/image review |\n| Audio URL analysis | $0.01 / request | Beta audio workflow triage |\n| Private-beta video URL analysis | $0.05 / successful request | 30s/25MB contact-sheet authenticity risk |\n| Enterprise | Contact sales | Volume, SLA, custom review workflow |\n\nUsage-based API billing is self-serve for builders; contact sales for volume, procurement, or custom workflow needs.\n\n## Privacy guarantees\n\n- `store_content=false` is the default/public-demo behavior.\n- Raw text is not retained unless explicitly opted in for text debugging/evals.\n- Image/audio requests store no raw media bytes, no base64 payloads, and no full media URLs.\n- Media logs keep metadata such as hostname and URL hash.\n- LLM/provider failures are refunded in the usage ledger when billing has already debited.\n\n## Current eval proof\n\nSeed text benchmark v0.1 contains **500 labeled text samples** across firsthand human writing, dry factual human writing, generic AI slop, polished AI-with-specifics, and edge/adversarial mixed cases.\n\n| Metric | Result |\n| --- | ---: |\n| Routing-action agreement | 88.0% |\n| Macro F1 | 0.871 |\n| Corpus | `data/evals/veracityapi_seed_corpus_500.jsonl` |\n| Results | `data/evals/veracityapi_seed_results_v0_1.json` |\n\nThis proves early routing-action calibration, not forensic authorship detection. Image/audio evals and external comparator runs are still pending.\n\n## Production endpoints\n\n```text\nGET  /v1/balance\nPOST /v1/analyze        # unified text/image/audio endpoint; video routes to private-beta video triage\nPOST /v1/analyze-video  # private-beta video authenticity risk\nPOST /v1/analyze-batch  # synchronous text batch\nPOST /v1/analyze-text   # legacy text endpoint\nPOST /v1/analyze-image  # legacy image endpoint\nPOST /v1/analyze-audio  # legacy audio endpoint\n```\n\nPublic no-key demo endpoints:\n\n```text\nPOST /demo/analyze\nPOST /demo/analyze-image\nPOST /demo/analyze-audio\nGET  /demo/influencer-beauty-tonic.jpg\nGET  /assets/demo-voice-message.mp3\n```\n\n## Live surfaces\n\n- Site/demo: https://veracityapi.com\n- API base: https://api.veracityapi.com\n- Docs: https://veracityapi.com/docs\n- Pricing: https://veracityapi.com/pricing\n- Status: https://veracityapi.com/status\n- Changelog: https://veracityapi.com/changelog\n- Evals: https://veracityapi.com/evals\n- MCP: https://veracityapi.com/mcp\n- For agents: https://veracityapi.com/for-agents\n- OpenAPI: https://veracityapi.com/openapi.json\n- llms.txt: https://veracityapi.com/llms.txt\n- agents.json: https://veracityapi.com/.well-known/agents.json\n\n## Local development\n\n```bash\nnpm install\nnpm test\nnpx tsc --noEmit\nnpx wrangler dev\n```\n\n## Limitations\n\n- Workflow risk score, not proof of authorship, truth, provenance, or identity.\n- v0.1 uses LLM-backed structured scoring, not a custom fine-tuned classifier.\n- English-calibrated first; non-English scoring remains experimental.\n- Image/audio are beta workflow-triage endpoints and not EXIF/C2PA/speaker-identity verification.\n",
  "bytes": 7740,
  "sha": "2f9f059421c71982154aacd4d2a2b3e03497882bd27861dda27a28cc8bf7b35d",
  "repo_slug": "psyduckler/veracityapi",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/plg_psyduckler_veracityapi_veracityapi_54ccccf8/readme"
}