Getting Started
Get up and running with FreeAI in under 5 minutes. This guide will walk you through the basic setup and your first API call.
Prerequisites
- • Node.js 18+ installed
- • npm, yarn, pnpm, or bun package manager
- • Basic knowledge of JavaScript/React
- • (Optional) AI provider API keys for enhanced functionality
1. Installation
Clone the FreeAI repository and install dependencies:
git clone https://github.com/your-username/free-agi.git
cd free-agi
npm install
2. Environment Configuration
Create a .env.local
file in your project root:
# Optional: AI Provider API Keys
GEMINI_API_KEY=your_gemini_api_key_here
GROQ_API_KEY=your_groq_api_key_here
# Optional: Custom Configuration
PUPPETEER_HEADLESS=true
PUPPETEER_STEALTH=true
Note: API keys are optional. FreeAI will fall back to browser automation if no API keys are provided.
3. Start the Development Server
npm run dev
Open http://localhost:3000in your browser to see the FreeAI interface.
4. Your First API Call
Test the chat API with a simple request:
const response = await fetch('http://localhost:3000/api/chat', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
message: 'Hello, FreeAI! Can you help me automate web tasks?'
})
});
const data = await response.json();
console.log(data.response);
Expected Response
{
"response": "Hello! I'm FreeAI, and I'd be happy to help you with web automation tasks. I can assist with browser automation, data extraction, AI-powered web interactions, and much more. What specific task would you like help with?",
"provider": "gemini",
"timestamp": "2024-12-06T10:30:00.000Z"
}
Next Steps
Explore Features
Learn about advanced features like stealth browsing, data extraction, and multi-provider AI integration.
View Features →API Reference
Dive deep into the API documentation to understand all available endpoints and parameters.
View API Docs →Try the Playground
Experiment with FreeAI interactively using our web-based playground.
Open Playground →Troubleshooting
Port Already in Use
If port 3000 is already in use, Next.js will automatically try the next available port (3001, 3002, etc.).
Puppeteer Installation Issues
If you encounter Puppeteer installation issues, try: npm install --force
Need Help?
If you run into any issues during setup, check our support page orcontact us for assistance.