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 the correct Python API for searching, renting, and managing GPUs on Vast.ai.

Dev & CodingIntermediate★ 223⑂ 95AI score 7/10Last updated: Oct 2, 2026

What it does

  • Gives Claude the exact vastai package usage: API-key auth, offer search, instance create/start/stop/reboot/destroy, labeling, and SSH/SCP connection strings.
  • Covers the high-level VastAI class plus the typed SyncClient, the AsyncClient context-manager pattern, and the Serverless inference client.
  • Documents copy() / cloud_copy() URL syntax for moving data between local disk, instances, volumes, and cloud buckets, with the warning never to target /root.
  • Captures billing gotchas such as always passing bid_price after a type='bid' search, and that outbid spot instances stop (and keep billing storage) rather than being destroyed.

Who it's for

  • ML engineers and researchers renting GPUs on Vast.ai for training or inference.
  • Anyone scripting GPU provisioning/teardown to keep cloud costs down.
  • Developers wiring up Vast.ai serverless LLM endpoints.

Example uses

  1. "Find the cheapest 4x RTX 4090 offer above 0.99 reliability and launch a PyTorch instance" → generates search_offers + min() + create_instance code.
  2. "Pull results back to my laptop and destroy the box when training finishes" → copy("C.12345:/workspace/results/", "local:./out/") then destroy_instance.
  3. "Async call a Qwen3-8B serverless endpoint for completions" → produces the Serverless async pattern.

· · · 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.
  2. Create the skill folder: mkdir -p ~/.claude/skills/vastai-sdk
  3. Clone the repo: git clone https://github.com/vast-ai/vast-cli.git /tmp/vast-cli
  4. Copy the skill file: cp /tmp/vast-cli/vastai_sdk/SKILL.md ~/.claude/skills/vastai-sdk/
  5. Install the library: pip install vastai (add serverless support with pip install "vastai[serverless]").
  6. Create an API key at https://console.vast.ai/manage-keys/ and save it to ~/.vast_api_key.
  7. Restart Claude Code and ask something like "write a script to rent an RTX 4090 on Vast.ai" to trigger the skill.