~95% on SimpleQA (e.g. Qwen3.6-27B on a 3090). Supports all local and cloud LLMs (llama.cpp, Ollama, Google, ...). 10+ search engines - arXiv, PubMed, your private documents. Everything Local & Encrypted.
Python academiaanthropicarxivbravedeep-researchencryptionhome-automationhomeserverlocallocal-deep-researchlocal-llmmistralollamaopenaipubmedresearchresearch-toolretrieval-augmented-generationsearxngself-hosted
docs: Update API documentation with correct authentication flow
LearningCircuit6fd76ba14a48
diff --git a/README.md b/README.mdindex 1aa27f2367..bfd9ccaf67 100644--- a/README.md+++ b/README.md@@ -249,13 +249,20 @@ import requests# Create session and authenticatesession = requests.Session()++# First, get the login page to retrieve CSRF token for login+login_page = session.get("http://localhost:5000/auth/login")+# Extract CSRF token from HTML form (use BeautifulSoup or regex)+# For simplicity, assuming you have the token++# Login with form data (not JSON) including CSRF tokensession.post("http://localhost:5000/auth/login",- json={"username": "user", "password": "pass"})+ data={"username": "user", "password": "pass", "csrf_token": "..."})-# Get CSRF token+# Get CSRF token for API requestscsrf = session.get("http://localhost:5000/auth/csrf-token").json()["csrf_token"]-# Make API request+# Make API request with CSRF headerresponse = session.post("http://localhost:5000/research/api/start",json={"query": "Explain CRISPR gene editing"},diff --git a/docs/api-quickstart.md b/docs/api-quickstart.mdindex 580d57e0da..dcdc3686eb 100644--- a/docs/api-quickstart.md+++ b/docs/api-quickstart.md@@ -31,27 +31,38 @@ Example authentication flow:```pythonimport requests+from bs4 import BeautifulSoup# Create a session to persist cookiessession = requests.Session()-# 1. Login+# 1. Get login page and extract CSRF token for login+login_page = session.get("http://localhost:5000/auth/login")+soup = BeautifulSoup(login_page.text, 'html.parser')+csrf_input = soup.find('input', {'name': 'csrf_token'})+login_csrf = csrf_input.get('value') if csrf_input else None++# 2. Login with form data (not JSON) including CSRFlogin_response = session.post("http://localhost:5000/auth/login",- json={"username": "your_username", "password": "your_password"}+ data={+ "username": "your_username",+ "password": "your_password",+ "csrf_token": login_csrf+ })-if login_response.status_code == 200:+if login_response.status_code in [200, 302]:print("Login successful")# Session cookie is automatically storedelse:print(f"Login failed: {login_response.text}")-# 2. Get CSRF token for API requests+# 3. Get CSRF token for API requestscsrf_response = session.get("http://localhost:5000/auth/csrf-token")csrf_token = csrf_response.json()["csrf_token"]-# 3. Make API requests with authentication+# 4. Make API requests with CSRF headerheaders = {"X-CSRF-Token": csrf_token}api_response = session.post("http://localhost:5000/research/api/start",