{"openapi":"3.1.0","info":{"title":"Book402 — AI-Native Book Knowledge API","version":"1.0.0","description":"3,807 books searchable via hybrid BM25+vector search. Pay per query with USDC on Base via x402.","guidance":"Book402 is a book knowledge API. Use /search/hybrid?q= for semantic search across 3,807+ books. Use /books/:id/summary to get full AI-generated book summaries. Use /search/summaries?q= to search within summaries. Free endpoints: /stats, /genres, /books. Paid endpoints return HTTP 402 — sign a USDC payment on Base and retry with the payment header."},"servers":[{"url":"https://book402.com"}],"paths":{"/search/hybrid":{"get":{"summary":"Hybrid book search (BM25 + vector)","description":"Search 3,807 books using BM25 keyword + vector similarity. Returns ranked results with titles, authors, genres.","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string"},"description":"Search query"},{"name":"limit","in":"query","schema":{"type":"integer","default":20},"description":"Max results"}],"responses":{"200":{"description":"Search results"},"402":{"description":"Payment Required"}},"x-payment-info":{"protocols":["x402"],"pricingMode":"fixed","price":"0.01"}}},"/books/{id}/summary":{"get":{"summary":"Get full book summary","description":"Returns the full AI-generated summary/transcription for a specific book.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"},"description":"Book ID"}],"responses":{"200":{"description":"Book summary"},"402":{"description":"Payment Required"},"404":{"description":"Book not found"}},"x-payment-info":{"protocols":["x402"],"pricingMode":"fixed","price":"0.05"}}},"/search/summaries":{"get":{"summary":"Full-text search in book summaries","description":"Search within book summaries/transcriptions for specific concepts or passages.","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string"},"description":"Search query"},{"name":"limit","in":"query","schema":{"type":"integer","default":20},"description":"Max results"}],"responses":{"200":{"description":"Summary search results"},"402":{"description":"Payment Required"}},"x-payment-info":{"protocols":["x402"],"pricingMode":"fixed","price":"0.02"}}},"/stats":{"get":{"summary":"Collection statistics","description":"Returns total books, books with summaries, and genre count.","responses":{"200":{"description":"Stats object"}}}},"/genres":{"get":{"summary":"List all genres","description":"Returns all book genres with counts.","responses":{"200":{"description":"Array of genres"}}}},"/books":{"get":{"summary":"Browse books","description":"List all books with optional search, genre filter, pagination.","parameters":[{"name":"q","in":"query","schema":{"type":"string"},"description":"Search query"},{"name":"genre","in":"query","schema":{"type":"string"},"description":"Filter by genre"},{"name":"limit","in":"query","schema":{"type":"integer","default":20},"description":"Max results"},{"name":"offset","in":"query","schema":{"type":"integer","default":0},"description":"Offset"}],"responses":{"200":{"description":"Array of books"}}}},"/books/{id}":{"get":{"summary":"Get book by ID","description":"Returns book metadata by ID.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"},"description":"Book ID"}],"responses":{"200":{"description":"Book object"},"404":{"description":"Not found"}}}},"/discover":{"get":{"summary":"Service catalog","description":"Human-readable JSON service catalog with all endpoints, pricing, and payment info.","responses":{"200":{"description":"Service catalog"}}}}}}