From 0f38da1068719e747dbb016d1b29a623aaddb946 Mon Sep 17 00:00:00 2001 From: Zhongwei Li Date: Sun, 30 Nov 2025 08:51:06 +0800 Subject: [PATCH] Initial commit --- .claude-plugin/plugin.json | 12 + README.md | 3 + plugin.lock.json | 64 + skills/vastai-api/SKILL.md | 393 + skills/vastai-api/plugin.json | 15 + skills/vastai-api/references/index.md | 7 + skills/vastai-api/references/llms-full.md | 16620 ++++++++++++++++++++ skills/vastai-api/references/llms-txt.md | 14645 +++++++++++++++++ skills/vastai-api/references/llms.md | 405 + 9 files changed, 32164 insertions(+) create mode 100644 .claude-plugin/plugin.json create mode 100644 README.md create mode 100644 plugin.lock.json create mode 100644 skills/vastai-api/SKILL.md create mode 100644 skills/vastai-api/plugin.json create mode 100644 skills/vastai-api/references/index.md create mode 100644 skills/vastai-api/references/llms-full.md create mode 100644 skills/vastai-api/references/llms-txt.md create mode 100644 skills/vastai-api/references/llms.md diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json new file mode 100644 index 0000000..6bfffef --- /dev/null +++ b/.claude-plugin/plugin.json @@ -0,0 +1,12 @@ +{ + "name": "vastai-api", + "description": "Interacts with the VastAI API.", + "version": "0.0.0-2025.11.28", + "author": { + "name": "Tim Green", + "email": "rawveg@gmail.com" + }, + "skills": [ + "./skills/vastai-api" + ] +} \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..4f1f915 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# vastai-api + +Interacts with the VastAI API. diff --git a/plugin.lock.json b/plugin.lock.json new file mode 100644 index 0000000..3e62c57 --- /dev/null +++ b/plugin.lock.json @@ -0,0 +1,64 @@ +{ + "$schema": "internal://schemas/plugin.lock.v1.json", + "pluginId": "gh:rawveg/skillsforge-marketplace:vastai-api", + "normalized": { + "repo": null, + "ref": "refs/tags/v20251128.0", + "commit": "042da0b21926689770dc334e975b9fc28bac7a81", + "treeHash": "309e5e05329b54b9d1b6bca48f1e3fd63817c981a0559524e4adecb19a26d7fc", + "generatedAt": "2025-11-28T10:27:54.696270Z", + "toolVersion": "publish_plugins.py@0.2.0" + }, + "origin": { + "remote": "git@github.com:zhongweili/42plugin-data.git", + "branch": "master", + "commit": "aa1497ed0949fd50e99e70d6324a29c5b34f9390", + "repoRoot": "/Users/zhongweili/projects/openmind/42plugin-data" + }, + "manifest": { + "name": "vastai-api", + "description": "Interacts with the VastAI API." + }, + "content": { + "files": [ + { + "path": "README.md", + "sha256": "55335654cc0ffa2c6406f3ebde6e301e23e8df2098021481e6f37b9f11b8ab95" + }, + { + "path": ".claude-plugin/plugin.json", + "sha256": "6edbda4dee16a8c9183b7cedfc2b16e3d830ce69eb9592daf18f7ca95c6788df" + }, + { + "path": "skills/vastai-api/plugin.json", + "sha256": "219179cee7aec19395ab5ce986663617e29a4125f71eda61e0d08a328ee125fd" + }, + { + "path": "skills/vastai-api/SKILL.md", + "sha256": "88df8892931053853662c91bf45546ae33e5c306650dcce40099b2bafd0dfcab" + }, + { + "path": "skills/vastai-api/references/llms.md", + "sha256": "8a022ed3595fcddb37abd0d7f84a8c96c9a3eb5392efd04a7685061094db0e84" + }, + { + "path": "skills/vastai-api/references/llms-txt.md", + "sha256": "e9bdd61ab334fbb786214a5534b961ef19dd60267111f42bab45f40784500907" + }, + { + "path": "skills/vastai-api/references/index.md", + "sha256": "2a3501150f9f5d4e9a302e0ac718083a2a6b8bf68687f33c29f05e3f4feaf01a" + }, + { + "path": "skills/vastai-api/references/llms-full.md", + "sha256": "b40c65e15f4b399ca540b9f0bf6d3ffcc562153357a8d9cc65db310ce9e87eb2" + } + ], + "dirSha256": "309e5e05329b54b9d1b6bca48f1e3fd63817c981a0559524e4adecb19a26d7fc" + }, + "security": { + "scannedAt": null, + "scannerVersion": null, + "flags": [] + } +} \ No newline at end of file diff --git a/skills/vastai-api/SKILL.md b/skills/vastai-api/SKILL.md new file mode 100644 index 0000000..ab24cd8 --- /dev/null +++ b/skills/vastai-api/SKILL.md @@ -0,0 +1,393 @@ +--- +name: vastai-api +description: Vast.ai API Documentation - Affordable GPU Cloud Marketplace +--- + +# 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 \ + --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 +``` + +#### Manage Instance State +```bash +# Stop an instance (pause GPU billing, storage still charged) +vastai stop instance + +# Start a stopped instance +vastai start instance + +# Reboot instance without losing GPU priority +vastai reboot instance + +# Destroy instance permanently (irreversible) +vastai destroy instance +``` + +### 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 +``` + +### 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 + +# Transfer credits to another user +vastai transfer credit recipient@email.com 25.00 +``` + +### Instance Logs + +#### Retrieve Container Logs +```bash +# Get last 100 lines of logs +vastai show logs --tail 100 + +# Filter logs with grep pattern +vastai show logs --filter "error" + +# Get daemon system logs +vastai show logs --daemon-logs +``` + +### Data Transfer Operations + +#### Copy Between Instances +```bash +# Copy from one instance to another +vastai copy /source/path /destination/path + +# Cloud copy using rclone +vastai cloud copy remote:bucket/path /local/path +``` + +### Machine Management (for Hosts) + +#### List Your Machine for Rent +```bash +# List machine with pricing +vastai list machine \ + --price_gpu 0.50 \ + --price_disk 0.10 + +# Unlist machine (stop renting) +vastai unlist machine + +# Schedule maintenance window +vastai schedule maint \ + --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 Advanced Users + +**Advanced topics:** +- Serverless endpoint and workergroup configuration +- Machine hosting and marketplace optimization +- Network volume architecture for shared datasets +- Team and subaccount management +- API integration in custom applications +- Automated scaling strategies + +**Power user tips:** +- Use filter operators in search (eq, neq, gt, lt, gte, lte, in, nin) +- Leverage launch_args for advanced instance customization +- Implement monitoring and alerting via logs API +- Optimize costs with bid price adjustments +- Build workflows with cloud copy for data pipelines + +### Navigation Tips + +**Finding API endpoints:** +- All endpoints documented in `llms-full.md` with full details +- Organized by category (accounts, billing, instances, machines, etc.) +- Each includes CLI usage examples + +**Quick lookups:** +- `llms.md` provides condensed list of all operations +- Use browser search (Ctrl+F) to find specific commands +- Look for "CLI Usage:" sections for command syntax + +**Understanding concepts:** +- Key Concepts section above for terminology +- QuickStart in `llms-txt.md` for getting started +- Workergroup Parameters section for serverless configuration + +## Common Workflows + +### Setting Up a New Development Environment +1. Create API key with appropriate permissions +2. Add SSH key to account for access +3. Create environment variables for secrets +4. Search for GPU offers matching requirements +5. Create instance from template +6. Connect via SSH and verify setup + +### Managing Long-Running Training Jobs +1. Create instance with sufficient disk space +2. Set up auto-billing to prevent interruptions +3. Use reserved instance with prepayment for discounts +4. Monitor with logs endpoint +5. Copy model checkpoints to cloud storage +6. Stop (not destroy) when paused to save costs + +### Hosting Machines for Profit +1. Set machine pricing with list command +2. Define minimum bid thresholds +3. Configure default jobs for background work +4. Schedule maintenance windows when needed +5. Monitor earnings and clean up expired contracts +6. Adjust pricing based on market conditions + +## Best Practices + +### Cost Management +- **Destroy vs Stop**: Use stop for short pauses, destroy for long breaks +- **Disk Space**: Choose carefully - cannot be changed later +- **Reserved Instances**: Prepay for 40% discount on long-running work +- **Auto-billing**: Set threshold above daily spend to prevent interruptions +- **Low Balance Alerts**: Enable email notifications as backup + +### Security +- **API Keys**: Use permission scoping, rotate regularly +- **SSH Keys**: Use different keys for different purposes +- **Environment Variables**: Store secrets as encrypted env vars +- **Subaccounts**: Use for team members with restricted access + +### Performance +- **Template Caching**: Pre-pulled images start much faster (seconds vs minutes) +- **Network Volumes**: Use for large datasets shared across instances +- **Bid Pricing**: Higher bids get better hardware availability +- **Test Workers**: Let serverless explore before scaling + +### Reliability +- **Logs**: Monitor regularly for errors +- **Health Checks**: Implement in your applications +- **Data Backup**: Copy critical data off instances regularly +- **Redundancy**: For critical work, run on multiple instances + +## Resources + +### Official Links +- **Console**: https://cloud.vast.ai/ +- **API Docs**: https://docs.vast.ai/ +- **Postman Collection**: https://www.postman.com/vast33/vast-ai-public-api-docs +- **Templates**: https://cloud.vast.ai/templates/ +- **Search**: https://cloud.vast.ai/create/ + +### Support +- Minimum deposit: $5 +- Balance shown at top right of dashboard +- Email verification required to rent or create teams +- Auto-billing prevents interruptions when configured + +## Notes + +- This skill was automatically generated from official Vast.ai documentation +- Reference files preserve structure and examples from source docs +- CLI examples use the `vastai` command-line tool +- API endpoints support both REST API and CLI access +- All prices in USD, billed per hour for compute and storage + +## Updating + +To refresh this skill with updated documentation: +1. Re-run the scraper with the same configuration +2. The skill will be rebuilt with the latest API information +3. Check for API version changes or deprecated endpoints diff --git a/skills/vastai-api/plugin.json b/skills/vastai-api/plugin.json new file mode 100644 index 0000000..acae84d --- /dev/null +++ b/skills/vastai-api/plugin.json @@ -0,0 +1,15 @@ +{ + "name": "vastai-api", + "description": "Interacts with the VastAI API.", + "version": "1.0.0", + "author": { + "name": "Tim Green", + "email": "rawveg@gmail.com" + }, + "homepage": "https://github.com/rawveg/claude-skills-marketplace", + "repository": "https://github.com/rawveg/claude-skills-marketplace", + "license": "MIT", + "keywords": ["vastai-api", "vastai", "api","Claude Code"], + "category": "productivity", + "strict": false +} diff --git a/skills/vastai-api/references/index.md b/skills/vastai-api/references/index.md new file mode 100644 index 0000000..92e762e --- /dev/null +++ b/skills/vastai-api/references/index.md @@ -0,0 +1,7 @@ +# Vastai-Api Documentation Index + +## Categories + +### Llms-Txt +**File:** `llms-txt.md` +**Pages:** 283 diff --git a/skills/vastai-api/references/llms-full.md b/skills/vastai-api/references/llms-full.md new file mode 100644 index 0000000..2149511 --- /dev/null +++ b/skills/vastai-api/references/llms-full.md @@ -0,0 +1,16620 @@ +# create api-key +Source: https://docs.vast.ai/api-reference/accounts/create-api-key + +api-reference/openapi.json post /api/v0/auth/apikeys/ +Creates a new API key with specified permissions for the authenticated user. + +CLI Usage: `vastai create api-key --name --permission_file [--key_params ]` + + + +# create env-var +Source: https://docs.vast.ai/api-reference/accounts/create-env-var + +api-reference/openapi.json post /api/v0/secrets/ +Creates a new encrypted environment variable for the authenticated user. +Keys are automatically converted to uppercase. Values are encrypted before storage. +There is a limit on the total number of environment variables per user. + +CLI Usage: `vastai create env-var ` + + + +# create ssh-key +Source: https://docs.vast.ai/api-reference/accounts/create-ssh-key + +api-reference/openapi.json post /api/v0/ssh/ +Creates a new SSH key and associates it with your account. +The key will be automatically added to all your current instances. + +CLI Usage: `vastai create ssh-key ` + + + +# create subaccount +Source: https://docs.vast.ai/api-reference/accounts/create-subaccount + +api-reference/openapi.json post /api/v0/users/ +Creates either a standalone user account or a subaccount under a parent account. Subaccounts can be restricted to host-only functionality. + +CLI Usage: `vastai create subaccount --email --username --password [--type host]` + + + +# delete api key +Source: https://docs.vast.ai/api-reference/accounts/delete-api-key + +api-reference/openapi.json delete /api/v0/auth/apikeys/{id}/ +Deletes an existing API key belonging to the authenticated user. +The API key is soft-deleted by setting a deleted_at timestamp. + +CLI Usage: `vastai delete api-key ` + + + +# delete env var +Source: https://docs.vast.ai/api-reference/accounts/delete-env-var + +api-reference/openapi.json delete /api/v0/secrets/ +Deletes an environment variable associated with the authenticated user. +The variable must exist and belong to the requesting user. + +CLI Usage: `vastai delete env-var ` + + + +# delete ssh key +Source: https://docs.vast.ai/api-reference/accounts/delete-ssh-key + +api-reference/openapi.json delete /api/v0/ssh/{id}/ +Removes an SSH key from the authenticated user's account + +CLI Usage: `vastai delete ssh-key ` + + + +# set user +Source: https://docs.vast.ai/api-reference/accounts/set-user + +api-reference/openapi.json put /api/v0/users/ +Updates the user data for the authenticated user. + +CLI Usage: `vastai set user --file ` + + + +# show api keys +Source: https://docs.vast.ai/api-reference/accounts/show-api-keys + +api-reference/openapi.json get /api/v0/auth/apikeys/ +Retrieves all API keys associated with the authenticated user. + +CLI Usage: `vastai show api-keys` + + + +# show connections +Source: https://docs.vast.ai/api-reference/accounts/show-connections + +api-reference/openapi.json get /api/v0/users/cloud_integrations/ +Retrieves the list of cloud connections associated with the authenticated user. + +CLI Usage: `vastai show connections` + + + +# show env vars +Source: https://docs.vast.ai/api-reference/accounts/show-env-vars + +api-reference/openapi.json get /api/v0/secrets/ +Retrieve a list of environment variables (secrets) for the authenticated user. + +CLI Usage: `vastai show env-vars [-s]` + + + +# show ipaddrs +Source: https://docs.vast.ai/api-reference/accounts/show-ipaddrs + +api-reference/openapi.json get /api/v0/users/{user_id}/ipaddrs/ +This endpoint retrieves the history of IP address accesses for the authenticated user. + +CLI Usage: `vastai show ipaddrs` + + + +# show ssh keys +Source: https://docs.vast.ai/api-reference/accounts/show-ssh-keys + +api-reference/openapi.json get /api/v0/ssh/ +Retrieve a list of SSH keys associated with the authenticated user's account. + +CLI Usage: `vastai show ssh-keys` + + + +# show subaccounts +Source: https://docs.vast.ai/api-reference/accounts/show-subaccounts + +api-reference/openapi.json get /api/v0/subaccounts/ +Retrieve a list of subaccounts associated with the authenticated user's account. + +CLI Usage: `vastai show subaccounts` + + + +# show team role +Source: https://docs.vast.ai/api-reference/accounts/show-team-role + +api-reference/openapi.json get /api/v0/team/roles/{id}/ +Retrieve details of a specific team role by its name. + +CLI Usage: `vastai show team-role ` + + + +# show user +Source: https://docs.vast.ai/api-reference/accounts/show-user + +api-reference/openapi.json get /api/v0/users/current/ +Retrieve information about the current authenticated user, excluding the API key. + +CLI Usage: `vastai show user` + + + +# transfer credit +Source: https://docs.vast.ai/api-reference/accounts/transfer-credit + +api-reference/openapi.json put /api/v0/commands/transfer_credit/ +Transfers specified amount of credits from the authenticated user's account to another user's account. + +The recipient can be specified by either email address or user ID. + +CLI Usage: `vastai transfer credit ` + + + +# update env var +Source: https://docs.vast.ai/api-reference/accounts/update-env-var + +api-reference/openapi.json put /api/v0/secrets/ +Updates the value of an existing environment variable for the authenticated user. + +CLI Usage: `vastai update env-var ` + + + +# update ssh key +Source: https://docs.vast.ai/api-reference/accounts/update-ssh-key + +api-reference/openapi.json put /api/v0/ssh/{id}/ +Updates the specified SSH key with the provided value. + +CLI Usage: `vastai update ssh-key ` + + + +# search invoices +Source: https://docs.vast.ai/api-reference/billing/search-invoices + +api-reference/openapi.json get /api/v0/invoices +This endpoint allows users to search and retrieve invoices based on specified filters. + +CLI Usage: `vastai search invoices` + + + +# show deposit +Source: https://docs.vast.ai/api-reference/billing/show-deposit + +api-reference/openapi.json get /api/v0/instances/balance/{id}/ +Retrieves the deposit details for a specified instance. + +CLI Usage: `vastai show deposit ` + + + +# show earnings +Source: https://docs.vast.ai/api-reference/billing/show-earnings + +api-reference/openapi.json get /api/v0/users/{user_id}/machine-earnings/ +Retrieves the earnings history for a specified time range and optionally per machine. + +CLI Usage: `vastai show earnings [options]` + + + +# show invoices +Source: https://docs.vast.ai/api-reference/billing/show-invoices + +api-reference/openapi.json get /api/v0/users/{user_id}/invoices/ +This endpoint retrieves billing history reports for the authenticated user, including charges and credits. + +CLI Usage: `vastai show invoices` + + + +# attach ssh-key +Source: https://docs.vast.ai/api-reference/instances/attach-ssh-key + +api-reference/openapi.json post /api/v0/instances/{id}/ssh/ +Attaches an SSH key to the specified instance, allowing SSH access using the provided key. + +CLI Usage: `vastai attach ssh ` + + + +# cancel copy +Source: https://docs.vast.ai/api-reference/instances/cancel-copy + +api-reference/openapi.json delete /api/v0/commands/copy_direct/ +Cancel a remote copy operation specified by the destination ID (dst_id). + +CLI Usage: `vastai cancel copy --dst_id ` + + + +# cancel sync +Source: https://docs.vast.ai/api-reference/instances/cancel-sync + +api-reference/openapi.json delete /api/v0/commands/rclone/ +Cancels an in-progress remote sync operation identified by the destination instance ID. +This operation cannot be resumed once canceled and must be restarted if needed. + +CLI Usage: `vastai cancel sync --dst_id ` + + + +# change bid +Source: https://docs.vast.ai/api-reference/instances/change-bid + +api-reference/openapi.json put /api/v0/instances/bid_price/{id}/ +Change the current bid price of an instance to a specified price. + +CLI Usage: `vastai change bid --price ` + + + +# cloud copy +Source: https://docs.vast.ai/api-reference/instances/cloud-copy + +api-reference/openapi.json post /api/v0/commands/rclone/ +Starts a cloud copy operation by sending a command to the remote server. The operation can transfer data between an instance and a cloud service. + +CLI Usage: `vastai cloud copy [options]` + + + +# copy +Source: https://docs.vast.ai/api-reference/instances/copy + +api-reference/openapi.json put /api/v0/commands/copy_direct/ +Initiate a remote copy operation to transfer data from one instance to another or between an instance and the local machine. + +CLI Usage: `vastai copy ` + + + +# create instance +Source: https://docs.vast.ai/api-reference/instances/create-instance + +api-reference/openapi.json put /api/v0/asks/{id}/ +Creates a new instance by accepting an "ask" contract from a provider. +This is the main endpoint for launching new instances on Vast.ai. + +CLI Usage: `vastai create instance [options]` + + + +# destroy instance +Source: https://docs.vast.ai/api-reference/instances/destroy-instance + +api-reference/openapi.json delete /api/v0/instances/{id}/ +Destroys/deletes an instance permanently. This is irreversible and will delete all data. + +CLI Usage: `vastai destroy instance ` + + + +# detach ssh-key +Source: https://docs.vast.ai/api-reference/instances/detach-ssh-key + +api-reference/openapi.json delete /api/v0/instances/{id}/ssh/{key}/ +Detaches an SSH key from a specified instance, removing SSH access for that key. + +CLI Usage: `vastai detach ` + + + +# execute +Source: https://docs.vast.ai/api-reference/instances/execute + +api-reference/openapi.json put /api/v0/instances/command/{id}/ +Executes a constrained remote command on a specified instance. +The command output can be retrieved from the returned result URL. + +CLI Usage: `vastai execute ` + + + +# manage instance +Source: https://docs.vast.ai/api-reference/instances/manage-instance + +api-reference/openapi.json put /api/v0/instances/{id}/ +Manage instance state and labels. The operation is determined by the request body parameters. + +CLI Usage: +- To stop: `vastai stop instance ` +- To start: `vastai start instance ` +- To label: `vastai label instance