Alfred API Integration Guide
The Alfred API lets you programmatically interact with Alfred AI from your own applications, scripts, and third-party services. You can send prompts, retrieve AI-generated content, trigger workflows, and query your knowledge base—all via simple HTTP requests.
Authentication
All API requests require an API key. Generate one from Account → API Keys → Create Key. Include the key in the Authorization header:
Authorization: Bearer YOUR_API_KEY
API keys inherit the permissions of the account that created them. Create separate keys for different applications and rotate them every 90 days.
Base URL
https://api.gositeme.com/alfred/v1
Core Endpoints
| Method | Endpoint | Description |
|---|---|---|
| POST | /chat | Send a message and receive Alfred's response |
| POST | /generate | Generate content (articles, emails, code) |
| POST | /knowledge/query | Search your custom knowledge base |
| POST | /workflows/trigger | Trigger a workflow by ID or name |
| GET | /workflows/status/{id} | Check the status of a workflow run |
Example: Sending a Chat Message
curl -X POST https://api.gositeme.com/alfred/v1/chat \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"message": "Summarize my website traffic for this week", "personality": "professional"}'
Response:
{
"response": "This week your site received 3,412 visitors...",
"tokens_used": 245,
"sources": []
}
Rate Limits
- Starter: 60 requests/minute, 10,000 requests/day
- Business: 300 requests/minute, 100,000 requests/day
- Enterprise: Custom limits
Rate limit headers (X-RateLimit-Remaining, X-RateLimit-Reset) are included in every response.
Webhooks
Configure webhook endpoints under Alfred → API → Webhooks to receive real-time notifications when workflows complete, knowledge base documents are updated, or errors occur. All webhook payloads include an HMAC signature for verification.
SDKs & Libraries
Official SDKs are available for:
- JavaScript/Node.js:
npm install @gositeme/alfred-sdk - Python:
pip install gositeme-alfred - PHP:
composer require gositeme/alfred-sdk
Each SDK provides typed interfaces, automatic retry logic, and built-in rate limit handling.