Claude Code

Claude Code Quickstart

Deploy serverless functions from Claude Code's bash tool. Add the API to CLAUDE.md and Claude handles the rest.

Step 1. Get your API key

Sign up for a free API key. No credit card required.

curl -s -X POST https://taufunctions.com/api/signup \
  -H "Content-Type: application/json" \
  -d '{"tenantId":"my-project","agent":"claude-code"}' | jq .

Save the key to your project .env file:

# .env
TF_BASE_URL=https://taufunctions.com
TF_API_KEY=tf_free_YOUR_KEY_HERE

Step 2. Add to CLAUDE.md

Add this block to your project's CLAUDE.md file. Claude Code reads this automatically at session start.

# TauFunctions — Serverless Functions API

## Environment
- TF_BASE_URL=https://taufunctions.com
- TF_API_KEY is in .env (source it or use $TF_API_KEY)

## Auth
All requests need: Authorization: Bearer $TF_API_KEY

## Endpoints
- POST   $TF_BASE_URL/saas/api/v1/sdk/tau/functions              — Create function
- GET    $TF_BASE_URL/saas/api/v1/sdk/tau/functions              — List functions
- GET    $TF_BASE_URL/saas/api/v1/sdk/tau/functions/:id          — Get function
- PUT    $TF_BASE_URL/saas/api/v1/sdk/tau/functions/:id          — Update function
- DELETE $TF_BASE_URL/saas/api/v1/sdk/tau/functions/:id          — Delete function
- POST   $TF_BASE_URL/saas/api/v1/sdk/tau/functions/:id/deploy   — Deploy function
- POST   $TF_BASE_URL/saas/api/v1/sdk/tau/functions/:id/invoke   — Invoke function
- GET    $TF_BASE_URL/saas/api/v1/sdk/tau/functions/:id/stats    — Get stats
- GET    $TF_BASE_URL/saas/api/v1/sdk/tau/functions/:id/logs     — Get logs
- GET    $TF_BASE_URL/saas/api/v1/sdk/tau/runtimes               — List runtimes

## Create Function Body
{
  "name": "function-name",
  "runtime": "nodejs20",         // nodejs18, nodejs20, nodejs22, python3.11, python3.12
  "handler": "index.handler",
  "code": "module.exports.handler = async (event) => { ... }",
  "trigger": "http"              // http, cron, event, webhook, manual
}

## Invoke Body
{ "payload": { "key": "value" } }

## Free Plan: 10 functions, 100 invocations/day, 1 API key

## Workflow: Create -> Deploy -> Invoke -> Check stats/logs

Step 3. Create a function

Create a Node.js hello-world function.

curl -s -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-world",
    "runtime": "nodejs20",
    "handler": "index.handler",
    "code": "module.exports.handler = async (event) => { return { statusCode: 200, body: JSON.stringify({ message: \"Hello from TauFunctions!\" }) }; }",
    "trigger": "http"
  }' | jq .

Save the returned id (e.g., fn_abc123) for the next steps.

Step 4. Deploy the function

curl -s -X POST https://taufunctions.com/saas/api/v1/sdk/tau/functions/$FN_ID/deploy \
  -H "Authorization: Bearer $TF_API_KEY" | jq .

The function status changes from created to deployed. You can now invoke it.

Step 5. Invoke with a JSON payload

curl -s -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"}}' | jq .

Response includes statusCode, body, duration (ms), and billedMs.

Step 6. View stats and logs

# Stats
curl -s https://taufunctions.com/saas/api/v1/sdk/tau/functions/$FN_ID/stats \
  -H "Authorization: Bearer $TF_API_KEY" | jq .

# Logs
curl -s https://taufunctions.com/saas/api/v1/sdk/tau/functions/$FN_ID/logs \
  -H "Authorization: Bearer $TF_API_KEY" | jq .

Step 7. Try Python runtime

Create, deploy, and invoke a Python function.

# Create
curl -s -X POST https://taufunctions.com/saas/api/v1/sdk/tau/functions \
  -H "Authorization: Bearer $TF_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "py-hello",
    "runtime": "python3.12",
    "handler": "handler.main",
    "code": "def main(event):\n    name = event.get(\"name\", \"World\")\n    return {\"statusCode\": 200, \"body\": f\"Hello, {name}! From Python.\"}",
    "trigger": "http"
  }' | jq .

# Deploy (use the returned id)
curl -s -X POST https://taufunctions.com/saas/api/v1/sdk/tau/functions/$PY_FN_ID/deploy \
  -H "Authorization: Bearer $TF_API_KEY" | jq .

# Invoke
curl -s -X POST https://taufunctions.com/saas/api/v1/sdk/tau/functions/$PY_FN_ID/invoke \
  -H "Authorization: Bearer $TF_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"payload":{"name":"Python Agent"}}' | jq .

Step 8. Free plan limits

ResourceFree Plan
Functions10
Invocations / day100
API keys1
RuntimesAll (Node.js 18/20/22, Python 3.11/3.12)

Check your current limits at any time:

curl -s https://taufunctions.com/api/signup/limits | jq .

Need more? Contact support@taufunctions.com to upgrade.