Skip to main content

Documentation Index

Fetch the complete documentation index at: https://developers.telnyx.com/llms.txt

Use this file to discover all available pages before exploring further.

Edge Compute runs your functions in real Linux containers, giving you access to standard runtime APIs and system calls. Unlike V8 isolate-based platforms, you have a full POSIX environment with native language runtimes.

Runtime Environment

Your functions run in lightweight containers with:
  • Full language runtimes — Python 3.11+, Node.js 18+, Go 1.25+, Java 17+ (Quarkus)
  • Standard libraries — Use native packages and dependencies
  • POSIX APIs — File I/O, environment variables, process control
  • Network access — HTTP clients, TCP sockets, DNS resolution

Platform APIs

Edge Compute provides platform bindings for accessing Telnyx services:
  • Bindings — Connect to Telnyx APIs (Voice, Messaging, Storage) with auto-injected credentials
  • Execution Model — Function lifecycle, cold starts, concurrency

Accessing Environment

Configuration is injected via environment variables:
// Environment variables from func.toml
const logLevel = process.env.LOG_LEVEL || 'info';
const apiEndpoint = process.env.API_ENDPOINT;

// Binding credentials (auto-injected)
const telnyxKey = process.env.TELNYX_API_KEY;

HTTP Handling

Functions receive HTTP requests and return responses:
const express = require('express');
const app = express();

app.use(express.json());

app.all('/', (req, res) => {
    if (req.method === 'POST') {
        return res.json({ received: req.body });
    }
    
    res.json({ status: 'ok' });
});

app.listen(8080);

Networking

Functions can make outbound HTTP requests:
async function fetchData() {
    const response = await fetch('https://api.example.com/data');
    return response.json();
}

async function postData(payload) {
    const response = await fetch('https://api.example.com/submit', {
        method: 'POST',
        headers: { 'Content-Type': 'application/json' },
        body: JSON.stringify(payload)
    });
    return response.status;
}

Next Steps