Quick Start
1. Get your API token
Your API requests are authenticated using a Bearer token. To obtain your token:
Log into app.knowbase.ai
Go to Account > Manage Account > Generate API Key
Copy your API token
You need a Pro or Team plan to access the API.
Rate Limits
Plan
Per Minute
Per Hour
Per Day
Pro
20
200
2,000
Team
60
600
5,000
2. Upload a file
import requests
url = "https://api.knowbase.ai/api/v1/files"
headers = {"Authorization": "Bearer YOUR_API_TOKEN"}
files = {"file": ("report.pdf", open("report.pdf", "rb"), "application/pdf")}
response = requests.post(url, headers=headers, files=files)
data = response.json()
print(data)
# {"message": "File uploaded successfully", "file_id": "abc-123-...", "status": "processing"}3. Check file status
Files need processing time (embedding). Poll until status is success:
4. Chat with your documents
5. Follow-up questions
Use the conversation_id to ask follow-up questions with context:
6. Query your entire library
Omit file_ids to search across all your uploaded documents:
7. Serving multiple users under one account
If you're integrating Knowbase into a product where each of your users has their own chat history, pass a stable session_id per user. Same session_id continues the same thread; different session_ids are fully isolated.
See Per-user sessions for the full reference.
Full workflow example
Last updated