{"openapi":"3.1.0","info":{"title":"Receipts","version":"1.0.0","description":"AI-powered video intelligence for short-form content. Drop any TikTok, Instagram Reel, or YouTube Short. Identify products, debunk ads, fact-check claims. Pay per request with USDC via x402 (Base/Solana) or MPP (Tempo). No accounts, no API keys. Payment settles at job acceptance, not completion. Failed jobs are not refunded.","contact":{"name":"Receipts API","url":"https://api.leoclaw.cc"},"x-logo":{"url":"https://api.leoclaw.cc/logo.png","altText":"Receipts - Video Intelligence API"},"x-guidance":"# Receipts - Video Intelligence API\n\n## Quick Start\n\n1. POST a video URL to any endpoint\n2. You'll get a 402 response with payment requirements (Base or Solana USDC)\n3. Sign a payment, include it in the X-PAYMENT header, and resend\n4. Receive 202 Accepted with { job_id, poll_url, status: 'processing', estimated_completion_seconds }. Poll GET /jobs/{id} every 2–5s until status is 'complete' (result in result field) or 'failed' (error in error field).\n\n## Endpoints\n\n| Endpoint | Price | Use Case |\n|----------|-------|----------|\n| POST /analyze | $0.10 | Full content breakdown: transcript, scenes, topics, sentiment |\n| POST /product-id | $0.25 | Identify every product, brand, and price shown or mentioned |\n| POST /ad-debunk | $0.15 | Evaluate ad claims with true/misleading/false verdicts |\n| POST /verify | $0.15 | Fact-check claims with confidence-rated verdicts |\n\n## Request Format\n\nAll endpoints accept: `{ \"url\": \"<video-url>\" }`\n\nSupported platforms: Instagram Reels, TikTok, YouTube Shorts, and most public video URLs.\n\n## Discovery\n\n- OpenAPI spec: GET /openapi.json\n- x402 discovery: GET /.well-known/x402\n- Landing page: GET /\n\n## Payment Networks\n\n- **Base** (EVM): USDC on Base mainnet (x402)\n- **Solana** (SVM): USDC on Solana mainnet (x402)\n- **Tempo**: USDC on Tempo chain (MPP - Machine Payments Protocol)\n\n## Payment Protocols\n\n- **x402**: Include signed payment in `X-PAYMENT` header\n- **MPP**: Include payment credential in `Authorization: Payment <credential>` header\n- Both protocols accepted on all endpoints. Use whichever your agent supports.\n\n## Error Handling\n\n- 202: Accepted. Payment settled, job queued for async processing. Poll /jobs/{id} for result.\n- 400: Missing or invalid `url` in request body\n- 402: Payment required (includes payment requirements in response)\n- 405: Wrong HTTP method (use POST, not GET)\n- Processing errors (URL unreachable, unsupported format, LLM failure, etc.) surface as `{ status: 'failed', error: <message> }` on GET /jobs/{id}, not as 5xx HTTP responses. The initial paid request always returns 202 if payment succeeds; actual processing failures appear on the polling endpoint."},"externalDocs":{"description":"View on x402scan marketplace","url":"https://www.x402scan.com/server/d9bdecb9-2966-4d14-86f6-b5af3cd446ae"},"servers":[{"url":"https://api.leoclaw.cc"}],"tags":[{"name":"analysis","description":"Video content analysis and intelligence"},{"name":"verification","description":"Claim verification and fact-checking"}],"paths":{"/analyze":{"post":{"operationId":"analyzeVideo","tags":["analysis"],"summary":"Full video content analysis (async)","description":"Extracts structured metadata from a short-form video including transcript, detected scenes, topic classification, sentiment analysis, and key moments. Runs asynchronously: payment is verified and settled on this request, the response returns a job_id, and clients poll GET /jobs/{id} until status is 'complete'. Typical completion: ~60s.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["url"],"properties":{"url":{"type":"string","format":"uri","description":"Public URL of the video to analyze. Supports Instagram Reels, TikTok, YouTube Shorts, and most public video URLs.","examples":["https://www.tiktok.com/@user/video/1234567890","https://www.instagram.com/reel/ABC123/"]}}}}}},"responses":{"202":{"description":"Job accepted. Poll the poll_url until status flips to 'complete' or 'failed'. Typical completion ~60s. Payment has been settled. The background job may still fail — poll /jobs/{id} for final status. Failed jobs are not refunded.","content":{"application/json":{"schema":{"type":"object","required":["job_id","poll_url","status","estimated_completion_seconds"],"properties":{"job_id":{"type":"string","format":"uuid","description":"Unique job identifier. Use with GET /jobs/{id}."},"poll_url":{"type":"string","format":"uri","description":"Absolute URL to poll for job status and result."},"status":{"type":"string","enum":["processing"],"description":"Always 'processing' at job creation."},"estimated_completion_seconds":{"type":"integer","description":"Approximate seconds until the job finishes."}}},"example":{"job_id":"3f7a2e1c-9b4d-4f8a-b2c7-6d3e1a5f9c0d","poll_url":"https://api.leoclaw.cc/jobs/3f7a2e1c-9b4d-4f8a-b2c7-6d3e1a5f9c0d","status":"processing","estimated_completion_seconds":60}}}},"400":{"description":"Missing or invalid URL","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message"}},"required":["error"]}}}},"402":{"description":"Payment required. Include X-PAYMENT header with signed USDC payment.","content":{"application/json":{"schema":{"type":"object","properties":{"x402Version":{"type":"integer","const":1},"error":{"type":"string"},"accepts":{"type":"array","description":"Payment requirements for Base and/or Solana USDC"}}}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message"}},"required":["error"]}}}}},"x-result-schema":{"description":"Shape of the `result` field on GET /jobs/{id} when status is 'complete'.","type":"object","properties":{"title":{"type":"string","description":"Video title or caption"},"duration":{"type":"number","description":"Video duration in seconds"},"transcript":{"type":"string","description":"Full transcript of spoken content"},"topics":{"type":"array","items":{"type":"string"},"description":"Detected topic categories"},"sentiment":{"type":"string","enum":["positive","negative","neutral","mixed"],"description":"Overall sentiment"},"scenes":{"type":"array","items":{"type":"object"},"description":"Detected scene segments with timestamps"},"key_moments":{"type":"array","items":{"type":"object"},"description":"Notable moments with timestamps and descriptions"}}},"x-payment-info":{"protocols":["x402","mpp"],"pricingMode":"fixed","price":"0.10","currency":"USD","networks":["base","solana","tempo"],"asset":"USDC"}}},"/product-id":{"post":{"operationId":"identifyProducts","tags":["analysis"],"summary":"Identify products shown or mentioned in video (async)","description":"Detects and identifies every product, brand, and item visible or mentioned in a short-form video. Returns product names, brands, categories, confidence scores, estimated prices, and suggested purchase links. Runs asynchronously: response returns a job_id, poll GET /jobs/{id} for the result. Typical completion: ~75s.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["url"],"properties":{"url":{"type":"string","format":"uri","description":"Public URL of the video to analyze. Supports Instagram Reels, TikTok, YouTube Shorts, and most public video URLs.","examples":["https://www.tiktok.com/@user/video/1234567890","https://www.instagram.com/reel/ABC123/"]}}}}}},"responses":{"202":{"description":"Job accepted. Poll the poll_url until status flips to 'complete' or 'failed'. Typical completion ~75s. Payment has been settled. The background job may still fail — poll /jobs/{id} for final status. Failed jobs are not refunded.","content":{"application/json":{"schema":{"type":"object","required":["job_id","poll_url","status","estimated_completion_seconds"],"properties":{"job_id":{"type":"string","format":"uuid","description":"Unique job identifier. Use with GET /jobs/{id}."},"poll_url":{"type":"string","format":"uri","description":"Absolute URL to poll for job status and result."},"status":{"type":"string","enum":["processing"],"description":"Always 'processing' at job creation."},"estimated_completion_seconds":{"type":"integer","description":"Approximate seconds until the job finishes."}}},"example":{"job_id":"a1b2c3d4-e5f6-7890-abcd-ef0123456789","poll_url":"https://api.leoclaw.cc/jobs/a1b2c3d4-e5f6-7890-abcd-ef0123456789","status":"processing","estimated_completion_seconds":75}}}},"400":{"description":"Missing or invalid URL","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message"}},"required":["error"]}}}},"402":{"description":"Payment required. Include X-PAYMENT header with signed USDC payment.","content":{"application/json":{"schema":{"type":"object","properties":{"x402Version":{"type":"integer","const":1},"error":{"type":"string"},"accepts":{"type":"array","description":"Payment requirements for Base and/or Solana USDC"}}}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message"}},"required":["error"]}}}}},"x-result-schema":{"description":"Shape of the `result` field on GET /jobs/{id} when status is 'complete'.","type":"object","required":["products"],"properties":{"products":{"type":"array","items":{"type":"object","required":["name","brand","category","confidence"],"properties":{"name":{"type":"string","description":"Product name"},"brand":{"type":"string","description":"Brand or manufacturer"},"category":{"type":"string","description":"Product category (e.g. skincare, electronics)"},"confidence":{"type":"number","minimum":0,"maximum":1,"description":"Identification confidence (0-1)"},"price_range":{"type":"string","description":"Estimated price range (e.g. '$20-$30')"},"buy_links":{"type":"array","items":{"type":"string"},"description":"Suggested retailer URLs or search terms"}}}}}},"x-payment-info":{"protocols":["x402","mpp"],"pricingMode":"fixed","price":"0.25","currency":"USD","networks":["base","solana","tempo"],"asset":"USDC"}}},"/ad-debunk":{"post":{"operationId":"debunkAd","tags":["verification"],"summary":"Evaluate advertising claims in video (async)","description":"Extracts every product and advertising claim made in a video, evaluates each against available scientific evidence and consumer reports, and rates their validity. Returns claim-by-claim verdicts (true/misleading/false) with an overall trustworthiness rating. Runs asynchronously: response returns a job_id, poll GET /jobs/{id} for the result. Typical completion: ~90s.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["url"],"properties":{"url":{"type":"string","format":"uri","description":"Public URL of the video to analyze. Supports Instagram Reels, TikTok, YouTube Shorts, and most public video URLs.","examples":["https://www.tiktok.com/@user/video/1234567890","https://www.instagram.com/reel/ABC123/"]}}}}}},"responses":{"202":{"description":"Job accepted. Poll the poll_url until status flips to 'complete' or 'failed'. Typical completion ~90s. Payment has been settled. The background job may still fail — poll /jobs/{id} for final status. Failed jobs are not refunded.","content":{"application/json":{"schema":{"type":"object","required":["job_id","poll_url","status","estimated_completion_seconds"],"properties":{"job_id":{"type":"string","format":"uuid","description":"Unique job identifier. Use with GET /jobs/{id}."},"poll_url":{"type":"string","format":"uri","description":"Absolute URL to poll for job status and result."},"status":{"type":"string","enum":["processing"],"description":"Always 'processing' at job creation."},"estimated_completion_seconds":{"type":"integer","description":"Approximate seconds until the job finishes."}}},"example":{"job_id":"b2c3d4e5-f6a7-8901-bcde-f12345678901","poll_url":"https://api.leoclaw.cc/jobs/b2c3d4e5-f6a7-8901-bcde-f12345678901","status":"processing","estimated_completion_seconds":90}}}},"400":{"description":"Missing or invalid URL","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message"}},"required":["error"]}}}},"402":{"description":"Payment required. Include X-PAYMENT header with signed USDC payment.","content":{"application/json":{"schema":{"type":"object","properties":{"x402Version":{"type":"integer","const":1},"error":{"type":"string"},"accepts":{"type":"array","description":"Payment requirements for Base and/or Solana USDC"}}}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message"}},"required":["error"]}}}}},"x-result-schema":{"description":"Shape of the `result` field on GET /jobs/{id} when status is 'complete'.","type":"object","required":["product","claims","overall_rating","recommendation"],"properties":{"product":{"type":"string","description":"The main product or service being advertised"},"claims":{"type":"array","items":{"type":"object","required":["claim","verdict","evidence"],"properties":{"claim":{"type":"string","description":"The specific claim made"},"verdict":{"type":"string","enum":["true","misleading","false","unverifiable"]},"evidence":{"type":"string","description":"Evidence supporting the verdict"},"sources":{"type":"array","items":{"type":"string"},"description":"Source URLs"}}}},"overall_rating":{"type":"string","enum":["trustworthy","mostly_accurate","somewhat_misleading","very_misleading","deceptive"]},"recommendation":{"type":"string","description":"Consumer recommendation"}}},"x-payment-info":{"protocols":["x402","mpp"],"pricingMode":"fixed","price":"0.15","currency":"USD","networks":["base","solana","tempo"],"asset":"USDC"}}},"/verify":{"post":{"operationId":"factCheckVideo","tags":["verification"],"summary":"Fact-check claims made in video (async)","description":"Extracts every factual claim from a video (statistics, historical claims, scientific assertions, quotes, attributions) and verifies each against known evidence. Returns confidence-rated verdicts with explanations and an overall credibility assessment. Runs asynchronously: response returns a job_id, poll GET /jobs/{id} for the result. Typical completion: ~90s.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["url"],"properties":{"url":{"type":"string","format":"uri","description":"Public URL of the video to analyze. Supports Instagram Reels, TikTok, YouTube Shorts, and most public video URLs.","examples":["https://www.tiktok.com/@user/video/1234567890","https://www.instagram.com/reel/ABC123/"]}}}}}},"responses":{"202":{"description":"Job accepted. Poll the poll_url until status flips to 'complete' or 'failed'. Typical completion ~90s. Payment has been settled. The background job may still fail — poll /jobs/{id} for final status. Failed jobs are not refunded.","content":{"application/json":{"schema":{"type":"object","required":["job_id","poll_url","status","estimated_completion_seconds"],"properties":{"job_id":{"type":"string","format":"uuid","description":"Unique job identifier. Use with GET /jobs/{id}."},"poll_url":{"type":"string","format":"uri","description":"Absolute URL to poll for job status and result."},"status":{"type":"string","enum":["processing"],"description":"Always 'processing' at job creation."},"estimated_completion_seconds":{"type":"integer","description":"Approximate seconds until the job finishes."}}},"example":{"job_id":"c3d4e5f6-a7b8-9012-cdef-234567890123","poll_url":"https://api.leoclaw.cc/jobs/c3d4e5f6-a7b8-9012-cdef-234567890123","status":"processing","estimated_completion_seconds":90}}}},"400":{"description":"Missing or invalid URL","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message"}},"required":["error"]}}}},"402":{"description":"Payment required. Include X-PAYMENT header with signed USDC payment.","content":{"application/json":{"schema":{"type":"object","properties":{"x402Version":{"type":"integer","const":1},"error":{"type":"string"},"accepts":{"type":"array","description":"Payment requirements for Base and/or Solana USDC"}}}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message"}},"required":["error"]}}}}},"x-result-schema":{"description":"Shape of the `result` field on GET /jobs/{id} when status is 'complete'.","type":"object","required":["claims","overall_credibility","summary"],"properties":{"claims":{"type":"array","items":{"type":"object","required":["claim","verdict","explanation","confidence"],"properties":{"claim":{"type":"string","description":"The specific factual claim"},"verdict":{"type":"string","enum":["true","mostly_true","half_true","mostly_false","false","unverifiable"]},"explanation":{"type":"string","description":"Why this verdict was given"},"confidence":{"type":"number","minimum":0,"maximum":1,"description":"Confidence in the verdict (0-1)"}}}},"overall_credibility":{"type":"string","enum":["high","medium","low","very_low"]},"summary":{"type":"string","description":"Overall assessment of the video's factual accuracy"}}},"x-payment-info":{"protocols":["x402","mpp"],"pricingMode":"fixed","price":"0.15","currency":"USD","networks":["base","solana","tempo"],"asset":"USDC"}}},"/jobs/{id}":{"get":{"operationId":"getJob","tags":["analysis","verification"],"summary":"Poll an async job's status and result","description":"Returns the current status of a job created by any paid endpoint. Poll until `status` is 'complete' (result is available) or 'failed' (error is available). Jobs are retained for 1 hour after creation, then expire. No payment required.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Job ID returned from a paid endpoint's 202 response."}],"responses":{"200":{"description":"Job status. Shape of the result field depends on the paid endpoint that created the job (see that endpoint's x-result-schema).","content":{"application/json":{"schema":{"type":"object","required":["id","status","created_at"],"properties":{"id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["processing","complete","failed"]},"created_at":{"type":"integer","description":"Epoch milliseconds when the job was created."},"completed_at":{"type":"integer","description":"Epoch milliseconds when the job finished (present when status is complete or failed)."},"result":{"description":"Job result payload (present when status is complete). Shape depends on the originating endpoint."},"error":{"type":"string","description":"Error message (present when status is failed)."}}},"examples":{"processing":{"summary":"Job is still running","value":{"id":"3f7a2e1c-9b4d-4f8a-b2c7-6d3e1a5f9c0d","status":"processing","created_at":1713868800000}},"complete":{"summary":"Job finished successfully","value":{"id":"3f7a2e1c-9b4d-4f8a-b2c7-6d3e1a5f9c0d","status":"complete","created_at":1713868800000,"completed_at":1713868860000,"result":{"topics":["Beauty","Skincare"],"sentiment":"positive"}}},"failed":{"summary":"Job failed","value":{"id":"3f7a2e1c-9b4d-4f8a-b2c7-6d3e1a5f9c0d","status":"failed","created_at":1713868800000,"completed_at":1713868810000,"error":"Video URL unreachable"}}}}}},"404":{"description":"Job not found or expired (TTL is 1 hour)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message"}},"required":["error"]}}}}}}}}}