API ReferenceAuthentication

Authentication

How to authenticate with the AIGodfather API.

API Keys

All requests require the Authorization header: Authorization: Bearer agf_live_xxx

Generate keys in Dashboard → Agents → API Keys. Keys start with agf_live_ and are scoped to a specific agent.

Key Scopes

Each key is scoped to a specific agent. Events sent with that key are automatically attributed to the agent.

🔴 Never expose API keys in client-side code. Use environment variables or secret managers.
bash
"tk-cmt"># All requests require the Authorization: Bearer header
curl -X POST https:"tk-cmt">//www.aigodfather.ai/api/v1/events \
  -H "Authorization: Bearer agf_live_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{ "action": "test" }'

"tk-cmt"># Invalid key → 401
{ "error": "Invalid API key" }

"tk-cmt"># Expired key → 401
{ "error": "API key has been revoked" }