v1.0.0
Menu
Complete API reference for Basil's RESTful endpoints. Build powerful search applications with semantic search, AI-powered Q&A, and more.
http://localhost:8000
All API endpoints are relative to this base URL. For production deployments, replace localhost:8000 with your server's address.
| Method | Endpoint | Description | Example |
|---|---|---|---|
| GET | / | API information | Basic API info |
| POST | /search | Semantic search with JSON | {"query": "text", "max_results": 5} |
| GET | /search/query | Search with query params | ?q=search&max_results=5 |
| POST | /ask | AI-powered Q&A | {"question": "your question"} |
| GET | /health | Health check | System status |
| GET | /stats | Database statistics | Collection info |
Perform semantic search using JSON request body. This is the primary search endpoint with full parameter support.
Simple search using URL query parameters. Perfect for quick searches and browser integration.
| Parameter | Type | Required | Description |
|---|---|---|---|
| q | string | Yes | Search query |
| max_results | integer | No | Maximum results (default: 5) |
| threshold | float | No | Similarity threshold (default: 0.0) |
Ask natural language questions and get AI-generated answers based on the scraped content.
Analyze user messages to detect intent and extract key information for routing or processing.
Check the health and status of the Basil API and its components.
Get database statistics and collection information.
Reload the vector database with fresh data. Useful after adding new content.
Basil API uses standard HTTP status codes and returns detailed error information in JSON format.
Explore and test all endpoints interactively with full parameter documentation and examples.
Open API DocumentationDownload the complete OpenAPI 3.0 specification for integration with your tools.
Download OpenAPI Schema