# TauFunctions — Agent-First Serverless Platform # API Reference (llms.txt) # Base URL: https://taufunctions.com ## Authentication All endpoints (except signup and plan info) require: Authorization: Bearer $TF_API_KEY API keys start with "tf_free_" (free plan) or "tf_pro_" (pro plan). ## Signup (Public) POST /api/signup Body: { "tenantId": "my-project", "agent": "claude-code" } Response: { "apiKey": "tf_free_abc123...", "tenantId": "my-project", "plan": "free", "limits": { "functions": 10, "invocationsPerDay": 100, "apiKeys": 1 }, "endpoints": { "functions": "https://taufunctions.com/saas/api/v1/sdk/tau/functions", "runtimes": "https://taufunctions.com/saas/api/v1/sdk/tau/runtimes" } } GET /api/signup/limits Public. No auth required. Response: { "free": { "functions": 10, "invocationsPerDay": 100, "apiKeys": 1 } } ## Functions — CRUD POST /saas/api/v1/sdk/tau/functions Create a function. Body: { "name": "hello-world", "runtime": "nodejs20", "handler": "index.handler", "code": "module.exports.handler = async (event) => { return { statusCode: 200, body: JSON.stringify({ message: 'Hello from TauFunctions!' }) }; }", "trigger": "http" } Required fields: name, runtime, handler, code Optional fields: trigger (default: "http"), description, envVars, timeout, memoryMB Response: { "id": "fn_abc123", "name": "hello-world", "runtime": "nodejs20", "status": "created", ... } GET /saas/api/v1/sdk/tau/functions List all functions for the authenticated tenant. Response: { "functions": [ { "id": "fn_abc123", "name": "hello-world", "runtime": "nodejs20", "status": "created", ... } ] } GET /saas/api/v1/sdk/tau/functions/:id Get a single function by ID. Response: { "id": "fn_abc123", "name": "hello-world", ... } PUT /saas/api/v1/sdk/tau/functions/:id Update a function. Send only the fields you want to change. Body: { "code": "...new code...", "runtime": "nodejs22" } Response: { "id": "fn_abc123", "name": "hello-world", "runtime": "nodejs22", ... } DELETE /saas/api/v1/sdk/tau/functions/:id Delete a function. Response: { "deleted": true, "id": "fn_abc123" } ## Functions — Lifecycle POST /saas/api/v1/sdk/tau/functions/:id/deploy Deploy a function. Must be called after create or update before invoking. Response: { "id": "fn_abc123", "status": "deployed", "deployedAt": "2026-05-22T..." } POST /saas/api/v1/sdk/tau/functions/:id/invoke Invoke a deployed function. Body: { "payload": { "name": "World" } } Response: { "statusCode": 200, "body": "{\"message\":\"Hello, World!\"}", "duration": 45, "billedMs": 100 } GET /saas/api/v1/sdk/tau/functions/:id/stats Get invocation statistics. Response: { "totalInvocations": 42, "avgDuration": 38, "errors": 1, "last24h": { ... } } GET /saas/api/v1/sdk/tau/functions/:id/logs Get recent logs. Query params: ?limit=50&since=2026-05-22T00:00:00Z Response: { "logs": [ { "timestamp": "...", "level": "info", "message": "..." } ] } ## Runtimes GET /saas/api/v1/sdk/tau/runtimes List available runtimes. Response: { "runtimes": [ { "id": "nodejs18", "name": "Node.js 18", "language": "javascript" }, { "id": "nodejs20", "name": "Node.js 20", "language": "javascript" }, { "id": "nodejs22", "name": "Node.js 22", "language": "javascript" }, { "id": "python3.11", "name": "Python 3.11", "language": "python" }, { "id": "python3.12", "name": "Python 3.12", "language": "python" } ] } ## Supported Runtimes - nodejs18 — Node.js 18 LTS - nodejs20 — Node.js 20 LTS - nodejs22 — Node.js 22 LTS - python3.11 — Python 3.11 - python3.12 — Python 3.12 ## Triggers - http — HTTP request trigger (default) - cron — Scheduled cron expression - event — Event-driven trigger - webhook — Webhook trigger - manual — Manual invocation only ## Free Plan Limits - 10 functions max - 100 invocations per day - 1 API key - All runtimes available - Upgrade: POST /api/billing/upgrade or contact support ## Environment Variables Set in your shell or .env: TF_BASE_URL=https://taufunctions.com TF_API_KEY=tf_free_... ## Error Responses All errors follow: { "error": "Error message", "code": "ERROR_CODE", "status": 4xx } Common codes: 401 — Invalid or missing API key 403 — Plan limit exceeded 404 — Function not found 422 — Validation error (missing fields, bad runtime) 429 — Rate limit exceeded ## Request/Response Format - Content-Type: application/json (all requests and responses) - All timestamps are ISO 8601 UTC - Function IDs are prefixed with "fn_" - API keys are prefixed with "tf_free_" or "tf_pro_" ## Quick Example # 1. Sign up curl -X POST https://taufunctions.com/api/signup \ -H "Content-Type: application/json" \ -d '{"tenantId":"my-project"}' # 2. Create function curl -X POST https://taufunctions.com/saas/api/v1/sdk/tau/functions \ -H "Authorization: Bearer $TF_API_KEY" \ -H "Content-Type: application/json" \ -d '{"name":"hello","runtime":"nodejs20","handler":"index.handler","code":"module.exports.handler = async (e) => ({ statusCode: 200, body: JSON.stringify({ msg: \"hello\" }) })"}' # 3. Deploy curl -X POST https://taufunctions.com/saas/api/v1/sdk/tau/functions/$FN_ID/deploy \ -H "Authorization: Bearer $TF_API_KEY" # 4. Invoke curl -X POST https://taufunctions.com/saas/api/v1/sdk/tau/functions/$FN_ID/invoke \ -H "Authorization: Bearer $TF_API_KEY" \ -H "Content-Type: application/json" \ -d '{"payload":{"name":"World"}}'