# πŸ› οΈ Pull That Up Jamie β€” Backend ### ⚑ The Agent-Payable Podcast Research API for the Machine-Payable Web > Plain English in. Timestamped, deeplinked, audio-grounded podcast intel out. One Lightning credential. Zero accounts. --- ## πŸ”‘ What Is It? **Jamie Pull** is a podcast research agent that lives behind a single API. Hand it a question, it plans, searches, transcribes, curates, and streams back structured results with playable clips β€” across hundreds of feeds, tens of thousands of episodes, and millions of indexed paragraphs. It's what OpenClaw's orchestration layer feels like, but: - πŸ—οΈ Runs on our infrastructure, not yours - ⚑ ~$0.10 per call (bounded, not per-token) - 🚫 No Docker, no API keys, no signup, no monthly bill - 🌊 Streaming SSE results in 5–30 seconds - πŸ€– Built for agent-to-agent commerce from day one - β‚Ώ L402 Lightning payable β€” pay per request, scoped, ephemeral --- ## ✨ What's New - 🧠 **DeepSeek V4 powers Deep Mode** β€” multi-angle research, better proper-noun recall, ~268Γ— cheaper than closed frontier models. Same 10Β’ pricing, more thinking per dollar. - 🎯 **Smart Mode** β€” natural-language query routing. "What was Saylor saying about AI on TFTC last year" gets parsed into guest + topic + feed + time-frame filters before semantic search runs. - 🧩 **Intent router** β€” agent triage classifier picks a trimmed prompt + tool subset per request (search / research_session / transcribe). - 🎬 **Research sessions via agent** β€” `create_research_session` tool curates 5–12 clips into a shareable playlist URL. - πŸ›‘οΈ **Synthesis-failure recovery tiers** β€” three-tier reactive recovery (strict re-synth β†’ cross-provider Haiku β†’ hardcoded fallback) catches DSML leaks, narration, empty text. - πŸ” **Multi-turn conversation** β€” client-side history, capped at 2 prior turns, works for human and agent-to-agent callers. --- ## πŸ€– For Agents β€” One Endpoint, Plain English In ```bash curl -X POST https://pullthatupjamie-nsh57.ondigitalocean.app/api/pull \ -H "Content-Type: application/json" \ -H "Authorization: L402 :" \ -d '{ "message": "What did Michael Saylor say about AI on TFTC last year?", "stream": true }' ``` You get back: - 🌊 Real-time streaming status (SSE) - πŸ› οΈ Tool calls and results as they happen - πŸ“ Synthesized answer with embedded `{{clip:...}}` tokens that resolve to playable audio - πŸ‘‰ Suggested follow-up actions (`submit-on-demand`, `direct-query`, `follow-up-message`) - πŸ”— Session continuity for multi-turn research > πŸ“š **Canonical workflows + capability discovery for agents:** [`https://www.pullthatupjamie.ai/llms.txt`](https://www.pullthatupjamie.ai/llms.txt) > πŸ“– **Full API surface:** [`/api/docs`](https://pullthatupjamie-nsh57.ondigitalocean.app/api/docs) (Swagger UI) Β· [`/api/openapi.json`](https://pullthatupjamie-nsh57.ondigitalocean.app/api/openapi.json) --- ## 🧱 Or Pick Your Primitives β€” 4 L402 Endpoints Prefer to orchestrate yourself? Hit the building blocks directly. Same Lightning credential covers all of them. | Endpoint | What It Does | ~Price | |----------|--------------|--------| | πŸ” `POST /api/search-quotes` | Semantic search across millions of transcript paragraphs. Returns timestamped quotes with audio deeplinks. Supports `smartMode`. | ~$0.004 | | πŸ“š `POST /api/search-chapters` | Survey 70K+ LLM-curated chapter labels to map *who* is talking about *what*, *when*. | ~$0.005 | | πŸŽ™οΈ `POST /api/discover-podcasts` | Natural-language podcast/episode discovery across 4M+ feeds. Flags transcript availability. | ~$0.005 | | 🎧 `POST /api/on-demand/submitOnDemandRun` | Transcribe + index any episode by feed URL + GUID. Permanent semantic search after. | ~$0.45 | All four are listed and probe-verified on [402index.io](https://402index.io/directory) and [satring.com](https://satring.com). --- ## ⚑ L402 in 30 Seconds > **L402 = HTTP 402 + Bitcoin Lightning.** Pay per request, no account, no email, no API key. 1. πŸ“‘ Agent hits an endpoint 2. 🧾 Server returns `402 Payment Required` with a Lightning invoice 3. ⚑ Agent pays (Alby NWC, lnget, lightning-agent-tools, whatever) 4. πŸ” Agent retries with `Authorization: L402 :` 5. βœ… Server returns the result **One macaroon covers all Jamie endpoints.** Run the balance down, top it up when you want. > πŸ†“ Want to try without a wallet? Send `X-Free-Tier: true` for the metered free tier. πŸ“˜ More on the philosophy: [How Do AI Agents Pay for APIs?](https://www.pullthatupjamie.ai/blog/how-do-ai-agents-pay-for-apis-and-why-they-dont-use-api-keys-20260325) Β· [Machine Payable Web is Blooming](https://www.pullthatupjamie.ai/blog/the-jamie-pull-request-1-the-machine-payable-web-is-blooming-20260324) --- ## πŸ‘€ For Humans β€” Web App Don't want to write code? [pullthatupjamie.ai/app?view=agent](https://pullthatupjamie.ai/app?view=agent) - πŸ’¬ Ask in plain English, get streaming responses with inline playable clips - πŸ§ͺ **Deep Mode** (default) β€” multi-step reasoning, cross-referenced sources, ~60–90s - ⚑ **Fast Mode** β€” single-pass answer, ~30–45s - πŸ’° Same 10Β’ per call either way - πŸ“¦ Bundle findings into shareable research sessions --- ## πŸ—οΈ What's Under the Hood | Layer | Stack | |-------|-------| | 🧠 Reasoning | DeepSeek V4-Flash (default), Anthropic Claude Haiku 4.5 (recovery + classifier), OpenAI fallback | | πŸ”Ž Search | Pinecone (vector) + MongoDB Atlas Search (lexical/proper-noun recall) + custom re-ranker | | πŸ“¦ Corpus | Hundreds of feeds, 10K+ episodes, millions of indexed paragraphs, 70K+ LLM-curated chapters | | 🎞️ Media | On-demand transcription, word-level subtitle generation, TikTok-style clip rendering | | 🌐 Edge | Express.js streaming SSE Β· CORS Β· DigitalOcean Spaces CDN | | πŸ’Ύ Data | MongoDB (Mongoose) Β· automated DO Spaces backups | | ⚑ Payments | L402 (BOLT11 macaroons) Β· Lightning Network Β· Square (legacy email subs) | --- ## πŸ” Auth β€” Pick Your Lane - ⚑ **L402 Lightning** (recommended for agents) β€” pay-per-request, no account, agent-native - πŸ†“ **Free tier** β€” `X-Free-Tier: true` header for metered exploration - πŸ›‘οΈ **JWT / email subscriptions** β€” traditional accounts for the web app and pro features - πŸ”‘ **Service HMAC** β€” for trusted internal integrations --- ## πŸ“‘ Endpoint Cheatsheet > πŸ—ΊοΈ **Always the source of truth:** [`/api/openapi.json`](https://pullthatupjamie-nsh57.ondigitalocean.app/api/openapi.json) and [`llms.txt`](https://www.pullthatupjamie.ai/llms.txt) ### πŸ€– Agent - `POST /api/pull` β€” one-call podcast research agent (L402) - `POST /api/chat/workflow` β€” agent chat with multi-turn + research sessions ### πŸ” Search & Discovery - `POST /api/search-quotes` β€” semantic transcript search (L402) - `POST /api/search-chapters` β€” chapter-level corpus survey (L402) - `POST /api/discover-podcasts` β€” NL podcast/episode discovery (L402) - `POST /api/on-demand/submitOnDemandRun` β€” transcribe + index any episode (L402) - `GET /api/corpus/*` β€” feed/episode/chapter/topic navigation ### 🎬 Clips & Media - `POST /api/make-clip` β€” generate subtitled clip - `GET /api/clip-status/:lookupHash` β€” poll clip status - `GET /api/render-clip/:lookupHash` β€” render with social-media metadata - `POST /api/jamie-assist/:lookupHash` β€” AI-generated promotional copy ### πŸ§ͺ Research Sessions - `POST /api/research-sessions` β€” create / fetch sessions - `POST /api/shared-research-sessions` β€” share-link layer ### ⚑ Auth & Payments - `GET /invoice-pool` β€” Lightning invoices - `POST /register-sub` β€” register email/Square subscription - `POST /api/validate-privs` β€” privilege check ### 🩺 Health - `GET /health` β€” status - `GET /api/get-clip-count` β€” usage stats --- ## ❓ FAQ ### What is Pull That Up Jamie? Pull That Up Jamie is an agent-orchestrated podcast research API. Ask any question in plain English and get back timestamped, deeplinked, audio-grounded answers from millions of indexed podcast paragraphs. It works for humans via the web app and for AI agents via a single L402-payable HTTP endpoint. ### How do AI agents use Jamie's API? Agents POST to `/api/pull` with a natural-language `message` and an `Authorization: L402 :` header. The server streams back SSE events with tool calls, intermediate results, a synthesized final answer with embedded clip tokens, and suggested follow-up actions. No API keys, no signup, no human in the loop. ### How does L402 authentication work? L402 combines HTTP `402 Payment Required` with Bitcoin Lightning. The agent makes a request, receives a 402 with a Lightning invoice, pays it (via Alby NWC, lnget, or any Lightning wallet), and retries with the proof of payment as the `Authorization` header. One macaroon covers every Jamie endpoint until the balance runs out. When you do not pass `?amountSats`, the default Lightning invoice is **auto-sized per endpoint**: sats are chosen from the endpoint’s list price in `creditInfo.pricingMicroUsd` at the current BTC/USD rate, plus a **~2%** buffer for cached-rate drift, then rounded up to whole sats. Each successful call still debits exactly that list price; the buffer only affects how much prepaid credit you receive in that top-up. ### What does it cost? - πŸ” Search & discovery endpoints: fractions of a cent per call (~$0.004–$0.005) - πŸ€– `/api/pull` agent endpoint: ~$0.10 per call (bounded, not per-token) - 🎧 On-demand transcription + indexing: ~$0.45 per episode - πŸ†“ Free tier available for evaluation ### Do I need an API key? No. Lightning payment *is* the authentication. There's also a free tier (`X-Free-Tier: true`) for evaluation, and traditional email/JWT auth if you specifically want an account-based flow. ### Where is the canonical API documentation? - πŸ€– **For agents:** [`https://www.pullthatupjamie.ai/llms.txt`](https://www.pullthatupjamie.ai/llms.txt) (capabilities, canonical workflows, integration patterns) - πŸ‘¨β€πŸ’» **For developers:** [`/api/docs`](https://pullthatupjamie-nsh57.ondigitalocean.app/api/docs) (Swagger UI) and [`/api/openapi.json`](https://pullthatupjamie-nsh57.ondigitalocean.app/api/openapi.json) ### What podcasts are indexed? Hundreds of feeds, 10K+ episodes, millions of paragraphs across shows like Joe Rogan Experience, Lex Fridman, Huberman Lab, TFTC, All-In, What Bitcoin Did, Acquired, and many more. Any episode from the 4M+ Podcast Index catalog can be transcribed and permanently indexed on demand via `/api/on-demand/submitOnDemandRun`. ### Why not just use ChatGPT or Spotify search? ChatGPT hallucinates β€” it'll confidently quote things people never said. Spotify searches episode titles and descriptions, not transcripts. Jamie searches the actual spoken words semantically and returns timestamped audio you can press play on. Ground truth, not paraphrase. ### What's Smart Mode vs Fast Mode? **Smart Mode** routes vague natural-language queries through an LLM that extracts guests, topics, feeds, and time frames *before* running semantic search β€” so "Rogan talking to that CIA guy about China" becomes a filtered, scoped query. **Fast Mode** runs a single-pass direct semantic match. Smart Mode is a conversation; Fast Mode is a scalpel. Same price. ### Does Jamie work with OpenClaw, Claude, or other agent frameworks? Yes. Any framework that can make HTTP requests and parse SSE can drive Jamie. There's also a ClawHub skill for OpenClaw and an Alby MCP server that plugs Lightning payments directly into Claude, Cursor, and similar agent runtimes. ### What is the machine-payable web? A vision of the internet where AI agents discover and pay for services in real time without accounts, API keys, or human intervention. Jamie is one of the first agent-research products built natively for this model. More: [The Machine Payable Web is Blooming](https://www.pullthatupjamie.ai/blog/the-jamie-pull-request-1-the-machine-payable-web-is-blooming-20260324). --- ## πŸ“š Further Reading - πŸ“ [Jamie's NLP Just Got a Lot Smarter (DeepSeek V4)](https://www.pullthatupjamie.ai/blog/jamies-nlp-just-got-a-lot-smarter-thanks-deepseek-v4-20260428) - πŸ“ [OpenClaw Is Great. Hosting & Paying the Bill Aren't. So I Built Jamie Pull.](https://www.pullthatupjamie.ai/blog/openclaw-is-great-hosting-paying-the-bill-arent-so-i-built-jamie-pull-20260421) - πŸ“ [How Do AI Agents Pay for APIs?](https://www.pullthatupjamie.ai/blog/how-do-ai-agents-pay-for-apis-and-why-they-dont-use-api-keys-20260325) - πŸ“ [The Jamie Pull Request #1 β€” The Machine Payable Web is Blooming](https://www.pullthatupjamie.ai/blog/the-jamie-pull-request-1-the-machine-payable-web-is-blooming-20260324) - 🧰 [Registering L402 Endpoints](docs/REGISTERING_L402_ENDPOINTS.md) - πŸ§ͺ [Agent Synthesis Pass](docs/AGENT_SYNTHESIS_PASS.md) --- ## πŸš€ Try It Now - πŸ‘€ **Human:** [pullthatupjamie.ai/app?view=agent](https://pullthatupjamie.ai/app?view=agent) - πŸ€– **Agent quick start:** point your agent at [`https://www.pullthatupjamie.ai/llms.txt`](https://www.pullthatupjamie.ai/llms.txt) - ⚑ **Already have a Lightning wallet?** `POST /api/pull` and go. > Keep building with us. The internet is shifting from something you stare at to something that works for you. 🌐