Guides
Last checked:VPS, GPU cloud, serverless, or sandbox: choosing compute for AI work
computevpsgpu-cloudserverlesssandboxes
| Rent | When | Example |
|---|---|---|
| A VPS | You need a small always-on box with SSH: agents that poll, schedulers, webhooks, small APIs. | DigitalOcean |
| GPU cloud | You need CUDA hardware for training or steady inference. | RunPod |
| Serverless | Your load is bursty and you want to pay only while code runs. | Modal |
| Agent sandbox | The code being executed is untrusted, for example code an LLM wrote. | E2B |
Most real setups combine two of these.Not a benchmark
This page is not a benchmark. I have not load-tested these products against each other, and there are no performance numbers here. It is a decision guide based on how each category works and what the official pages say. Category prices below are described in orders of magnitude only; exact rates live on the linked official pricing pages and change often.
The four categories at a glance
| Category | Persistent SSH box | Billing granularity | GPU availability | Isolation model | Typical cost shape |
|---|---|---|---|---|---|
| VPS e.g. DigitalOcean | Yes, that is the product | Monthly, or per second with a 60-second minimum and monthly cap | Limited; classic plans are CPU-first | Standard VM | Cheapest tier for always-on, single-digit dollars per month and up |
| GPU cloud e.g. RunPod | Often, while the pod runs | Per second on RunPod | The whole point; consumer to datacenter cards | VM or container on shared hosts, varies by vendor | Mid; you pay for GPU-hours, idle time is the enemy |
| Serverless e.g. Modal | No; you deploy functions, not boxes | Per second rates on Modal, no minimum usage-time increments per their docs | Yes, attached per function call | Managed containers | Near zero when idle, scales with actual usage |
| Agent sandbox e.g. E2B | Ephemeral machines via SDK, not a pet server | Per second while a sandbox runs, per E2B docs | Depends on plan and vendor | Strong: isolated microVM-style sandboxes built for untrusted code | Small per-session costs that add up with fleet size |
Billing-granularity claims in this table come from each vendor’s official pricing or billing docs, checked on the date shown at the top. The rest of the table is my qualitative read of each category, not vendor wording.
Choose by workload
VPS
Choose a VPS if...
- You want one box that is always on: cron jobs, a small API, a Telegram bot, an agent that polls a queue.
- You want plain SSH, systemd, and files that survive reboots without thinking about it.
- Your AI workload is mostly API calls to hosted models, so you need orchestration, not local GPUs.
DigitalOcean. New there? A signup credit exists; exact amount, expiry, and payment-method rules on a dated page: DigitalOcean free credits.
GPU cloud
Choose a GPU cloud if...
- You need CUDA hardware for hours at a time: fine-tuning, batch inference, embeddings at scale.
- You can start and stop machines around your jobs, so per-second billing actually saves money.
- You want a choice of GPU classes instead of whatever a general cloud has free in your region.
RunPod: GPU pods, serverless endpoints, and clusters, billed per second. No advertised signup credit; a $10 minimum deposit is not a grant, so it stays off the credits page.
Serverless
Choose serverless if...
- Your load is bursty: an endpoint that gets traffic spikes, nightly batch jobs, per-request GPU inference.
- You would rather ship functions than administer a box.
- Idle cost matters more to you than cold starts.
Modal. Its Starter plan is $0 + compute / mo and includes monthly free credits; exact figures on the dated page: Modal free tier.
Agent sandbox
Choose an agent sandbox if...
- You execute code that an LLM generated, or code from users you do not trust.
- You want a fresh, disposable machine per task, created and destroyed from an SDK.
- Isolation failures would be a security incident, not just an inconvenience.
E2B: isolated cloud sandboxes, described on their site as secure computers for AI agents. Hobby tier is free plus usage with a one-time $100 credit, no credit card required (checked 2026-08-20). E2B pricing. Full terms on the dated page: E2B Hobby $100 credit.
Most people who land on the serverless row want to start without paying, and those free tiers split three ways. Quota tiers, where running out pauses something instead of billing you: Cloudflare Workers for edge requests, Render for a container that spins down when no traffic arrives, Netlify and Vercel for front ends and their functions, and Supabase when the missing piece is a hosted Postgres backend rather than compute. Trials that start without a card: Fly.io, which ends at whichever comes first of a machine-runtime cap or a day count, and Railway, whose trial credit expires into a much smaller monthly allowance. Free plans that want a card first: Koyeb, whose signup defaults to its paid Pro plan until you downgrade, Deno Deploy, where linking a card unlocks the full free limits rather than ending them, and Northflank, which requires a payment method before you can create resources at all. The card mechanics behind that last group are cataloged in credit card traps.
Two adjacent options worth knowing
OpenRouter if what you actually need is model access, not compute. It is a unified API for hundreds of models. A free plan with free models exists (their FAQ says 50 free-model requests per day, or 1000 per day after buying at least $10 of credits). No dollar signup credit is published, only a “small free allowance” with no stated amount, so ignore any post that names one.
Google Cloud if you want a full cloud around your compute. New customers get a $300 / 90 days Welcome credit (their terms say 3 months). A credit card or other payment method is required at signup; Google places a temporary authorization hold of at most $1, not a charge, per their docs. Amount, expiry, eligibility, and the payment-hold nuance are broken down on the dated page: Google Cloud $300 credit.
How to actually decide
Start from the failure mode you cannot accept. If downtime is unacceptable, a VPS or managed serverless beats a spot GPU pod. If a security escape is unacceptable, a purpose-built sandbox beats a hand-rolled container on a VPS. If surprise bills are unacceptable, per-second billing with an idle floor of zero (serverless, sandboxes) beats a monthly box you forget about.
Then look at grants before paying: the credits index tracks what each provider officially gives away, with the date I last checked each number. Comparisons between specific pairs of providers are collected under /compare/, starting with RunPod vs Modal and Contabo vs DigitalOcean.
Sources
Last checked:- DigitalOcean pricing
- RunPod pricing
- RunPod billing docs
- Modal pricing
- E2B pricing
- OpenRouter FAQ
- Google Cloud free trial docs
All numbers on this page come from the official pages above, checked on the date shown. If a figure is not stated there, this page says "Not stated officially" instead of guessing.