Skip to content
Agents tracked: 504 Releases (7d): 602 Agent status: no reported issuesSince last limit reset: Claude 13d · Codex 11d For AI agents: Markdown Updated Nov 24, 2026

Vercel Sandbox

by Vercel

A throwaway Linux computer for untrusted code.

Code sandboxesUp · live statusOfficial MCP server

WebsitePricingGitHub

1. Price

Free tier: Hobby: 5 active-CPU hours, 420 GB-hours memory, 5,000 sandbox creations per month. As reported on the official pricing page, checked Nov 1, 2026.

vercel.com/docs/vercel-sandbox/pricing

Checked against the maker's official pages, pricing on Nov 1, 2026. Tap a verdict to see its source.How we checkedReport an error

What Vercel Sandbox does

Vercel Sandbox starts a small, separate Linux computer in Vercel's cloud for a few minutes or hours. Your app or AI agent runs code there that you do not trust, such as AI-written scripts or user uploads, away from your real site. You pay mostly for the time the processor is actually busy, not for time spent waiting.

  • Vercel Sandbox is one of 12 APIs in the Code sandboxes category on AgentGid.
  • Its cheapest paid plan ($20 a month) is the 3rd cheapest of the 9 here with a monthly plan.
  • It is one of 11 that can be started for free.
  • It ships an official MCP server, like 3 others here.
  • Its official SDK is the 2nd most downloaded in the category (8.1M a week).

What people build with it

Run code your AI assistant wrote

Your chat or agent writes a script; the sandbox runs it and returns the output, so a bad script never touches your servers.

Code playgrounds and AI page builders

Let visitors type or generate code and see it run, for example a coding course playground or a tool that builds pages from a prompt.

Live preview of a generated app

Start the app your user or agent just built and show it at a temporary web address, so they can click through it.

Work on private data with no internet

When an agent reads private files, block all outgoing traffic so nothing can be sent out of the sandbox.

Let an agent use a service without seeing its key

The agent inside can call GitHub or an AI service, while your secret key is added on the way out and never enters the sandbox.

Check homework submissions Idea

Run each student's submitted program in its own sandbox against your tests and collect the results.

Vercel Sandbox popularity

7.6M
SDK downloads a week
+19.1% on the 4-week average
15
public agent repos use its SDK
228
GitHub stars, vercel/sandbox
SDK downloads per weeknpm @vercel/sandbox, pypi vercel 7,628,356

SDK downloads from npm and PyPI, weekly. Numbers as of Nov 17, 2026.

Pricing

Free tier

Hobby: 5 active-CPU hours, 420 GB-hours memory, 5,000 sandbox creations per month

Cheapest plan

$20 a month

Usage price

Active CPU $0.128/hour; provisioned memory $0.0212 per GB-hour; creations $0.60 per 1M (iad1)

Plans

Pro usage is charged against the Vercel Pro plan's $20/month credit, then at the listed rates. Rates vary by region. Only active CPU time is billed for CPU; memory billed in 1-minute minimums. Hobby sessions max 45 min; Pro 24 h. Vercel's general MCP server includes sandbox tools.

What one action costs

ActionPrice
1 hour of active CPU (Pro, iad1)$0.128
1 GB of memory for 1 hour (Pro, iad1)$0.0212
1 million sandbox creations$0.60
One 5-minute AI code check (2 vCPU, 4 GB, 10% CPU use, Pro, iad1)$0.0092
Price history
  • A year of the pricing page in the Internet Archive (2 months): the lowest monthly figure went from $20 (2026-02) to $20 (2026-03).

As reported on the official pricing page, checked Nov 1, 2026. Prices change: confirm before you buy. vercel.com/docs/vercel-sandbox/pricing

Limits

Hobby

10 sandboxes at once, sessions up to 45 minutes; 5 hours of active CPU, 420 GB-hours of memory and 5,000 creations a month

Hobby

Over the monthly quota, creating sandboxes is paused (no extra charge)

Pro / Enterprise

10,000 sandboxes at once, sessions up to 24 hours

All

Control requests (run commands, read files): 1,000 a minute on Hobby, 10,000 on Pro; deletions 20 a second

All

Default timeout 5 minutes, can be extended up to the plan's session maximum

From the official docs. vercel.com/docs/sandbox/pricing.md

Status and incidents

Right now
Up

All Systems Operational

Last 30 days

3 incidents, 1 of them major

From the official status page, checked Nov 23, 2026. vercel-status.com

Key and access

How it signs in

Vercel OIDC token (recommended): vercel link + vercel env pull writes VERCEL_OIDC_TOKEN to .env.local, and on Vercel it is automatic. Elsewhere: an access token with team and project IDs.

Environment variable
VERCEL_OIDC_TOKEN (or VERCEL_TOKEN + VERCEL_TEAM_ID + VERCEL_PROJECT_ID)
Safe in browser code
No, keep it on your server
Card at sign-up

No

Steps only a person can do

  • Sign up for Vercel and create or link a project (vercel link), then pull the token (vercel env pull). Load .env.local with dotenv; the SDK reads VERCEL_OIDC_TOKEN from the environment.
  • Choose Pro before any commercial use, and set Spend Management alerts. No code change; the same project and tokens keep working.
  • Decide on AI training of your content (on Hobby it is on by default); change it in team settings. Nothing in code; note the choice in the project README.

Commercial use and your data

It is a paid Vercel service with a free monthly allowance on the Hobby plan, which is for personal, non-commercial use only. A business product needs Pro or Enterprise. The client code is open source (Apache-2.0 for the JavaScript package).

In a paid app
With conditions

Needs a Pro or Enterprise plan; the Hobby plan is for personal, non-commercial use only.

“You shall only use the Services under a Hobby plan for your personal or non-commercial use.” source

redistribute-files
Yes

The JavaScript package and command-line tool are Apache-2.0; the Python package is MIT. Keep their license notices.

“"license":"Apache-2.0"” source

To train your own AI
With conditions

On Hobby and trial Pro, Vercel may train on your content unless you opt out; on paid Pro it is off unless you opt in.

“You may opt-out of model training at any time by adjusting your team account settings or by upgrading to an enterprise plan.” source

Trains on what you send

“you agree that we may use your content to train our artificial intelligence”

Keeps your data

“Snapshots expire 30 days after their last use by default.”

Where data is stored

“Vercel Sandbox is available in 19 regions. The default region is iad1.”

Errors to handle

Authentication error after a day of local work

The development OIDC token from vercel env pull has expired.

Run vercel env pull again; on Vercel the token is renewed automatically.

Sandbox creation paused (Hobby)

The free monthly sandbox quota is used up.

Wait for the next 30-day window or upgrade to Pro.

snapshot_not_found

A named sandbox's saved state has expired and the SDK tried to resume it.

Pass resume true to getOrCreate so a fresh sandbox with the same name is made, or lengthen the snapshot expiration.

StreamError

The sandbox stopped while you were streaming its logs.

Extend the timeout for long tasks or reconnect after resuming the sandbox.

Non-zero exitCode

The command inside the sandbox failed; the SDK call itself succeeded.

Check exitCode and read stderr() before using the output.

Use it from an agent

Our agent check

6 of 6: llms.txt yes, OpenAPI yes, SDK yes, MCP yes, status page yes, AI assistants allowed yes

Checked Nov 13, 2026.

MCP server

Vercel MCP (general Vercel server; its tool list has a Sandboxes section)

npx -y add-mcp https://mcp.vercel.com -g

npm
npm install @vercel/sandbox
PyPI
pip install vercel

Instructions in its docs to check first

The docs say

“First, load the installed Sandbox skill, or install it with npx skills add vercel/sandbox. Make sure the Vercel CLI is installed (npm i -g vercel).”

Ask the person first; it installs an unpinned skill and a global tool and links their account.

The docs say

“npx -y add-mcp https://mcp.vercel.com -g”

Ask the person first; it writes the MCP server into every AI tool on the machine and then asks for an OAuth login to their Vercel account.

Alternatives

Vercel Sandbox This page

from $0.0212 per GB-hourFree tierOfficial MCP

E2B

Pick E2B when you are not on Vercel, want $100 of free credits, or may want to host the open-source engine yourself.

Free (open source)Free tierOfficial MCP

Daytona

Pick Daytona when you need sandboxes with graphics cards or Windows.

from $0.000108 per GiB-hour afterFree tierOfficial MCP

Modal Sandboxes

Pick Modal Sandboxes when the code you run needs graphics cards, in serverless containers.

from $0.00000667 per GiB perFree tier

All code sandboxes APIs

Get started

Tell your AI assistant

“Run the code my agent generates in Vercel Sandbox: on the server use @vercel/sandbox with the OIDC token from .env.local, create the sandbox with networkPolicy deny-all unless it needs the internet, check exitCode and stderr, and call sandbox.stop() when done.”

  1. Link a folder to a Vercel project and pull a development token into .env.local (needs a Vercel account and the Vercel command-line tool).

    vercel link
    vercel env pull

    From vercel.com/docs/sandbox/quickstart.md

  2. Install the package (Node.js 22+ or Python 3.10+).

    npm install @vercel/sandbox dotenv @types/node tsx typescript

    From vercel.com/docs/sandbox/quickstart.md

  3. Create a sandbox and run a command, then stop it when done.

    const sandbox = await Sandbox.create();
    const result = await sandbox.runCommand('echo', ['Hello from Vercel Sandbox!']);
    console.log(await result.stdout());

    From vercel.com/docs/sandbox/quickstart.md

First request

import { config } from 'dotenv';
config({ path: '.env.local' });

import { Sandbox } from '@vercel/sandbox';

async function main() {
  const sandbox = await Sandbox.create();

  const result = await sandbox.runCommand('echo', ['Hello from Vercel Sandbox!']);
  console.log(await result.stdout());
}

main().catch(console.error);

Mistakes to avoid

Leaving sandboxes to run until the timeout.
Call sandbox.stop() as soon as the work is done, and use the shortest timeout that works.

CPU and memory are billed while the sandbox runs.

Creating thousands of one-off sandboxes with the default persistence on.
Pass persistent false (or --non-persistent in the CLI) for one-off jobs.

Sandboxes are persistent by default and the automatic snapshots are billed as storage.

Passing API keys into the sandbox as environment variables for the agent to use.
Use credential brokering in the network policy, so the key is added to outgoing requests and never enters the sandbox.

Code inside the sandbox can read and leak any key it is given.

Treating a returned command result as success.
Check exitCode (0 means success) and read stderr() before parsing stdout.

runCommand returns normally even when the program inside failed.

Building a commercial product on the Hobby plan.
Use Pro or Enterprise for any business use.

The Hobby plan is limited to non-commercial personal use.

Questions

Is there a free tier?

Yes. Hobby includes 5 hours of active CPU, 420 GB-hours of memory and 5,000 sandbox creations a month, for non-commercial use. Over the quota, creation pauses instead of charging you.

Do I pay while my code waits for an AI model to answer?

Not for CPU. Waiting for network or model calls does not count as active CPU; memory is still billed while the sandbox runs.

Can I use it outside Vercel hosting?

Yes. Use an access token with your team and project IDs in other clouds or CI systems.

How does Pro billing work?

Sandbox usage is first taken from the Pro plan's $20 monthly credit, then billed at the listed rates.

Which languages are inside a sandbox?

The default image has Node.js, Python 3.14, coding agents and common tools, with root access; you can also use your own image.