Foundational Compute

Examples

Complete, tested programs with output, cost and cleanup.

Before you start

  1. Run fdtn auth or set FDTN_API_KEY. Quickstart
  2. Install the SDK: pip install https://compute.fdtn.dev/install/fdtn-0.1.5-py3-none-any.whl or npm i https://compute.fdtn.dev/install/fdtn-sdk-0.1.5.tgz.
  3. Save the code in a new folder. TypeScript files are ESM (.mjs).

For a coding agent, add .md to the page address, for example https://fdtn.dev/docs/examples/preview.md.

AI agents

Work at scale

Data and apps

Rules in every example

  • Each sandbox has a lifetime, so it ends even if your code stops early.
  • Code kills each sandbox in finally. Scripts end with fdtn kill.
  • Metadata on each sandbox lets fdtn ls -m and fdtn kill --all -m find leftovers.
  • Costs use $0.018 per vCPU-hour and $0.006 per GiB-hour. base costs $0.039 per hour. Pricing