What Runpod users need to know about Vast.ai:
- Your existing Runpod images may work as-is. Many Runpod-compatible Docker images run on Vast with little or no modification.
- You pick the individual machine, not just the GPU type. Every offer shows reliability score, network speed, CPU, location, and other critical specs. Two A100s at the same price can be very different machines. Vast gives you the data to choose the right one.
- Bandwidth billed separately. Providers set rates for bandwidth use per GB, which you can view in the price breakdown by hovering over the price of an instance offer. Filter for instances with lower bandwidth rates using the pricing filters on the search page. Note that both inbound and outbound traffic are billed, so pulling large models or datasets counts toward your bandwidth costs.
- Set your disk size right at launch. Resizing requires recreating the container. Storage is cheap, so err on the side of more space.
- Often lower prices for the same GPU performance. Marketplace competition drives prices down. You’ll frequently find the same hardware at lower rates than fixed-tier providers.
In This Guide
- Concept Mapping: Runpod terms → Vast equivalents
- Account Setup
- Migrating from Pods: instances, Docker config, storage, networking, SSH, logs, lifecycle/cost
- Migrating from Serverless: endpoints, PyWorker
- Migrating API Code: Runpod API retirement, four-step migration, tested examples, reference tables, instructions for AI agents
- CLI Reference: full side-by-side table
Concept Mapping
Account Setup
- Create an account at cloud.vast.ai
- Add credits. Similar to Runpod, Vast is prepaid. Add funds via the Billing page before renting.
- Add your SSH public key at cloud.vast.ai/manage-keys/. If you do not have one, generate it with
ssh-keygen -t ed25519. Keys are applied at container creation time. If you forgot, use the SSH key button on the instance card to add one without recreating.
- Generate an API key from the Keys page and authenticate:
Vast CLI
Migrating from Pods
A Runpod Pod is a Docker container running on a GPU-equipped machine. You pick a GPU type and a template (Docker image + config), and Runpod assigns you a machine from its managed fleet. The Vast.ai equivalent is an Instance: also a Docker container with exclusive GPU access, but rented from an open marketplace of independent hosts rather than a single provider. The core workflow is the same (pick a GPU, choose an image, launch), but how you find that GPU is different.Finding and Creating Instances
Runpod presents a curated list of GPUs at set prices. Vast.ai is a marketplace: hosts list their machines with specs and asking prices, and you search through available offers using filters. Two A100 80GB offers at the same price can be on very different machines. Vast surfaces reliability scores, network speeds, and location for every offer so you can pick the right one for your workload. Always check these before renting:- Reliability score: historical uptime percentage. Look for 0.95+ for production workloads. If reliability is critical, filter for Secure Cloud machines only.
- Network speed:
inet_downandinet_upin Mbps. Matters for model downloads and data transfer. - Geolocation: filter by region for latency-sensitive workloads.
- Console
- CLI
- Go to Search
- Use the GPU type, VRAM, reliability, and region filters to narrow results
- Review each offer’s reliability score and network speed before renting
- Click Rent on your chosen offer and configure image, disk, and Docker options in the dialog
Docker Environment
Images
If you have a working Runpod template, you likely already have a Docker image that works on Vast. Many Runpod-compatible images may run as-is. Just specify the image in the--image flag.
To minimize cold start times:
- Use Vast base images (also on DockerHub), which are pre-cached on many hosts
- Use smaller, optimized images where possible
- For very large images, build on top of a pre-cached base
Environment Variables
On Runpod, environment variables are set in the template UI or passed as a JSON object in the API. Vast works the same way.- Console
- CLI
In the instance creation dialog or template editor, set environment variables using the GUI fields or the Docker Options field with Docker syntax:
Entrypoint Arguments
Runpod’s “Docker Command” field passes arguments to the container’s ENTRYPOINT ("dockerStartCmd" in the API). On Vast, use --args.
- Console
- CLI
In the template editor or instance creation dialog, enter entrypoint arguments in the Docker Options field.
Startup Scripts
Vast has an on-start script that runs a shell command after the container starts. Runpod does not have a direct equivalent; the closest is baking the command into a custom Docker image.- Console
- CLI
In the template editor or instance creation dialog, enter your startup commands in the On-start Script field.
Converting a Runpod Template
Runpod templates bundle an image, environment, ports, and a Docker command into a reusable config. Here is how each field maps to Vast:
Full example: a Runpod vLLM template converted to Vast:
Storage
For model weights and datasets, the recommended approach is to pull from object storage on boot. This works across any host and keeps your instance stateless:- Object storage (S3, R2, GCS): pull weights on boot. Most flexible, works across any host.
- Cloud Sync: Vast’s built-in sync tool supports S3, Google Drive, Backblaze, and Dropbox. Access it via the console or
vastai cloud copy. Docker instances only; use IAM credentials with S3 for bucket-scoped access rather than account-level credentials.
Vast local volumes are tied to the physical machine they were created on. For data that needs to persist across instances or move to a new host, use cloud object storage (S3, R2, GCS), a more portable and provider-agnostic approach than any single vendor’s proprietary network volume.
Networking and Ports
Both platforms provide proxy access to services. On Runpod, proxy URLs are static:https://<POD_ID>-<PORT>.proxy.runpod.net. On Vast, there are two proxy mechanisms:
- HTTP/HTTPS proxy: instances using Vast base images get auto-generated Cloudflare tunnel URLs (
https://four-random-words.trycloudflare.com) per open port via the Instance Portal. These tunnels are best-effort and may not always be available; for reliable HTTPS access, use direct connections or the built-in Jupyter certificate (see Jupyter / IDE Access). - SSH proxy: instances using SSH-compatible images support proxy SSH through Vast’s proxy server, which works even on machines without open ports. Direct SSH (faster) is preferred when available.
Declaring Ports at Launch
- Console
- CLI
In the instance creation dialog or template editor, enter port mappings in the Docker Options field:
Discovering Your External Port
- Console
- CLI
After the instance starts, click the Open Ports button on the instance card to see the external port mapping.
VAST_TCP_PORT_<N> environment variables inside the container for each mapped port. Use these in your application code to construct external URLs.
Connecting to Your Instance
SSH
On Runpod, you SSH into a pod using the connection info from the console. On Vast, SSH uses key-only authentication (make sure you’ve added your public key in Account Setup).- Console
- CLI
Click the SSH button on the instance card to see the full connection command, then paste it into your terminal.
Ctrl+B C to open a new window and Ctrl+B N to cycle between windows. To disable tmux, create ~/.no_auto_tmux inside the container.
Port forwarding works the same as any SSH connection:
Bash
Jupyter / IDE Access
Both platforms support JupyterLab. On Vast, Jupyter is available out of the box with two access modes:- Proxy mode (default): Click the Jupyter button in the Vast console. Works immediately, no setup needed. Uses Cloudflare tunnels, which are best-effort.
- Direct HTTPS (recommended): Faster, more reliable connection that bypasses the proxy. Instances using Vast base images include a built-in Jupyter TLS certificate. Install the Vast TLS root certificate (
jvastai_root.cer), downloadable from the Vast console, to connect directly over HTTPS without browser warnings.
Logs
- Console
- CLI
Click the Logs button on the instance card to view live output.
Instance Lifecycle and Cost
Start, Stop, and Destroy
- Console
- CLI
Use the buttons on the instance card: Stop to pause compute, Destroy to delete the instance and stop all charges.
If you are done with an instance, destroy it. Stopped instances continue to cost money for storage. Only stop instances you plan to resume soon.
On-Demand vs Interruptible
- Console
- CLI
On the Search page, use the Instance Type toggle to switch between on-demand and interruptible offers before renting.
Reserved Instances
If you run an on-demand instance for days or weeks, convert it to a reserved instance for up to 50% savings. Reserved instances lock in a discounted rate in exchange for a time commitment:- Console
- CLI
Not all machines support reserved pricing. To find eligible machines before renting, go to Search and switch the On-demand filter to Reserved. After renting, go to the Instances page and click the green discount badge on your instance card to open the pre-payment dialog.
Reserved instances cannot migrate between hosts. If the host machine goes down, your reservation is tied to that machine.
Next Steps
Instances Overview
How Vast instances work: GPU access, billing, and connectivity
Pricing
How compute, storage, and bandwidth charges work
Migrating from Serverless
Runpod Serverless lets you deploy a handler function that scales to zero. You send a request, Runpod spins up a worker, runs your handler, and tears it down. You pay per second of compute, not for idle GPUs. Vast Serverless delivers autoscaling inference at marketplace rates, with per-second billing across 68+ GPU types globally. Vast handles routing, queueing, and autoscaling automatically. You can deploy using a pre-built template (vLLM, TGI, ComfyUI) or implement a custom handler with PyWorker, analogous to RunPod’s handler pattern. Pricing: Serverless workers run on the same marketplace instances you’d rent directly, you pay the same per-second rate, just with autoscaling on top.Vast Serverless Architecture
The system has three layers:Deployment Options
Vast Serverless supports two deployment paths: PyWorker (Custom Handlers) is the core framework for building serverless workers. You implement a handler function in Python, analogous to RunPod’s handler pattern, with full control over request preprocessing, model loading, and response formatting. Most production deployments use custom PyWorker handlers. See the PyWorker documentation to get started. Pre-built Templates serve as ready-to-use starting points and examples. Vast provides templates for common frameworks (vLLM, TGI, ComfyUI) that you can deploy directly or use as a reference for building your own handlers.Creating Endpoints and Workergroups
- Console
- CLI
- Go to Serverless in the console
- Click New Endpoint and configure name, max workers, and scaling parameters
- Add a workergroup: choose a pre-built template (vLLM, TGI, ComfyUI) for quick setup, or configure a custom PyWorker by specifying your Docker image and
PYWORKER_REPOenvironment variable
Calling Your Endpoint
Install the Vast SDK:Next Steps
Serverless Quickstart
Deploy your first serverless endpoint
Serverless Pricing
Pay-as-you-go billing, cold workers, and endpoint suspension
Migrating API Code
Runpod is retiring its REST API v1 and its GraphQL API, so code that calls either one has to be updated. This section shows how to move that code to Vast.ai using thevastai CLI, the Python SDK or the REST API. Commands were checked against vastai 1.9.1.
Scope: this section covers code that manages Runpod pods (Vast calls them instances): finding a GPU, creating it, running work on it, moving files and deleting it. Moving Serverless endpoints or network volumes takes separate work; see Migrating from Serverless and Storage.
Requests to a running Runpod Serverless endpoint don’t use the retiring APIs, but creating and managing endpoints through REST v1 or GraphQL does.
What Runpod Is Changing
Pods and endpoints that are already running are not affected; only code that calls these APIs is. Runpod’s replacement, REST API v2, has new paths and response shapes, so the code has to be rewritten either way. Recent versions of the
runpod Python SDK already use the new API for pod commands, and runpodctl has a new command set, so if you only use those tools, updating them may be enough. Sources: Runpod Q3 2026 update, Runpod migration guide.
Use a Coding Agent
Open your project in your coding agent (Claude Code, Codex, Cursor or another agent) and paste:Migrate in Four Steps
Step 1: Set Up Your Account
- Create an account at cloud.vast.ai and add credit on the Billing page. Vast is prepaid and bills per second.
- Create a new API key on the Keys page. Your Runpod key does not work on Vast.
- Install the CLI (it includes the Python SDK), sign in and register your SSH public key:
VAST_API_KEY environment variable or secret.
Step 2: Try One Instance
Step 3: Update Your Code
On Runpod, one call finds a GPU and creates the pod. On Vast it takes two calls:search offerslists machines that match your requirements and price limit.create instancerents one of them.
Step 4: Test, Then Clean Up
Run your updated code once with one inexpensive GPU. Confirm that it creates the instance, reachesrunning, does its work, saves its results and deletes the instance. Then run vastai show instances and confirm nothing from the test is left, including stopped instances, which still bill for storage.
Example Migration: Before and After
A small program that rents a GPU with a given image, environment variable, start command and HTTP port, waits for the job’s output, saves it and deletes the GPU.Before: Runpod REST API v1
After: Vast.ai Python SDK
What changed: the search and the price limit (Runpod picks the machine for you), the unique label,env and -p instead of env and ports, args instead of dockerStartCmd, the port lookup instead of the proxy URL, and the checks that the instance started and was deleted.
Example: Bash Batch Job
Uploads sample input, runs a GPU job, downloads results and deletes the instance. Job/download failures keep the instance for recovery. Requiresvastai, jq, python3, ssh and scp. Each transfer has a portable 1,800-second Python timeout; no local timeout utility is needed.
Reference Tables
Task Map
ID is a Vast instance ID (an integer). OFFER_ID comes from search offers. In Python, v = VastAI().
- Add
--rawto CLI commands for JSON output.vastai COMMAND --helplists every option. - Run
vastai show usersuccessfully once without--curlbefore using--curlto inspect a request. On a fresh configuration, role detection otherwise prints its account lookup and exits before reaching your command. After that initialization,--curlprints the command request without sending it; redact the API key before sharing the output. dph_totalin search results includes the disk only at the size you pass with--storage(default 5 GB). Pass your real disk size. Bandwidth is billed separately.- With
--raw, a failed command prints{"error": true, "status_code": ..., "msg": ...}to stderr. vastaiexits with code 0 even when the request fails. Check the JSON (new_contract,success,error), not the exit code.- The CLI and SDK try each request up to 3 times when it times out, can’t connect, or gets a 429, 502, 503 or 504 response, waiting as long as the server’s
Retry-Afterasks (up to 60 seconds). A 429 for the daily search quota is not retried; it resets at midnight UTC. Ifcreate instancestill fails without a clear error, check for an instance with your label before you rent again. vastai executeruns onlyls,rmanddu. Use SSH to run anything else.- The Python SDK’s
copy()does not transfer files to or from your computer. Usescp, or call thevastai copyCLI.
REST API
Base URLhttps://console.vast.ai/api/v0. Header Authorization: Bearer $VAST_API_KEY. To inspect a request, initialize the CLI with vastai show user once, then run the command with --curl (see the first-use caveat above).
Pod Settings
N is the number of GPUs. Runpod sets some limits per GPU; Vast filters on the machine total, so multiply.
GPU Names
Write GPU names with_ in place of spaces. To pick a memory size, add gpu_ram (GB). To accept several models, use gpu_name in [RTX_4090,RTX_5090].
If a query returns no offers, check the exact name in the GPU filter at cloud.vast.ai/create. A correct name can also return nothing when every machine with that GPU is rented; try again later or widen the search.
Instance Fields and Status
Always decide from
actual_status. intended_status only says what was requested.
Environment Variables Inside the Instance
Vast documents these predefined variables in its Docker execution environment guide. Map the values your application needs rather than assuming Runpod’s names also exist on Vast.
Set application variables explicitly, for example
--env '-e MODE=fast'. In SSH/Jupyter launch modes, variables reach onstart but may be missing from login sessions. The documented onstart workaround is env | grep _ >> /etc/environment; for names containing underscores (or env >> /etc/environment; for all names). Vast-published images handle this in their entrypoint. Persist only the variables the session needs; do not print credentials to logs.
Differences from Runpod
- You choose the machine and the price. Each offer has its own price, reliability, network speed and location. Put a price limit in the search (
dph_total<=...) and pass your disk size with--storageso the price includes it. - Unavailable offers. An offer can be rented by someone else between your search and your create. Pass
--cancel-unavailso the create fails right away instead of leaving a stopped instance that bills for storage, then try the next offer. - SSH mode replaces the image’s start command. With
--sshor--jupyter, put your start command in--onstart-cmd. If your image needs its own entrypoint, leave out--sshand use--argsor--entrypoint. - Ports. Runpod serves HTTP ports at
https://POD_ID-PORT.proxy.runpod.net. Vast maps each port you open with-pto a public port on the machine’s IP, over plain HTTP. Read the mapping fromportsinshow instance --raworVAST_TCP_PORT_Xinside the instance. The Docker execution environment docs specify a limit of 64 total open ports per instance; the offer must also provide enough directly accessible ports. - Storage. A Vast volume stays on the machine where it was created, so there is no network-volume equivalent. Keep data you need on any machine in object storage (S3, R2, GCS or Hugging Face), or use
vastai cloud copy. - Billing. Storage bills from creation and GPU time while
running. A stopped instance still bills for storage; only destroying it stops all charges. Each machine sets its own bandwidth price (inet_up_cost,inet_down_costin the offer). - Kept instances. An instance you keep (for example, to recover results after a failed download) runs and bills until you destroy it. It can also end if the machine goes offline or its maximum rental period runs out (
durationin the offer), so copy results off soon. - Spot instances. You get a spot instance only when you pass
--bid_price. If you are outbid, the instance stops (it is not deleted) and storage keeps billing. Change the bid withvastai change bid ID --price PRICE. - Images. Most Runpod images run on Vast unchanged. Runpod pods mount
/workspacefor you; on Vast it exists only if the image creates it, so create it (mkdir -p /workspace) before you copy files there. Vast’s images (vastai/pytorch,vastai/vllm,vastai/comfy,vastai/base-image) start fastest, and the@vastai-automatic-tagtag picks the right CUDA build for each machine.
Instructions for AI Agents
Follow these instructions when you migrate a project from Runpod, or when you rent and manage Vast instances for a user.Rules for Managing Vast for a User
- Get approval before spending. Before creating an instance, show the user the GPU, the hourly price (
dph_total, searched with--storageset to the real disk size), the expected run time and the most it can cost, and wait for a yes. Put the approved price limit in the search (dph_total<=...) so a fallback offer can’t cost more. Stay within any budget the user gives. - Use the user’s account API key and keep it secret. The user creates a new key at cloud.vast.ai/manage-keys; Runpod keys don’t work, and
CONTAINER_API_KEYfrom inside an instance is not an account key. Read the key fromVAST_API_KEYor the CLI’s saved key. Never print it, log it, or write it into code or commits. - Give every run a unique label (
--label), record every instance ID, and report the IDs to the user. - Retry only clear refusals. Create with
--cancel-unavail. If Vast declines an offer ("success": false, or a 4xx error), try the next offer. If the result is unclear (timeout, 5xx, crash), list instances with your label first, use the instance if it exists, and otherwise stop and tell the user instead of renting again. - Bound every wait. Polling, the job itself and file transfers all need time limits. Treat
exited,unknownandofflineas failures. Decide fromactual_status, never fromintended_status. - Protect the user’s results. Download results before destroying an instance. If a download fails, keep the instance and tell the user its ID, its hourly price and that it bills until deleted.
- Always clean up, then confirm. Destroy instances when their work is done and results are safe, including after errors. Then confirm each one no longer appears in
vastai show instances --raw. Stopped instances count: they still bill for storage. - Only destroy instances you created, unless the user names one.
- Use machine-readable output. Add
--rawto CLI commands and parse the JSON. Pass-ytovastai destroy instance. - Run commands over SSH and copy files with
scp, not withvastai executeor the SDK’scopy(). - Finish with a report. Tell the user what ran, on which instance IDs, for how long, what it cost, and that nothing you created is left (or what was kept and why).
Procedure for Migrating a Project
Run this from the project root to find every Runpod touchpoint:- List every match from the search above and what it does. If the project manages Serverless endpoints or network volumes, tell the user those need separate work (Scope).
- Choose one interface. Python: the
VastAIclass. Shell and CI: thevastaiCLI with--rawandjq. Other languages: the REST API. - Replace each call using the Reference Tables. Each Runpod “create pod” becomes a search with a price limit, followed by a create. Base the lifecycle code on the example migration and the bash example.
- Replace the credential. Remove
RUNPOD_API_KEYfrom code and CI secrets. Read the key fromVAST_API_KEY, and in.env.examplewrite only a placeholder:VAST_API_KEY=your-vast-api-key. The user sets the real value. - Move start commands.
dockerStartCmdbecomesargs(or--onstart-cmdwith--ssh). - List the gaps. Note anything without a Vast equivalent (network volumes, Runpod proxy URLs, pod reset) with a workaround from Differences from Runpod.
- Ask before testing. Show the user the changes and the test command, with the GPU, hourly price and price limit. After approval, run one end-to-end test on one inexpensive GPU, following the rules above.
- Report back: the files changed, the test result and its cost, the gaps, and confirmation that no test instance is left. The migration is done when no Runpod API calls remain (unless the user chose to keep some), the test passed, its results were saved, and no test instance is left.
CLI Reference
For programmatic usage, the Vast CLI supports
--raw for JSON output that can be parsed in scripts. See the CLI Reference for full documentation.
Next Steps
- CLI Reference: full command reference for the
vastaiCLI - Python SDK: use Vast from Python
- FAQ: common questions and troubleshooting
- Community Discord: get help from the Vast.ai community
- 24/7 Technical Support: live chat support available around the clock from the Vast console