Claude Skill MartBrowse skillsQuick linesLearn by videoTerminal guideWhat is a Skill?
Back to list

Vast.ai Python SDK Guide

A reference skill that teaches Claude to drive Vast.ai GPU instances, volumes, serverless endpoints, and billing through the Python SDK.

Dev & CodingIntermediate21289AI score 7/10Last updated: Aug 18, 2026

What it does

  • Gives Claude the accurate high-level API surface of the vastai / vastai_sdk Python package.
  • Covers the full instance lifecycle with code: searching offers, creating, start/stop/reboot/destroy, labeling, and fetching SSH/SCP connection strings.
  • Includes data movement (copy, cloud_copy), volumes and network volumes, serverless deployments, host machine listing, SSH keys, and team management.
  • Separates three layers: VastAI (high level), SyncClient/AsyncClient (typed low level), and Serverless (inference endpoints).
  • Calls out real pitfalls: spot rentals silently fall back to on-demand pricing unless you pass bid_price, and copying into /root or / breaks SSH permissions.

Who it's for

  • ML engineers and researchers renting GPUs on Vast.ai for training or inference.
  • MLOps folks scripting GPU provisioning pipelines.
  • Cost-conscious teams mixing interruptible and on-demand instances.

Example uses

  1. "Find the cheapest 4x RTX 4090 offer with reliability > 0.99 and launch it with the pytorch image" → search_offers then create_instance on the min dph_total.
  2. "Upload ./data to /workspace/data on instance 12345, then pull results back" → vast.copy("local:./data/", "C.12345:/workspace/data/") and the reverse.
  3. "Send a Qwen3-8B prompt to my serverless endpoint and print just the completion text" → async Serverless.request("/v1/completions", ...).

· · · Install guide · · ·

Try it now, no install

Paste this into Claude to use the skill without installing anything.

Read the instructions in this file and follow them to help me:
https://raw.githubusercontent.com/vast-ai/vast-cli/HEAD/vastai_sdk/SKILL.md

What I want: (describe your task here)

If Claude can't open the link, open it yourself and paste the contents instead.

If it works for you, download the ZIP below and install it. Then it runs on its own — no pasting each time.

Install in the Claude app (no terminal)
  1. Download the ZIP with the button below.
  2. In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
  3. Go to Customize → Skills → + → 'Upload a skill' and upload the ZIP.
Download ZIP
Install in Claude Code

Let Claude do it — paste this into Claude Code

Install the skill I found on Claude Skill Mart.
Copy the vastai_sdk folder from the GitHub repo vast-ai/vast-cli into my ~/.claude/skills/vastai-sdk/.
When it's done, tell me in one line what this skill can do.

Install with a command instead

git clone https://github.com/vast-ai/vast-cli.git /tmp/vast-cli && mkdir -p ~/.claude/skills/vastai-sdk && cp /tmp/vast-cli/vastai_sdk/SKILL.md ~/.claude/skills/vastai-sdk/

This is a third-party skill. Check the source repository before installing.

  1. Open a terminal and create the skills folder: mkdir -p ~/.claude/skills
  2. Clone the repository: git clone https://github.com/vast-ai/vast-cli.git /tmp/vast-cli
  3. Copy the skill file: mkdir -p ~/.claude/skills/vastai-sdk && cp /tmp/vast-cli/vastai_sdk/SKILL.md ~/.claude/skills/vastai-sdk/
  4. Install the Python package: pip install vastai (add serverless support with pip install "vastai[serverless]")
  5. Create an API key at https://console.vast.ai/manage-keys/ and save it to ~/.vast_api_key.
  6. Restart Claude Code and try a prompt like "search Vast.ai for RTX 4090 offers" to confirm the skill loads.