Build with
Liquid Intelligence
Library Mind API transforms static documents into queryable, semantic knowledge bases. Seamlessly integrate context-aware retrieval and literary personalities into your applications.
Authentication
Authenticate requests using a Bearer token. Tokens carry the permissions of the user who generated them. Keep your keys secure and never expose them in client-side code.
Security Best Practice
Rotate your production keys every 90 days. If a key is compromised, revoke it immediately via the Portal.
Authorization: Bearer lm_sk_live_...My Library
Retrieve a list of all your analyzed documents and their IDs. Use these IDs to initiate Knowledge Chat sessions.
import requests
url = "https://librarymind.com/api/v1/library/index"
headers = {"Authorization": "Bearer YOUR_KEY"}
response = requests.get(url, headers=headers)
print(response.json())Analyze Document
Upload raw documents (PDF, DOCX, TXT) for vectorization. The system processes the file, extracts semantic meaning, and indexes it for rapid retrieval. The analyzed document is automatically added to your library.
Token Consumption
Analysis operations are computationally expensive. Each document consumes 2,000 credits from your quota.
Multipart Form Parameters
- The document (PDF, DOCX, TXT)
fileRequired • File - Display name for the book in your library
fileNameRequired • String
cURL File Upload Tip
When using cURL, prefix the local file path with an @ symbol (e.g., file=@/path/to/doc.pdf). Do not use the file:// protocol.
import requests
url = "https://librarymind.com/api/v1/library/analyze"
headers = {"Authorization": "Bearer YOUR_KEY"}
files = {"file": open("whitepaper.pdf", "rb")}
data = {"fileName": "Q4 Research"}
response = requests.post(url, headers=headers, files=files, data=data)
print(response.json())Delete Document
Remove a document from your library and delete its associated data.
-d "{\"title\": \"document_id\"}"Body Parameters
- Use the original name of the book (returned as
titleRequired • StringoriginalFileNamein My Library) to delete it.
import requests
url = "https://librarymind.com/api/v1/library/delete"
headers = {"Authorization": "Bearer YOUR_KEY"}
json_data = {"title": "originalFileName"}
response = requests.post(url, headers=headers, json=json_data)
print(response.json())Knowledge Chat
In DevelopmentThe core endpoint for retrieval. Send a user prompt along with a document title to receive a context-aware response generated by the underlying LLM.
Body Parameters
- The title (identifier) of the analyzed book
titleRequired • String - The question or prompt for the AI
messageRequired • String
import requests
url = "https://librarymind.com/api/v1/chat"
headers = {"Authorization": "Bearer YOUR_KEY"}
json_data = {
"title": "Karel Capek - RUR",
"message": "Who is Rossum?"
}
response = requests.post(url, headers=headers, json=json_data)
print(response.json())AI Personalities
In DevelopmentInteract with simulated literary giants. Our models are fine-tuned on the works and correspondence of historical figures to provide authentic dialogue.
Body Parameters
- The unique ID of the personality
personality_idRequired • String - The message for the AI personality
messageRequired • String
import requests
url = "https://librarymind.com/api/v1/chat"
headers = {"Authorization": "Bearer YOUR_KEY"}
json_data = {
"personality_id": "capek-1",
"message": "What is your view on robotics?"
}
response = requests.post(url, headers=headers, json=json_data)
print(response.json())