Guide 08 · $0.0000002 per invocation

Turn agent tools into HTTP functions

A tool your agents call thousands of times shouldn't boot a sandbox each time. Register the handler once as a function; PillDrops keeps it warm behind an HTTP endpoint and meters per call.

1

Register the handler

curl -X POST $BASE/v1/functions -H "Authorization: Bearer $KEY" -d '{
  "name": "extract-tables",
  "template": "python-3.11",
  "start": "python3 /app/handler.py",
  "port": 8000,
  "files": [{"path": "/app/handler.py", "content": "…your HTTP handler…"}]
}'
2

Invoke it from anywhere

curl -X POST $BASE/v1/functions/extract-tables/invoke \
  -H "Authorization: Bearer $KEY" -d '{"url": "https://…/report.pdf"}'
# sub-paths pass through: /invoke/health → your handler sees /health
3

Operate it

GET /v1/functions/extract-tables/logs      # handler output
GET /v1/functions/extract-tables/metrics   # calls, latency, errors
PUT /v1/functions/extract-tables           # ship a new version in place
1M invocations ≈ $0.20 + compute · functions API
Start free — $5 credits Browse all 15 guides →