Frontend Masters Blog · 6 min readBuilding with LLMs
TanStack AI’s Sandbox API
Learn how to configure TanStack AI’s Sandbox API to run Claude Code in remote Vercel or Railway sandboxes, connect it to GitHub, and automate pull‑request creation. The guide walks through token setup, sandbox definition, request handling, and cleanup, enabling AI‑driven code changes without a constantly running local machine.
- Define sandbox environments with Vercel or Railway using @tanstack/ai‑sandbox libraries
- Pass Anthropic and GitHub tokens as secrets to enable Claude Code to clone repos and open PRs
- Use thread‑based lifecycle reuse and cleanup scripts to manage sandbox resources