Prerequisites
Before you begin, ensure you have the following installed:- Python 3.11 or higher - Download Python
- Git - For cloning the repository
- OpenRouter API Key - Get a free key at OpenRouter
OpenRouter provides access to multiple AI models including free options like Gemini and Llama. The free tier is sufficient to run SeanceAI.
Installation Steps
Create a virtual environment
Create and activate a Python virtual environment to isolate dependencies:
You should see
(venv) appear at the start of your terminal prompt, indicating the virtual environment is active.Install dependencies
Install all required Python packages using pip:This will install the following packages:
flask==3.0.0- Web frameworkgunicorn==21.2.0- Production WSGI servergevent==24.2.1- Async support for streamingrequests==2.31.0- HTTP library for API callspython-dotenv==1.0.0- Environment variable management
Configure environment variables
Create a See the Configuration page for more environment variable options.
.env file in the project root directory and add your OpenRouter API key:Verifying the Installation
To verify that everything is working correctly:- Check the health endpoint: Visit
http://localhost:5000/api/healthin your browser - View available figures: Visit
http://localhost:5000/api/figuresto see the list of historical figures - Test a conversation: Select a historical figure and send a message
If you encounter any issues, check that:
- Your Python version is 3.11 or higher (
python --version) - The virtual environment is activated
- Your OpenRouter API key is correctly set in the
.envfile - Port 5000 is not being used by another application
Next Steps
- Learn about Configuration Options
- Deploy your instance with the Deployment Guide
- Explore the API Documentation