-
Open Google Apps Script
- Go to script.google.com
- Click "New Project"
-
Copy Code
- Delete everything in the editor
- Copy entire contents of
Code.gs - Paste into editor
- Save (Ctrl+S)
-
Set API Key
- Click ⚙️ "Project Settings"
- Scroll to "Script Properties"
- Click "Add script property"
- Name:
OPENROUTER_API_KEY - Value: Your OpenRouter key from openrouter.ai/keys
-
Deploy
- Click "Deploy" → "New deployment"
- Type: "Web app"
- Execute as: "Me"
- Who has access: "Anyone"
- Click "Deploy"
- Copy your URL!
# Install clasp
npm install -g @google/clasp
# Login
clasp login
# Create project
clasp create --type webapp --title "ACP Consensus"
# Push code
clasp push
# Deploy
clasp deploycurl "YOUR_WEBAPP_URL"Response:
{
"service": "ACP Consensus API",
"version": "1.0.0",
"status": "healthy"
}curl -X POST "YOUR_WEBAPP_URL" \
-H "Content-Type: application/json" \
-d '{"query": "What is the speed of light?"}'Response:
{
"query": "What is the speed of light?",
"consensus_reached": true,
"final_D": 0.08,
"final_answer": "299,792,458 meters per second",
"confidence": 0.92,
"votes": 3
}- 6 min execution timeout
- 20k URL fetch calls/day
- Free tier sufficient for testing
"OPENROUTER_API_KEY not configured" → Add key in Project Settings → Script Properties
"Exceeded maximum execution time" → Reduce MAX_ITERATIONS in CONFIG
"UrlFetchApp returned 429" → Rate limited, wait a minute