Quick Start
Get up and running with Alfred AI in under 5 minutes. Alfred provides 875+ AI tools accessible via REST API, voice commands, and the web dashboard.
Step 1: Create an Account
Sign up at gositeme.com/alfred.php or use the API:
curl -X POST https://gositeme.com/api/auth.php \
-H "Content-Type: application/json" \
-d '{
"action": "register",
"email": "you@example.com",
"password": "your-secure-password",
"name": "Your Name"
}'
Step 2: Get Your API Key
After registration, log in to retrieve your session token:
curl -X POST https://gositeme.com/api/auth.php \
-H "Content-Type: application/json" \
-d '{
"action": "login",
"email": "you@example.com",
"password": "your-secure-password"
}'
# Response:
# {
# "success": true,
# "token": "sess_abc123...",
# "user": { "id": 42, "name": "Your Name", "plan": "starter" }
# }
Step 3: Call Your First Tool
Execute any of 875+ tools with a single API call:
const response = await fetch('https://gositeme.com/api/tools.php?action=execute', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer sess_abc123...'
},
body: JSON.stringify({
tool_name: 'summarize_text',
args: {
text: 'Your long article text here...',
max_length: 200
}
})
});
const data = await response.json();
console.log(data.result); // Summarized text
Installation
Alfred is primarily a cloud-based API — no installation required. Access it via REST endpoints, the web dashboard, or voice calls.
Web Dashboard
Visit gositeme.com/alfred.php to use Alfred directly in your browser. Log in and start chatting immediately.
Desktop App (GoCodeMe)
Download GoCodeMe for a native desktop experience with built-in Alfred integration:
# Download GoCodeMe AppImage
wget https://gositeme.com/downloads/GoCodeMe-Linux-x64.AppImage
chmod +x GoCodeMe-Linux-x64.AppImage
./GoCodeMe-Linux-x64.AppImage
API Integration
Integrate Alfred into any application using REST API calls. All endpoints are at https://gositeme.com/api/. See the API Reference for full details.
Voice Access
Call 1-833-GOSITEME (1-833-467-4836) to interact with Alfred via phone. Voice integration uses VAPI for natural language processing and tool execution.
First Steps
Now that you have an account, here's what to explore first:
1. Browse Available Tools
Alfred has 875+ tools organized into 21 categories. Browse them:
// Get all tool categories
const categories = await fetch('https://gositeme.com/api/tools.php?action=categories')
.then(r => r.json());
console.log(categories);
// ["legal", "healthcare", "education", "devops", "media", "finance", ...]
// List tools in a category
const legalTools = await fetch('https://gositeme.com/api/tools.php?action=list&category=legal')
.then(r => r.json());
console.log(legalTools.tools.length); // 43 legal tools
2. Create Your First Fleet
Fleets let you deploy AI agents for specific tasks:
const fleet = await fetch('https://gositeme.com/api/fleet.php?action=create', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer sess_abc123...'
},
body: JSON.stringify({
name: 'Customer Support Fleet',
description: 'Handles inbound support questions',
tools: ['summarize_text', 'search_knowledge_base', 'create_ticket'],
max_agents: 5
})
}).then(r => r.json());
console.log(fleet); // { id: "fleet_xyz", name: "Customer Support Fleet", status: "active" }
3. Set Up Voice
Configure your VAPI webhook to enable voice commands. See VAPI Setup.
4. Choose a Plan
View plans at /pricing.php or via the API:
curl https://gositeme.com/api/stripe.php?action=plans
# Response:
# {
# "plans": [
# { "name": "Starter", "price": "$3.99/mo", "tools": 875, "calls": 50 },
# { "name": "Professional", "price": "$9.99/mo", "tools": 875, "calls": "unlimited" },
# { "name": "Enterprise", "price": "$24.99/mo", "tools": 875, "calls": "unlimited", "fleets": "unlimited" }
# ]
# }
Authentication API
All API requests require authentication via session token. Obtain a token by logging in.
POST /api/auth.php — Login
| Parameter | Type | Required | Description |
|---|---|---|---|
action | string | Yes | Set to "login" |
email | string | Yes | User email address |
password | string | Yes | User password |
curl -X POST https://gositeme.com/api/auth.php \
-H "Content-Type: application/json" \
-d '{"action":"login","email":"user@example.com","password":"secret"}'
# 200 OK
# {"success":true,"token":"sess_abc123","user":{"id":1,"name":"John","plan":"professional"}}
POST /api/auth.php — Register
| Parameter | Type | Required | Description |
|---|---|---|---|
action | string | Yes | Set to "register" |
email | string | Yes | Email address |
password | string | Yes | Min 8 characters |
name | string | Yes | Display name |
import requests
response = requests.post('https://gositeme.com/api/auth.php', json={
'action': 'register',
'email': 'newuser@example.com',
'password': 'securePassword123',
'name': 'Jane Doe'
})
data = response.json()
print(data['token']) # sess_xyz789...
GET /api/auth.php — Check Session
Verify current session validity. Include token in Authorization header.
$ch = curl_init('https://gositeme.com/api/auth.php?action=check');
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Authorization: Bearer sess_abc123'
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
if ($response['authenticated']) {
echo "Logged in as: " . $response['user']['name'];
}
Tools API
The Tools API gives you access to all 875+ Alfred tools. Browse categories, search tools, and execute them programmatically.
GET /api/tools.php — List Categories
const res = await fetch('https://gositeme.com/api/tools.php?action=categories');
const data = await res.json();
// { "categories": ["legal","healthcare","education","devops","media",...], "total": 21 }
GET /api/tools.php — List Tools by Category
| Parameter | Type | Required | Description |
|---|---|---|---|
action | string | Yes | "list" |
category | string | Yes | Category slug (e.g. "legal", "devops") |
import requests
response = requests.get('https://gositeme.com/api/tools.php', params={
'action': 'list',
'category': 'legal'
})
tools = response.json()['tools']
for tool in tools:
print(f"{tool['name']}: {tool['description']}")
# draft_motion: Draft a legal motion
# case_research: Research case law
# ...
GET /api/tools.php — Search Tools
curl "https://gositeme.com/api/tools.php?action=search&q=homework"
# {"results":[
# {"name":"homework_helper","category":"education","description":"Help solve homework problems step by step"},
# {"name":"essay_writer","category":"education","description":"Generate essay drafts with citations"},
# ...
# ],"total":12}
POST /api/tools.php — Execute Tool
| Parameter | Type | Required | Description |
|---|---|---|---|
tool_name | string | Yes | Tool identifier (e.g. "summarize_text") |
args | object | Varies | Tool-specific arguments |
$ch = curl_init('https://gositeme.com/api/tools.php?action=execute');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => [
'Content-Type: application/json',
'Authorization: Bearer sess_abc123'
],
CURLOPT_POSTFIELDS => json_encode([
'tool_name' => 'dns_lookup',
'args' => ['domain' => 'example.com', 'type' => 'A']
]),
CURLOPT_RETURNTRANSFER => true
]);
$result = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($result);
// ["result" => ["records" => [["type"=>"A","value"=>"93.184.216.34","ttl"=>3600]]]]
Fleet API
Manage AI agent fleets programmatically. Create, monitor, and scale your fleet deployments.
GET /api/fleet.php — List Fleets
const fleets = await fetch('https://gositeme.com/api/fleet.php?action=list', {
headers: { 'Authorization': 'Bearer sess_abc123' }
}).then(r => r.json());
fleets.data.forEach(fleet => {
console.log(`${fleet.name} — ${fleet.agent_count} agents — ${fleet.status}`);
});
// Customer Support Fleet — 3 agents — active
// Sales Outreach — 2 agents — active
POST /api/fleet.php — Create Fleet
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Fleet name |
description | string | No | Fleet description |
tools | array | No | List of tool names to assign |
max_agents | int | No | Max agents (default: 5) |
import requests
fleet = requests.post('https://gositeme.com/api/fleet.php?action=create',
headers={'Authorization': 'Bearer sess_abc123'},
json={
'name': 'Legal Research Team',
'description': 'Automated legal research agents',
'tools': ['case_research', 'draft_motion', 'statute_lookup'],
'max_agents': 10
}
).json()
print(f"Fleet created: {fleet['id']}") # fleet_abc123
GET /api/fleet.php — Dashboard Stats
curl -H "Authorization: Bearer sess_abc123" \
"https://gositeme.com/api/fleet.php?action=dashboard"
# {
# "total_fleets": 3,
# "total_agents": 12,
# "active_tasks": 5,
# "completed_today": 142,
# "avg_response_time": "1.2s"
# }
Stripe Billing API
Manage subscriptions, create checkout sessions, and access the customer portal via the Stripe integration.
POST /api/stripe.php — Create Checkout
const checkout = await fetch('https://gositeme.com/api/stripe.php?action=create_checkout', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer sess_abc123'
},
body: JSON.stringify({ plan: 'professional' })
}).then(r => r.json());
// Redirect user to Stripe Checkout
window.location.href = checkout.url;
POST /api/stripe.php — Customer Portal
curl -X POST https://gositeme.com/api/stripe.php?action=create_portal \
-H "Authorization: Bearer sess_abc123"
# {"url":"https://billing.stripe.com/p/session/..."}
GET /api/stripe.php — Plans
import requests
plans = requests.get('https://gositeme.com/api/stripe.php?action=plans').json()
for plan in plans['plans']:
print(f"{plan['name']}: ${plan['price']}/mo — {plan['description']}")
# Starter: $3.99/mo — 50 tool calls/day, 1 fleet
# Professional: $9.99/mo — Unlimited tools, 5 fleets, voice
# Enterprise: $24.99/mo — Unlimited everything, SLA, SSO
GET /api/stripe.php — Subscription Status
$ch = curl_init('https://gositeme.com/api/stripe.php?action=status');
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: Bearer sess_abc123']);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$status = json_decode(curl_exec($ch), true);
curl_close($ch);
echo "Plan: " . $status['plan']; // professional
echo "Status: " . $status['status']; // active
echo "Renews: " . $status['renews_at']; // 2026-04-04
echo "Tool calls today: " . $status['usage']['tool_calls_today']; // 42
VAPI Setup
Alfred integrates with VAPI for voice-first AI interactions. Users can call Alfred via phone or browser-based voice.
Webhook Configuration
Set up your VAPI assistant to point to the Alfred webhook endpoint:
https://gositeme.com/api/vapi-webhook.php
VAPI Tool Format
Tools exposed to VAPI follow this schema:
{
"type": "function",
"function": {
"name": "weather_lookup",
"description": "Get current weather for a location",
"parameters": {
"type": "object",
"properties": {
"location": {
"type": "string",
"description": "City name or zip code"
}
},
"required": ["location"]
}
}
}
/api/vapi-tools.php which maps voice requests to Alfred's 875+ tool engine.Voice Commands
Alfred understands natural language voice commands. Here are some examples:
Sample Voice Commands
- "Hey Alfred, summarize this article" — Triggers
summarize_text - "Schedule a meeting for tomorrow at 3pm" — Triggers
create_calendar_event - "What's the weather in Montreal?" — Triggers
weather_lookup - "Draft a demand letter for unpaid rent" — Triggers
draft_demand_letter - "Check my website's DNS records" — Triggers
dns_lookup - "How many agents are in my fleet?" — Triggers
fleet_dashboard - "Create a support ticket" — Triggers
create_ticket - "Translate this to French" — Triggers
translate_text
Voice Response Format
Alfred responds in natural language. Tool results are converted to spoken responses automatically via VAPI's text-to-speech engine.
{
"results": [{
"toolCallId": "call_abc123",
"result": "The current weather in Montreal is -5°C with light snow. Wind chill brings it to -12°C."
}]
}
Phone Agent
Deploy an AI phone agent using Alfred + VAPI. Your agent can answer calls, route inquiries, and execute tools on behalf of callers.
Setting Up Outbound Calls
const call = await fetch('https://gositeme.com/api/vapi-outbound.php', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer sess_abc123'
},
body: JSON.stringify({
phone_number: '+15145551234',
assistant_id: 'asst_xyz',
first_message: 'Hi, this is Alfred from GoSiteMe. How can I help you today?'
})
}).then(r => r.json());
console.log(call.call_id); // call_abc123
Tool Categories
Alfred's 875+ tools are organized into 21 categories:
Using Tools
Every tool follows the same execution pattern: send a POST request with the tool name and arguments.
Request Format
{
"tool_name": "tool_identifier",
"args": {
"param1": "value1",
"param2": "value2"
}
}
Response Format
{
"success": true,
"tool": "tool_identifier",
"result": { ... },
"execution_time": "0.45s",
"credits_used": 1
}
Error Handling
try {
const res = await fetch('https://gositeme.com/api/tools.php?action=execute', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer sess_abc123'
},
body: JSON.stringify({ tool_name: 'dns_lookup', args: { domain: 'example.com' } })
});
const data = await res.json();
if (!data.success) {
console.error(`Error: ${data.error} (code: ${data.code})`);
// Error codes: 401 (unauthorized), 429 (rate limit), 400 (bad request), 500 (server error)
}
} catch (err) {
console.error('Network error:', err);
}
Custom Tools
Enterprise users can create custom tools that integrate into Alfred's tool engine. Custom tools appear alongside built-in tools and can be used via API, voice, and the dashboard.
Defining a Custom Tool
{
"name": "lookup_inventory",
"description": "Check product inventory levels",
"category": "custom",
"parameters": {
"type": "object",
"properties": {
"sku": { "type": "string", "description": "Product SKU" },
"warehouse": { "type": "string", "description": "Warehouse code" }
},
"required": ["sku"]
},
"webhook_url": "https://your-api.com/inventory/check",
"auth_header": "X-API-Key: your-key"
}
Creating Fleets
Fleets are groups of AI agents that work together on tasks. Each fleet can have its own tools, personality, and deployment target.
Fleet Configuration
const fleet = await fetch('https://gositeme.com/api/fleet.php?action=create', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer sess_abc123'
},
body: JSON.stringify({
name: 'Healthcare Triage',
description: 'Routes patient inquiries to appropriate departments',
tools: ['symptom_checker', 'appointment_scheduler', 'insurance_verify'],
max_agents: 10,
personality: 'professional, empathetic, HIPAA-aware',
auto_scale: true
})
}).then(r => r.json());
console.log(`Fleet ${fleet.id} created with ${fleet.tools.length} tools`);
Agent Deployment
Deploy agents within a fleet to handle specific channels (web chat, phone, email).
import requests
agent = requests.post('https://gositeme.com/api/fleet.php?action=deploy_agent',
headers={'Authorization': 'Bearer sess_abc123'},
json={
'fleet_id': 'fleet_abc123',
'channel': 'phone',
'name': 'Support Agent Alpha',
'greeting': 'Hello! You\'ve reached GoSiteMe support. How can I help?'
}
).json()
print(f"Agent deployed: {agent['agent_id']} on {agent['channel']}")
Monitoring
Monitor fleet performance in real-time via the Fleet Dashboard API or the web UI at /fleet-dashboard.php.
curl -H "Authorization: Bearer sess_abc123" \
"https://gositeme.com/api/fleet.php?action=dashboard"
# {
# "total_fleets": 3,
# "total_agents": 12,
# "active_tasks": 5,
# "completed_today": 142,
# "avg_response_time": "1.2s",
# "uptime": "99.97%",
# "top_tools": ["summarize_text","dns_lookup","create_ticket"]
# }
Creating Conference Rooms
Voice conference rooms let multiple AI agents and humans collaborate in real-time using LiveKit integration.
const room = await fetch('https://gositeme.com/api/voice-manage.php', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer sess_abc123'
},
body: JSON.stringify({
action: 'create_room',
name: 'Legal Strategy Session',
max_participants: 6,
recording: true
})
}).then(r => r.json());
console.log(`Room created: ${room.room_name}`);
console.log(`Join URL: ${room.join_url}`);
Adding Agents to Rooms
Invite AI agents into a conference room to participate in discussions, take notes, or execute tools.
import requests
# Add an AI agent to the room
result = requests.post('https://gositeme.com/api/voice-manage.php', json={
'action': 'add_agent',
'room_name': 'Legal Strategy Session',
'agent_type': 'legal_researcher',
'voice': 'en-US-Neural2-F',
'tools': ['case_research', 'statute_lookup', 'draft_motion']
}, headers={'Authorization': 'Bearer sess_abc123'}).json()
print(f"Agent {result['agent_id']} joined the room")
Recording
Conference rooms support real-time transcription and recording. Access recordings and transcripts via the API.
# Get recording and transcript
curl -H "Authorization: Bearer sess_abc123" \
"https://gositeme.com/api/voice-manage.php?action=recording&room=Legal+Strategy+Session"
# {
# "recording_url": "https://storage.gositeme.com/recordings/room_abc.mp4",
# "transcript": [
# {"speaker":"Human","time":"0:00","text":"Let's discuss the Smith case."},
# {"speaker":"Legal AI","time":"0:05","text":"Based on my research, Smith v. Jones (2024)..."},
# ...
# ],
# "duration": "14:32",
# "participants": 4
# }
Plans
Alfred offers three subscription tiers:
Starter — $3.99/mo
- 875+ tools
- 50 calls/day
- 1 fleet
- Community support
Professional — $9.99/mo
- 875+ tools
- Unlimited calls
- 5 fleets
- Voice commands
- Priority support
Enterprise — $24.99/mo
- 875+ tools
- Unlimited everything
- Unlimited fleets
- SSO & teams
- SLA guarantee
- 24/7 support
Checkout
Create a Stripe Checkout session to subscribe users:
async function subscribeToPlan(plan) {
const res = await fetch('https://gositeme.com/api/stripe.php?action=create_checkout', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer sess_abc123'
},
body: JSON.stringify({
plan: plan, // 'starter', 'professional', or 'enterprise'
success_url: 'https://gositeme.com/dashboard.php?upgraded=1',
cancel_url: 'https://gositeme.com/pricing.php'
})
});
const { url } = await res.json();
window.location.href = url; // Redirect to Stripe Checkout
}
Customer Portal
Let users manage their subscription, update payment methods, and view invoices via the Stripe Customer Portal:
// Redirect user to Stripe Customer Portal
$ch = curl_init('https://gositeme.com/api/stripe.php?action=create_portal');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . $_SESSION['token']],
CURLOPT_RETURNTRANSFER => true
]);
$portal = json_decode(curl_exec($ch), true);
curl_close($ch);
header('Location: ' . $portal['url']);
exit;
Webhooks
Receive real-time notifications for billing events via Stripe webhooks:
Webhook Events
checkout.session.completed— User subscribed successfullycustomer.subscription.updated— Plan changedcustomer.subscription.deleted— Subscription cancelledinvoice.payment_failed— Payment failed
// Your webhook endpoint receives Stripe events
$payload = file_get_contents('php://input');
$sig = $_SERVER['HTTP_STRIPE_SIGNATURE'];
$event = \Stripe\Webhook::constructEvent($payload, $sig, $webhook_secret);
switch ($event->type) {
case 'checkout.session.completed':
$session = $event->data->object;
// Activate user subscription
activateSubscription($session->client_reference_id, $session->subscription);
break;
case 'customer.subscription.deleted':
// Downgrade user to free
downgradeUser($event->data->object->metadata->user_id);
break;
}
JavaScript SDK
Use Alfred in any JavaScript environment — browser, Node.js, Deno, Bun.
class AlfredClient {
constructor(token) {
this.token = token;
this.baseURL = 'https://gositeme.com/api';
}
async execute(toolName, args = {}) {
const res = await fetch(`${this.baseURL}/tools.php?action=execute`, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${this.token}`
},
body: JSON.stringify({ tool_name: toolName, args })
});
return res.json();
}
async listTools(category) {
const res = await fetch(`${this.baseURL}/tools.php?action=list&category=${category}`, {
headers: { 'Authorization': `Bearer ${this.token}` }
});
return res.json();
}
async search(query) {
const res = await fetch(`${this.baseURL}/tools.php?action=search&q=${encodeURIComponent(query)}`, {
headers: { 'Authorization': `Bearer ${this.token}` }
});
return res.json();
}
async createFleet(config) {
const res = await fetch(`${this.baseURL}/fleet.php?action=create`, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${this.token}`
},
body: JSON.stringify(config)
});
return res.json();
}
}
// Usage
const alfred = new AlfredClient('sess_abc123');
const result = await alfred.execute('summarize_text', { text: 'Long article...', max_length: 100 });
console.log(result);
Python SDK
import requests
class AlfredClient:
BASE_URL = 'https://gositeme.com/api'
def __init__(self, token: str):
self.token = token
self.session = requests.Session()
self.session.headers.update({
'Authorization': f'Bearer {token}',
'Content-Type': 'application/json'
})
def execute(self, tool_name: str, args: dict = None) -> dict:
"""Execute an Alfred tool."""
return self.session.post(
f'{self.BASE_URL}/tools.php?action=execute',
json={'tool_name': tool_name, 'args': args or {}}
).json()
def list_tools(self, category: str) -> dict:
"""List tools in a category."""
return self.session.get(
f'{self.BASE_URL}/tools.php?action=list&category={category}'
).json()
def search(self, query: str) -> dict:
"""Search tools by keyword."""
return self.session.get(
f'{self.BASE_URL}/tools.php?action=search&q={query}'
).json()
def create_fleet(self, name: str, tools: list, **kwargs) -> dict:
"""Create a new agent fleet."""
return self.session.post(
f'{self.BASE_URL}/fleet.php?action=create',
json={'name': name, 'tools': tools, **kwargs}
).json()
def fleet_dashboard(self) -> dict:
"""Get fleet dashboard stats."""
return self.session.get(
f'{self.BASE_URL}/fleet.php?action=dashboard'
).json()
# Usage
alfred = AlfredClient('sess_abc123')
# Execute a tool
result = alfred.execute('dns_lookup', {'domain': 'example.com', 'type': 'MX'})
print(result)
# Search tools
matches = alfred.search('homework')
for tool in matches['results']:
print(f" {tool['name']}: {tool['description']}")
PHP SDK
class AlfredClient {
private string $token;
private string $baseURL = 'https://gositeme.com/api';
public function __construct(string $token) {
$this->token = $token;
}
public function execute(string $toolName, array $args = []): array {
return $this->post('/tools.php?action=execute', [
'tool_name' => $toolName,
'args' => $args
]);
}
public function listTools(string $category): array {
return $this->get("/tools.php?action=list&category={$category}");
}
public function search(string $query): array {
return $this->get("/tools.php?action=search&q=" . urlencode($query));
}
public function createFleet(string $name, array $tools, array $options = []): array {
return $this->post('/fleet.php?action=create', array_merge([
'name' => $name, 'tools' => $tools
], $options));
}
private function get(string $endpoint): array {
$ch = curl_init($this->baseURL . $endpoint);
curl_setopt_array($ch, [
CURLOPT_HTTPHEADER => ["Authorization: Bearer {$this->token}"],
CURLOPT_RETURNTRANSFER => true
]);
$result = json_decode(curl_exec($ch), true);
curl_close($ch);
return $result;
}
private function post(string $endpoint, array $data): array {
$ch = curl_init($this->baseURL . $endpoint);
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer {$this->token}",
'Content-Type: application/json'
],
CURLOPT_POSTFIELDS => json_encode($data),
CURLOPT_RETURNTRANSFER => true
]);
$result = json_decode(curl_exec($ch), true);
curl_close($ch);
return $result;
}
}
// Usage
$alfred = new AlfredClient('sess_abc123');
$result = $alfred->execute('summarize_text', ['text' => 'Your article...', 'max_length' => 200]);
print_r($result);
$tools = $alfred->listTools('legal');
echo count($tools['tools']) . " legal tools available\n";
cURL Examples
Use cURL for quick testing and shell scripts. Here are common patterns:
Login & Store Token
#!/bin/bash
# Login and save token
TOKEN=$(curl -s -X POST https://gositeme.com/api/auth.php \
-H "Content-Type: application/json" \
-d '{"action":"login","email":"user@example.com","password":"secret"}' \
| jq -r '.token')
echo "Token: $TOKEN"
# Execute a tool
curl -s -X POST "https://gositeme.com/api/tools.php?action=execute" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-d '{"tool_name":"weather_lookup","args":{"location":"Montreal"}}' | jq .
# List fleets
curl -s -H "Authorization: Bearer $TOKEN" \
"https://gositeme.com/api/fleet.php?action=list" | jq .
# Check subscription status
curl -s -H "Authorization: Bearer $TOKEN" \
"https://gositeme.com/api/stripe.php?action=status" | jq .
Search & Execute in One Script
#!/bin/bash
TOKEN="sess_abc123"
# Search for DNS tools
echo "=== DNS Tools ==="
curl -s -H "Authorization: Bearer $TOKEN" \
"https://gositeme.com/api/tools.php?action=search&q=dns" | jq '.results[].name'
# Execute DNS lookup
echo "=== DNS Lookup ==="
curl -s -X POST "https://gositeme.com/api/tools.php?action=execute" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-d '{
"tool_name": "dns_lookup",
"args": {"domain": "gositeme.com", "type": "A"}
}' | jq '.result'
Someone from somewhere
just launched website.com
Just now