- Visit Google AI Studio
- Sign in with your Google account
- Click "Create API Key"
- Copy your API key
# Clone the repository
git clone https://github.com/ayush-code303/Axiom-AiAgent.git
cd Axiom-AiAgent
# Install dependencies
npm install
# Configure environment
cp .env.example .env
# Edit .env and paste your API keynpm startServer starts at http://localhost:3000
# Test health check
curl http://localhost:3000/api/ai/health
# Test summarization
curl -X POST http://localhost:3000/api/ai/summarize \
-H "Content-Type: application/json" \
-d '{"content": "Your long text here to summarize..."}'
# Test claim extraction
curl -X POST http://localhost:3000/api/ai/extract-claims \
-H "Content-Type: application/json" \
-d '{"content": "Your text with factual claims..."}'- README.md - Full project documentation
- API_EXAMPLES.md - Detailed API examples in cURL, JavaScript, and Python
- ARCHITECTURE.md - Architecture overview and design decisions
Run the included example clients:
# Node.js example
node examples/client-example.js
# Python example (requires: pip install requests)
python examples/client-example.py| Method | Endpoint | Description |
|---|---|---|
| GET | / |
Welcome message |
| GET | /api/ai/health |
Health check |
| POST | /api/ai/summarize |
Summarize content |
| POST | /api/ai/extract-claims |
Extract factual claims |
const response = await fetch('http://localhost:3000/api/ai/summarize', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
content: 'Your text content here...'
})
});
const data = await response.json();
console.log(data.summary);Server won't start?
- Check that you've created
.envfile - Verify your API key is set in
.env - Make sure port 3000 is not in use
API returns errors?
- Verify your Gemini API key is valid
- Check that content is between 10-50,000 characters
- Look at server logs for detailed error messages
- Start Simple: Test with the health endpoint first
- Use Examples: Run the example clients to see it in action
- Build On It: The modular architecture makes it easy to add features
- Go Blockchain: The architecture is ready for blockchain integration
- Blockchain-based verification
- Hash generation for content integrity
- Smart contract integration
- Decentralized storage (IPFS)
- Verification badges
Check the full README.md or open an issue on GitHub.
Happy Hacking! 🚀