Automagik Tools requires authentication for various integrations and services. This guide covers obtaining and configuring all necessary API keys and credentials.
Different tools require different credentials. Configure only what you need for your use case.
# Use cheaper models for developmentGENIE_MODEL=gpt-4.1-miniAUTOMAGIK_TOOLS_OPENAI_MODEL=gpt-4.1-mini# Set usage limits in OpenAI dashboard# platform.openai.com/account/billing/limits
If you’re using Automagik Suite (Spark, Hive, Forge, Omni):
1
Get Your API Key
Your Automagik API key is provided when you set up Automagik Suite
Copy
# Check your Automagik installationcat ~/.automagik/config.json | grep api_key
2
Configure Tools
Copy
export AUTOMAGIK_API_KEY=your-api-key-hereexport AUTOMAGIK_BASE_URL=http://localhost:8881# Or in .envAUTOMAGIK_API_KEY=your-api-key-hereAUTOMAGIK_BASE_URL=http://localhost:8881
3
Verify Connection
Copy
# Test with automagik tooluvx automagik-tools tool automagik --transport stdio# Or test the endpoint directlycurl -H "Authorization: Bearer your-api-key-here" \ http://localhost:8881/api/v1/health
# Check Evolution API logs for the generated keydocker logs evolution-api | grep "API Key"# Or set your own key in environmentEVOLUTION_API_KEY=your-custom-key
# Use the evolution-api tool to create instanceuvx automagik-tools tool evolution-api --transport stdio# Or via APIcurl -X POST https://your-domain.com/instance/create \ -H "apikey: your-key-here" \ -d '{"instanceName": "my_whatsapp_instance"}'
5
Connect WhatsApp
Copy
# Get QR codecurl https://your-domain.com/instance/connect/my_whatsapp_instance \ -H "apikey: your-key-here"# Scan QR code with WhatsApp mobile app
For testing or security, restrict messages to a single recipient:
Copy
# Only send to this numberEVOLUTION_API_FIXED_RECIPIENT=+1234567890@s.whatsapp.net# This removes the 'phone' parameter from all tools# All messages automatically go to the fixed recipient
# Test key directlycurl https://api.openai.com/v1/models \ -H "Authorization: Bearer $OPENAI_API_KEY"
Automagik Suite connection refused
Copy
Error: Could not connect to Automagik Suite
Solutions:
Copy
# Check if service is runningcurl http://localhost:8881/health# Verify API key formatecho $AUTOMAGIK_API_KEY# Test with explicit auth headercurl -H "Authorization: Bearer $AUTOMAGIK_API_KEY" \ http://localhost:8881/api/v1/health
WhatsApp instance not found
Copy
Error: WhatsApp instance 'my_instance' not found
Solutions:
Copy
# List available instancescurl https://your-domain.com/instance/fetchInstances \ -H "apikey: $EVOLUTION_API_KEY"# Create instance if neededcurl -X POST https://your-domain.com/instance/create \ -H "apikey: $EVOLUTION_API_KEY" \ -d '{"instanceName": "my_instance"}'# Verify environment variableecho $EVOLUTION_API_INSTANCE