# TanStack AI's Sandbox API

DevFeed: [TanStack AI's Sandbox API](<https://devfeed.tech/articles/tanstack-ai-s-sandbox-api-125614.md>)

Original publisher: [Read original article](<https://blog.master.dev/tanstack-ai-sandbox-api/>)

Author: Adam Rackis

Published: 2026-11-09T12:56:45Z

Content type: tutorial

Language: en

Sources: [Master.dev Blog RSS Feed](<https://devfeed.tech/sources/master-dev-blog-rss-feed.md>)

Topics: [AI Sandbox](<https://devfeed.tech/topics/ai-sandbox.md>), [Claude Code](<https://devfeed.tech/topics/claude-code.md>), [remote-development](<https://devfeed.tech/topics/remote-development.md>), [Claude](<https://devfeed.tech/topics/claude.md>), [API](<https://devfeed.tech/topics/api.md>), [personal access token](<https://devfeed.tech/topics/personal-access-token.md>)

Tags: [admin](<https://devfeed.tech/tags/admin.md>), [agentic](<https://devfeed.tech/tags/agentic.md>), [ai](<https://devfeed.tech/tags/ai.md>), [ai-features](<https://devfeed.tech/tags/ai-features.md>), [ai-gateway](<https://devfeed.tech/tags/ai-gateway.md>), [api](<https://devfeed.tech/tags/api.md>), [blog-post](<https://devfeed.tech/tags/blog-post.md>), [claude](<https://devfeed.tech/tags/claude.md>), [claude-code](<https://devfeed.tech/tags/claude-code.md>), [clone](<https://devfeed.tech/tags/clone.md>), [code](<https://devfeed.tech/tags/code.md>), [feature](<https://devfeed.tech/tags/feature.md>), [github](<https://devfeed.tech/tags/github.md>), [pull-request](<https://devfeed.tech/tags/pull-request.md>), [railway](<https://devfeed.tech/tags/railway.md>), [remote](<https://devfeed.tech/tags/remote.md>), [repo](<https://devfeed.tech/tags/repo.md>), [request](<https://devfeed.tech/tags/request.md>), [sandbox](<https://devfeed.tech/tags/sandbox.md>), [tanstack](<https://devfeed.tech/tags/tanstack.md>), [typescript](<https://devfeed.tech/tags/typescript.md>), [vercel](<https://devfeed.tech/tags/vercel.md>)

## AI overview

TanStack AI's Sandbox API lets a chat request run Claude Code in a remote Vercel or Railway sandbox, clone a GitHub repo, make changes, and open a pull request. Setup requires GitHub and Anthropic credentials plus provider-specific configuration; Vercel also needs Claude Code and GitHub CLI installed, while Railway's image includes them. Both examples reuse a sandbox by thread and add it through `withSandbox` middleware. The tradeoff is slower execution than running tools directly, with sandbox costs. Cleanup differs: the article says Vercel's destroy method only stops the sandbox and leaves disk snapshots, so an API cleanup script may be needed; Railway leaves disk checkpoints but does not charge for them.

## Source excerpt

Part 3 of this intro to TanStack AI covers the Sandbox API: spinning up a remote sandbox on Vercel or Railway, running Claude Code inside it with GitHub access, and having it clone your repo, add a feature, and open a pull request.