vastai-api
Vast.ai API Documentation - Affordable GPU Cloud Marketplace
What this skill does
# Vastai-Api Skill Comprehensive assistance with the Vast.ai API for managing GPU instances, machine operations, and automating AI/ML workflows. This skill provides access to official documentation for programmatically controlling the Vast.ai platform. ## When to Use This Skill This skill should be triggered when working with: - **GPU Instance Management**: Creating, destroying, starting, stopping, or managing GPU instances - **Machine Operations**: Listing machines for rent, setting pricing, managing maintenance windows - **SSH & Authentication**: Managing SSH keys, API keys, and secure connections to instances - **Billing & Credits**: Viewing invoices, earnings, deposits, or transferring credits - **Network Volumes**: Creating, listing, or managing network storage volumes - **Serverless Endpoints**: Working with Vast.ai serverless workergroups and endpoints - **Data Transfer**: Copying data between instances or cloud services - **Account Management**: Managing subaccounts, environment variables, or team roles - **CLI Operations**: Using the `vastai` command-line tool - **API Integration**: Building applications that integrate with Vast.ai's REST API ## Quick Reference ### Creating and Managing Instances #### Create a New GPU Instance ```bash # Create instance from an offer vastai create instance <offer_id> \ --image pytorch/pytorch:latest \ --disk 50 \ --ssh ``` #### List Your Active Instances ```bash # Show all instances vastai show instances # Show specific instance details vastai show instance <instance_id> ``` #### Manage Instance State ```bash # Stop an instance (pause GPU billing, storage still charged) vastai stop instance <instance_id> # Start a stopped instance vastai start instance <instance_id> # Reboot instance without losing GPU priority vastai reboot instance <instance_id> # Destroy instance permanently (irreversible) vastai destroy instance <instance_id> ``` ### SSH Key Management #### Add SSH Key to Account ```bash # Add your public SSH key vastai create ssh-key "ssh-rsa AAAAB3NzaC1yc2EA... user@host" # List all SSH keys vastai show ssh-keys # Attach SSH key to specific instance vastai attach ssh <instance_id> <ssh_key> ``` ### Search and Filter Offers #### Search for GPU Offers ```bash # Search with filters vastai search offers \ --gpu_name RTX_4090 \ --num_gpus 2 \ --disk_space 100 # Order by price vastai search offers --order dph_total ``` ### Environment Variables (Secrets) #### Manage Environment Variables ```bash # Create encrypted environment variable vastai create env-var MY_API_KEY "secret_value_here" # List all environment variables vastai show env-vars # Update existing variable vastai update env-var MY_API_KEY "new_secret_value" # Delete environment variable vastai delete env-var MY_API_KEY ``` ### Billing and Credits #### View Billing Information ```bash # Show invoices vastai show invoices # Show earnings (for hosts) vastai show earnings # Show deposit for specific instance vastai show deposit <instance_id> # Transfer credits to another user vastai transfer credit [email protected] 25.00 ``` ### Instance Logs #### Retrieve Container Logs ```bash # Get last 100 lines of logs vastai show logs <instance_id> --tail 100 # Filter logs with grep pattern vastai show logs <instance_id> --filter "error" # Get daemon system logs vastai show logs <instance_id> --daemon-logs ``` ### Data Transfer Operations #### Copy Between Instances ```bash # Copy from one instance to another vastai copy <src_id> <dst_id> /source/path /destination/path # Cloud copy using rclone vastai cloud copy <instance_id> remote:bucket/path /local/path ``` ### Machine Management (for Hosts) #### List Your Machine for Rent ```bash # List machine with pricing vastai list machine <machine_id> \ --price_gpu 0.50 \ --price_disk 0.10 # Unlist machine (stop renting) vastai unlist machine <machine_id> # Schedule maintenance window vastai schedule maint <machine_id> \ --sdate "2025-11-01T10:00:00" \ --duration 3600 ``` ## Key Concepts ### Instance Types - **On-Demand Instances**: Pay-as-you-go GPU instances you create and manage - **Interruptible Instances**: Lower-cost instances that can be reclaimed by hosts - **Reserved Instances**: Pre-paid instances with usage discounts (up to 40%) ### Pricing Model - **GPU Pricing**: Charged per hour while instance is running - **Storage Pricing**: Charged for disk space even when instance is stopped - **Network Transfer**: Upload/download bandwidth costs - **Discounts**: Available through prepayment on reserved instances ### Instance States - `starting`: Instance is initializing - `running`: Instance is active and billable - `stopped`: Container stopped (storage still billable) - `exited`: Container exited or failed - `rebooting`: In process of restarting - `recycling`: Being destroyed and recreated from fresh image ### Authentication - **API Keys**: Used for programmatic access via REST API - **SSH Keys**: For secure shell access to running instances - **Environment Variables**: Encrypted secrets injected into containers ### Templates Pre-configured setups containing: - Docker image specifications - Environment variables - Onstart scripts - Resource requirements - Port mappings Popular templates include PyTorch, TensorFlow, Jupyter, ComfyUI, and Stable Diffusion. ### Network Volumes Shared network storage that can be: - Attached to multiple instances - Persisted independently of instance lifecycle - Used for datasets and model weights - Scaled independently ### Serverless Architecture - **Endpoints**: Top-level routing and configuration - **Workergroups**: Pools of GPU instances that autoscale - **Test Workers**: Exploration phase for performance profiling - **Target Utilization**: Controls scaling behavior ## Reference Files This skill includes comprehensive documentation in `references/`: ### llms-full.md Complete API reference with all endpoints organized by category: - **Accounts**: API keys, SSH keys, user management, subaccounts - **Billing**: Invoices, earnings, deposits, credit transfers - **Instances**: Create, manage, destroy, reboot, logs, SSH - **Machines**: List for rent, pricing, maintenance, default jobs - **Network Volumes**: Create, list, manage shared storage - **Search**: Find offers, benchmarks, filter GPU availability - **Serverless**: Endpoints, workergroups, autoscaling configuration Each endpoint includes: - HTTP method and path - Detailed description - CLI usage examples - Parameter specifications - Source documentation links ### llms-txt.md Focused documentation covering: - Serverless workergroup parameters and configuration - Endpoint management - QuickStart guide with setup instructions - Common questions and answers - Schema.org structured data for better searchability ### llms.md Curated list of all API operations with brief descriptions and CLI examples, organized by category for quick lookup. ## Working with This Skill ### For Beginners **Start here:** 1. Review the QuickStart section in `llms-txt.md` 2. Follow the 4-step setup process (signup, add credit, prepare SSH, create instance) 3. Try the basic examples in Quick Reference above 4. Learn about instance states and pricing model in Key Concepts **First tasks to try:** - Create an API key for authentication - Add your SSH public key to your account - Search for available GPU offers - Create your first instance with a template ### For Intermediate Users **Focus on:** - Environment variable management for secrets - Data transfer between instances and cloud storage - Instance lifecycle management (stop/start/reboot vs destroy) - Billing optimization with reserved instances - Custom template creation for your workflows **Useful patterns:** - Set up auto-billing to avoid instance interruptions - Use environment variables for API keys and credentials - Schedule regular backups with copy commands - Monitor costs with invoice and earnings endpoints ### For Advanc
Related in Backend & APIs
jfrog
IncludedInteract with the JFrog Platform via the JFrog CLI and REST/GraphQL APIs. Use this skill when the user wants to manage Artifactory repositories, upload or download artifacts, manage builds, configure permissions, manage users and groups, work with access tokens, configure JFrog CLI servers, search artifacts, manage properties, set up replication, manage JFrog Projects, run security audits or scans, look up CVE details, query exposures scan results from JFrog Advanced Security, manage release bundles and lifecycle operations, aggregate or export platform data, or perform any JFrog Platform administration task. Also use when the user mentions jf, jfrog, artifactory, xray, distribution, evidence, apptrust, onemodel, graphql, workers, mission control, curation, advanced security, exposures, or any JFrog product name.
cupynumeric-migration-readiness
IncludedPre-migration readiness assessor for porting NumPy to cuPyNumeric. Use BEFORE substantial porting work begins when the user asks whether code will scale on GPU, whether they should migrate to cuPyNumeric, which NumPy patterns transfer cleanly, what must be refactored before porting, or mentions pre-port assessment, scaling analysis, or refactor planning. Inspect the user's source code, look up NumPy usage, cross-reference the cuPyNumeric API support manifest, and distinguish distributed-scaling-friendly patterns from blockers such as unsupported APIs, scalar synchronization, host round-trips, Python/object-heavy control flow, shape/data-dependent branching, and in-place mutation hazards. Produce a verdict of READY, LIGHT REFACTOR, SIGNIFICANT REFACTOR, or NOT RECOMMENDED, with concrete refactor pointers.
alibabacloud-data-agent-skill
IncludedInvoke Alibaba Cloud Apsara Data Agent for Analytics via CLI to perform natural language-driven data analysis on enterprise databases. Data Agent for Analytics is an intelligent data analysis agent developed by Alibaba Cloud Database team for enterprise users. It automatically completes requirement analysis, data understanding, analysis insights, and report generation based on natural language descriptions. This tool supports: discovering data resources (instances/databases/tables) managed in DMS, initiating query or deep analysis sessions, real-time progress tracking, and retrieving analysis conclusions and generated reports. Use this Skill when users need to query databases, analyze data trends, generate data reports, ask questions in natural language, or mention "Data Agent", "data analysis", "database query", "SQL analysis", "data insights".
token-optimizer
IncludedReduce OpenClaw token usage and API costs through smart model routing, heartbeat optimization, budget tracking, and native 2026.2.15 features (session pruning, bootstrap size limits, cache TTL alignment). Use when token costs are high, API rate limits are being hit, or hosting multiple agents at scale. The 4 executable scripts (context_optimizer, model_router, heartbeat_optimizer, token_tracker) are local-only — no network requests, no subprocess calls, no system modifications. Reference files (PROVIDERS.md, config-patches.json) document optional multi-provider strategies that require external API keys and network access if you choose to use them. See SECURITY.md for full breakdown.
resend-cli
IncludedUse this skill when the task is specifically about operating Resend from an AI agent, terminal session, or CI job via the official resend CLI: installing/authenticating the CLI, sending/listing/updating/cancelling emails, batch sends, domains and DNS, webhooks and local listeners, inbound receiving, contacts, topics, segments, broadcasts, templates, API keys, profiles, or debugging Resend CLI/API failures. Trigger on mentions of Resend CLI, `resend`, `resend doctor`, `resend emails send`, `resend domains`, `resend webhooks listen`, `resend emails receiving`, or agent-friendly terminal automation.
alibabacloud-odps-maxframe-coding
IncludedUse this skill for MaxFrame SDK development and documentation navigation on Alibaba Cloud MaxCompute (ODPS). Helps answer MaxFrame API, concept, official example, and supported pandas API questions; create data processing programs; read/write MaxCompute tables; debug jobs (remote or local); and build custom DPE runtime images. Trigger when users mention MaxFrame, MaxCompute with MaxFrame, ODPS table processing, DPE runtime, MaxFrame docs/examples, DataFrame/Tensor operations, or GPU runtime setup. Works for both English and Chinese queries about Alibaba Cloud data processing with MaxFrame.