npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

pot-api

v0.2.0

Published

REST API server for pot-sdk — sync and async AI output verification with webhook callbacks

Downloads

195

Readme

pot-api

REST API server for pot-sdk — sync and async AI output verification with webhook callbacks.

What it does

pot-api wraps pot-sdk as an HTTP server. Fire a verification request and get the result synchronously, or use async mode to get a jobId immediately while verification runs in the background — with optional webhook push on completion.

Install & Run

# Run directly
ANTHROPIC_API_KEY=... XAI_API_KEY=... npx pot-api

# Or install globally
npm install -g pot-api
pot-api

Default port: 3141. Override with PORT=8080.

Endpoints

POST /verify — Sync

Blocks until verification is complete (~5–30s depending on tier).

curl -X POST http://localhost:3141/verify \
  -H "Content-Type: application/json" \
  -d '{
    "output": "The Eiffel Tower is 330m tall.",
    "question": "How tall is the Eiffel Tower?",
    "tier": "basic"
  }'

Returns: VerificationResult (confidence, flags, mdi, sas, dissent, synthesis)

POST /verify/async — Async + Webhook

Returns {jobId} immediately. Verification runs in background.

curl -X POST http://localhost:3141/verify/async \
  -H "Content-Type: application/json" \
  -d '{
    "output": "The Eiffel Tower is 330m tall.",
    "question": "How tall is the Eiffel Tower?",
    "tier": "basic",
    "callbackUrl": "https://your-agent.example.com/webhook"
  }'

# → {"jobId":"abc-123","status":"pending","pollUrl":"/jobs/abc-123"}

When done, pot-api POSTs to your callbackUrl:

{
  "jobId": "abc-123",
  "status": "done",
  "result": { "verified": true, "confidence": 0.91, ... }
}

GET /jobs/:id — Poll Status

curl http://localhost:3141/jobs/abc-123
# → {"id":"abc-123","status":"running","input":{...}}
# → {"id":"abc-123","status":"done","result":{...}}

Status values: pendingrunningdone | error

Environment Variables

| Variable | Description | |----------|-------------| | ANTHROPIC_API_KEY | ✅ Required | | XAI_API_KEY | Optional extra generator | | DEEPSEEK_API_KEY | Optional extra generator | | MOONSHOT_API_KEY | Optional extra generator | | PORT | Server port (default: 3141) |

Per-request API keys (BYOK)

Override keys per request:

{
  "output": "...",
  "question": "...",
  "apiKeys": {
    "anthropic": "sk-ant-...",
    "xai": "xai-..."
  }
}

Links

  • pot-sdk: https://npmjs.com/package/pot-sdk
  • pot-mcp: https://npmjs.com/package/pot-mcp
  • Protocol spec: https://thoughtproof.ai
  • GitHub: https://github.com/ThoughtProof/pot-api