I
Infinibrary

Infinibrary API Documentation

Search and synthesize answers from knowledge vaults. Use the Discovery and Synthesis APIs to build AI applications with cited sources.

Quick Start

1

Get API Key

Sign up at the Developer Portal to generate your API key

2

Choose Your Method

Use /api/discovery for search or /api/synthesis for Q&A

3

Start Building

Integrate verified knowledge into your AI applications

#Authentication

All API requests require authentication using a Bearer token in the Authorization header:

Authorization: Bearer bw_your_api_key_here

Get your API key from the Developer Portal.

API Endpoints

Discovery API

Finds relevant books and papers that match your search query. Returns "Book Insight Cards" with AI-generated summaries.

Request

POST/api/discovery
{
  "query": "What is zero knowledge proof?",
  "filters": {
    "author": "Vitalik Buterin",
    "year_range": [2020, 2024]
  },
  "limit": 5
}

Response

{
  "results": [
    {
      "vault_id": "vault_123",
      "book_id": "book_456",
      "title": "Zero Knowledge Proofs",
      "author": "Vitalik Buterin",
      "relevance_score": 0.95,
      "ai_summary": "A comprehensive guide to ZKP cryptography...",
      "toc_snippets": ["Chapter 1: Basics", "Chapter 3: Applications"],
      "year": 2023,
      "cost_to_synthesize": 0.00111
    }
  ],
  "query_cost": 0.00111,
  "total_matches": 25,
  "execution_time_ms": 234
}

Code Examples

Using fetch API

// Discovery Search - use your deployment URL as base
const BASE_URL = 'https://api.infbr.com';
const searchBooks = async (query) => {
  const response = await fetch(BASE_URL + '/api/discovery', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
      'Authorization': 'Bearer bw_your_api_key'
    },
    body: JSON.stringify({ query, limit: 5 })
  });
  const data = await response.json();
  return data.results;
};

Rate Limits

111
Discovery requests per 55s
33
Synthesis requests per 55s
222
Ingestion requests per 55s

Pricing

$0.00111
per Discovery query
$0.0333
base Synthesis cost
FREE
Knowledge ingestion

Need Help?

Join our Discord community for support, share your integration stories, and connect with other developers building with Infinibrary.