Telnyx Compute: Functions — Documentation Index
Functions documentation within the Compute section of the Telnyx developer docs (https://developers.telnyx.com). This file: https://developers.telnyx.com/development/llms/compute-functions-llms-txt.md · Root index: https://developers.telnyx.com/llms.txt
Overview
- Functions: Functions are the compute primitive of Telnyx Edge Compute — an HTTP server in a container, deployed to Telnyx’s edge network and wired to KV, stateful actors, object storage, and the Telnyx API.
Get Started
- Quickstart: Install the CLI, scaffold a function in the language of your choice, ship it, and curl the live URL — about five minutes.
Best Practices
- Best Practices: Production patterns for Edge Compute functions — configuration, connection reuse, KV caching, state placement, error handling, and observability without a platform logging surface.
Guides
- AI Assistants and Edge Compute: Use a Telnyx Edge Compute function as the backend for dynamic variables and webhook tool calls — no separate server required.
Local Development
- Local Development: Edge Compute functions are ordinary programs in containers — run and test them locally with each language’s native tooling; a standalone function needs no emulator.
Configuration
- Configuration: Every function is configured through one TOML manifest — func.toml or telnyx.toml. This is the complete reference: the identity block, environment variables, and every binding declaration, with links…
- Environment Variables: Functions run as containers, so configuration arrives as ordinary environment variables — declared in the project manifest, injected from secrets and bindings, or set by the platform.
- Secrets: Organization-scoped values for sensitive data, managed with the CLI. Every function receives them as environment variables; TypeScript functions can also read them through a typed binding.
CI/CD
- CI/CD: Deploy Edge Compute functions from CI: install a pinned CLI release, authenticate with an API key, and ship — working pipelines for GitHub Actions, GitLab CI, and CircleCI.
- Routes & Domains: Every deployed function gets a public HTTPS URL — https://{func-name}-{func-id-prefix}.telnyxcompute.com — and HTTP requests to that URL are the only way a function is invoked.
- Versions & Rollback: Every successful ship produces an immutable revision. revisions list shows a function’s deploy history; rollback instantly retargets traffic to a previous revision — no rebuild, no re-upload.
Runtime APIs
- Overview: What the platform provides to your code at runtime — the container execution environment, the per-language entrypoint contract, and the bindings that connect your code to platform resources.
- Execution Model: Functions run as Linux containers scaled with traffic: cold starts, warm reuse, scale to zero, a 30-second (max 60) request budget, HTTP as the only trigger, and no durable memory.
- HTTP Handler: The per-language entrypoint contract — which file the platform runs, the signature you implement, who owns the HTTP server, and who answers health probes.
- Overview: Typed, pre-authenticated handles to platform resources, resolved by the runtime from a manifest declaration.
- Overview: Call the Telnyx API from Edge Compute through a pre-authenticated binding — no API keys in your code.
- Quick Start: Declare, type, and ship a function that returns your Telnyx account balance through the binding.
- API Reference: The Telnyx API binding is a pre-authenticated client handle — discover its resources and methods through generated types or the client method reference.
- Receiving Messages: Handle inbound SMS on Edge Compute — your function is the messaging profile webhook, and replies go out on-net with no 10DLC campaign.
- Handling Calls: Answer inbound calls on Edge Compute via Call Control — your function is the Call Control app webhook; answer the call and play audio.
- Overview: Enforce per-key request budgets in bundled Edge Compute functions with a platform-managed rate limiter binding.
- Quick Start: Add a rate limiter binding to an Edge Compute function, deploy it, and verify its behavior.
- API Reference: Check a Telnyx Edge Compute rate limiter binding and interpret its result.
Observability
- Observability: There is no platform logs, metrics, or traces surface today — observability is the CLI’s control-plane views, your function’s /health endpoint, and structured events your function emits to a sink you…
CLI
- CLI Reference: Every CLI command in v0.2.5 — install from GitHub release binaries, authenticate, scaffold, deploy, and manage revisions, secrets, bindings, storage, and actor types.
Platform
- Pricing: Telnyx Edge Compute functions bill on two meters — requests and CPU time — with a monthly free tier of 3.6M requests and 36M CPU-milliseconds.
- Limits: Resource limits for Telnyx Edge Compute functions: request timeout (30 s default, 60 s max), memory, body size, code size, deployment rate, and KV storage caps.