---
title: Vast.ai API Integration on Truto
slug: vastai
category: Cloud Storage
canonical: "https://truto.one/integrations/detail/vastai/"
---

# Vast.ai API Integration on Truto



**Category:** Cloud Storage  
**Status:** Beta

## MCP-ready AI tools

Truto exposes 89 tools for Vast.ai that AI agents can call directly.

- **create_a_vast_ai_network_disk** — Add a network disk in vast to be used for creating network volume offers, or add machines to an existing network disk. Returns: success, disk_id. Required: mount_point.
- **create_a_vast_ai_instance_ssh** — Attach an SSH key to a vast instance, granting SSH access using the provided key. Returns: success, msg. Required: id, ssh_key.
- **delete_a_vast_ai_instance_ssh_by_id** — Detach an SSH key from a vast instance, removing SSH access for that key. Returns: success, msg. Required: id, ssh_key_id.
- **list_all_vast_ai_instance_sshes** — List SSH keys associated with a vast instance. Returns: success, ssh_keys. Required: instance_id.
- **update_a_vast_ai_commands_copy_direct_by_id** — Initiate a remote copy operation in vast to transfer data from one instance to another or between an instance and the local machine. Returns: success, msg. Required: src_path, dst_path.
- **delete_a_vast_ai_commands_copy_direct_by_id** — Cancel a remote copy operation in vast for the specified destination instance. Returns: success. Required: dst_id.
- **update_a_vast_ai_machine_cancel_maint_by_id** — Cancel a scheduled maintenance window for a specified machine in vast. Returns: success, ctime, machine_id, msg. Required: machine_id.
- **create_a_vast_ai_commands_rclone** — Start a cloud copy operation in vast, transferring data between a vast instance and a cloud service. Returns: success, msg, result_url.
- **delete_a_vast_ai_commands_rclone_by_id** — Cancel an in-progress rclone sync operation in vast identified by the destination instance ID. The operation cannot be resumed once canceled and must be restarted if needed. Returns: success, msg. Required: dst_id.
- **update_a_vast_ai_instances_bid_price_by_id** — Update the bid price of a vast instance to a specified value. Returns: success. Required: id, client_id, price. Price must be between $0.001 and $32 per hour.
- **update_a_vast_ai_machine_cleanup_by_id** — Clean up a vast machine by removing expired contracts, freeing up space. Returns: success, ctime, machine_id, user_id, num_deleted, msg. Required: machine_id.
- **list_all_vast_ai_auth_apikeys** — List all API keys in vast associated with the authenticated user. Returns: apikeys, id, user_id, rights, team_id, team_name.
- **create_a_vast_ai_auth_apikey** — Create a new API key in vast with specified permissions for the authenticated user. Returns: id, key, permissions. Required: name.
- **delete_a_vast_ai_auth_apikey_by_id** — Delete an existing API key in vast by id. Returns a plain-string success confirmation on deletion. Required: id.
- **list_all_vast_ai_workergroups** — List all workergroups in vast associated with the authenticated user. Returns: success, results, id, min_load, target_util, cold_mult, test_workers, template_hash, template_id, search_query, launch_args, gpu_ram, endpoint_name, endpoint_id, api_key, created_at, user_id.
- **create_a_vast_ai_workergroup** — Create a new workergroup in vast to manage worker instances for a serverless endpoint. Returns: success, id.
- **update_a_vast_ai_workergroup_by_id** — Update an existing workergroup in vast by id. Returns: success. Required: id.
- **delete_a_vast_ai_workergroup_by_id** — Delete an existing workergroup in vast by id. Returns: success, deleted_workers, failed_workers, msg. Required: id.
- **list_all_vast_ai_endptjobs** — List endpoint jobs for the authenticated vast user. Returns: success, results, id, min_load, target_util, cold_mult, cold_workers, max_workers, endpoint_name, api_key, user_id, created_at, endpoint_state.
- **create_a_vast_ai_endptjob** — Create a new job processing endpoint in vast with configurable load and worker settings. Returns: success, result.
- **update_a_vast_ai_endptjob_by_id** — Update a vast endpoint group's configuration by id. Returns: success. Required: id.
- **delete_a_vast_ai_endptjob_by_id** — Delete a vast endpoint group by id; associated worker groups are also deleted. Returns: success, deleted_workers, failed_workers, msg. Required: id.
- **list_all_vast_ai_secrets** — List all environment variables (secrets) for the authenticated user in vast. Returns: success, secrets.g. *****).
- **create_a_vast_ai_secret** — Create a new encrypted environment variable (secret) for the authenticated user in vast. Keys are automatically converted to uppercase before storage. Returns: success, msg. Required: key, value.
- **update_a_vast_ai_secret_by_id** — Update the value of an existing environment variable (secret) for the authenticated user in vast. Keys are automatically converted to uppercase. Returns: success, msg. Required: key, value.
- **delete_a_vast_ai_secret_by_id** — Delete an environment variable (secret) for the authenticated user in vast. The variable must exist and belong to the requesting user. Returns: success, msg. Required: key.
- **update_a_vast_ai_ask_by_id** — Create a new vast instance by accepting an available offer (ask contract) identified by id. If a template_hash_id is supplied, its defaults are merged with request body parameters per documented precedence rules. Returns: success, new_contract. Required: id, image.
- **create_a_vast_ai_network_volume** — List a network disk as a network volume offer in vast, or update an existing listing with a new price, size, end date, or discount. Returns: success, msg, disk_id. Required: disk_id.
- **update_a_vast_ai_network_volume_by_id** — Create a network volume in vast by accepting an existing network volume offer. Returns: success, volume_name, volume_size, id, msg. Required: id, size.
- **vast_ai_network_volumes_search** — Search for available network volume offers in vast with advanced filtering and sorting. Returns: success, offers, template_hash_id.
- **list_all_vast_ai_sshes** — List SSH keys associated with the authenticated user's vast account. Returns: id, user_id, key, created_at, deleted_at.
- **create_a_vast_ai_ssh** — Create a new SSH key in vast and associate it with your account; the key is automatically added to all current instances. Returns: success, key. Required: ssh_key.
- **update_a_vast_ai_ssh_by_id** — Update an SSH key in vast with a new public key value. Returns: success, key. Required: id, ssh_key.
- **delete_a_vast_ai_ssh_by_id** — Delete an SSH key from the authenticated user's vast account by id. Returns: success. Required: id.
- **create_a_vast_ai_user** — Create a standalone or subaccount user in vast. Returns: id, username, email, key_id. Required: email, username, password.
- **update_a_vast_ai_user_by_id** — Update the authenticated user's data in vast. Returns: success, msg.
- **get_single_vast_ai_user_by_id** — Get information about the current authenticated user in vast. Returns: id, key_id, email, balance, ssh_key, sid, credit.
- **create_a_vast_ai_team** — Create a new team in vast with default roles (Owner, Manager, Member) assigned automatically. Returns: success, msg. Required: team_name. Optionally transfer credits from your personal account to the new team using transfer_credit.
- **delete_a_vast_ai_team_by_id** — Delete the authenticated user's team in vast along with all associated API keys, roles, invitations, and memberships. The team owner's master API key is converted back to a normal client key. Returns: success, msg, pkey_id.
- **create_a_vast_ai_team_role** — Create a new team role in vast. Returns: msg. Required: name, permissions.
- **delete_a_vast_ai_team_role_by_id** — Remove a team role from vast by id. Returns: status, message. Required: id. The team owner role cannot be removed.
- **update_a_vast_ai_team_role_by_id** — Update an existing team role's name and permissions in vast. Returns a success confirmation string message on update. Required: id, name, permissions.
- **get_single_vast_ai_team_role_by_id** — Get a specific team role by id in vast. Returns: id, name, permissions, template_hash_id. Required: id.
- **list_all_vast_ai_templates** — Search vast templates using filter-based queries. Returns: success, templates_found, templates. Results include your own and publicly shared templates.
- **create_a_vast_ai_template** — Create a new vast template for launching instances. Returns: success, msg, template. Required: name, image.
- **update_a_vast_ai_template_by_id** — Edit an existing vast template in place. Returns: success, template. Required: hash_id. Only fields you supply are modified.
- **delete_a_vast_ai_template_by_id** — Delete an existing vast template by its numeric template_id. Returns: success. Required: template_id (numeric id, not hash_id).
- **list_all_vast_ai_volumes** — List all volumes rented by the authenticated user in vast. Returns a volumes array where each item includes id, status, storage_total_cost, disk_space, machine_id, host_id, inet_up, inet_down, reliability2, and start_date.
- **update_a_vast_ai_volume_by_id** — Rent or create a new volume in vast with a specified size. Returns: success, volume_name. Required: id.
- **delete_a_vast_ai_volume_by_id** — Delete a vast volume by its ID. Returns: success. Required: id.
- **vast_ai_volumes_search** — Search for available volume offerings in vast based on specified criteria. Returns an offers array where each item includes id, storage_cost, storage_total_cost, disk_space, machine_id, host_id, geolocation, reliability2, and verification. Optional: limit (max results, defaults to 64).
- **list_all_vast_ai_instances** — List vast instances for the authenticated user. Returns instance records including id, actual_status, label, image_uuid, ssh_host, ssh_port, gpu_name, dph_total, machine_id, and many more hardware, cost, and connectivity fields. Supports filtering via select_filters, column selection via select_cols, and sorting via order_by.
- **update_a_vast_ai_instance_by_id** — Manage a vast instance's state or label by id. Returns: success. Required: id. At least one of state (stopped or running) or label must be provided in the request body.
- **delete_a_vast_ai_instance_by_id** — Permanently destroy a vast instance by id. This action is irreversible and deletes all data. Returns: success, msg. Required: id.
- **get_single_vast_ai_instance_by_id** — Get details of a specific vast instance by id. Returns instances_found and instances — the full Instance record containing hardware details (id, gpu_name, num_gpus, cpu_name, cpu_cores), networking info (ssh_host, ssh_port, public_ipaddr), status fields (actual_status, intended_status, cur_state), and pricing fields (dph_base, dph_total, disk_space). Required: id.
- **update_a_vast_ai_instances_command_by_id** — Execute a constrained remote command on a specific vast instance. Returns: success, writeable_path, result_url, msg. Required: id, command. Command is limited to 512 characters; output is retrieved asynchronously from the returned result_url.
- **create_a_vast_ai_team_invite** — Invite a team member in vast by sending an invitation email to the specified user with an assigned role. Returns: success, msg. Required: email, role.
- **update_a_vast_ai_machines_create_ask_by_id** — Create or update ask contracts for a machine in vast.ai to list it for rent, allowing you to set pricing, minimum GPU requirements, expiry date, and discount rates. Returns: success, extended, msg. Required: machine.
- **update_a_vast_ai_instances_request_log_by_id** — Request logs from a specific vast instance by id. The logs are uploaded to S3 and made available at a generated download URL. Returns: success, result_url, msg. Required: id.
- **update_a_vast_ai_instances_prepay_by_id** — Deposit credits into a reserved vast instance to receive usage discounts. Returns: success, timescale, discount_rate.0–0.4). Required: id, amount.
- **update_a_vast_ai_instances_reboot_by_id** — Reboot a vast instance by id, stopping and restarting its container without losing GPU priority. Updates the container status to 'rebooting' and executes docker stop/start commands on the host machine. Returns: success. Required: id.
- **update_a_vast_ai_instances_recycle_by_id** — Recycle a vast instance by id, destroying and recreating its container in place from a newly pulled image without losing GPU priority. Sets the container status to 'recycling' and executes docker stop/remove commands on the host. Returns: success. Required: id.
- **delete_a_vast_ai_machine_defjob_by_id** — Delete the default job (background instances) for a specified machine in vast. Returns: success, machine_id, user_id. Required: machine_id.
- **delete_a_vast_ai_team_member_by_id** — Remove a vast team member by id, revoking their team-related API keys and updating membership status. Returns: status, message. Required: id. Cannot remove the team owner.
- **list_all_vast_ai_team_members** — List all vast team members associated with the authenticated user's team. Returns: id, username, email, fullname, roles.
- **list_all_vast_ai_machine_reports** — List the most recent reports for a given machine in vast. Returns: problem, message, created_at. Required: machine_id.
- **create_a_vast_ai_route** — Route a request to a vast serverless GPU endpoint to obtain a worker instance address. Returns endpoint, __request_id, and either url, cost, reqnum, and signature when a worker is ready, or status describing worker state when no worker is available. Required: endpoint, cost.
- **update_a_vast_ai_machine_dnotify_by_id** — Schedule a maintenance window for a vast machine and notify its clients. Returns: success, you_sent. Required: machine_id, sdate, duration.
- **list_all_vast_ai_benchmarks** — List benchmark results in vast, optionally filtered by a search query string. Returns: contract_id, id, image, last_update, machine_id, model, name, num_gpus, score. Example query filter: score>1000.
- **create_a_vast_ai_bundle** — Search for available GPU machine offers in vast with advanced filtering operators (eq, neq, gt, lt, gte, lte, in, notin). Returns an offers array where each item includes id, gpu_name, num_gpus, dph_total, reliability, geolocation, gpu_arch, verification, compute_cap, and many additional hardware and pricing fields. All body parameters are optional.
- **update_a_vast_ai_machines_create_bid_by_id** — Create default background jobs for a specified machine in vast with the given pricing and image parameters. Returns: success, machine_id, user_id, you_sent. Required: machine, price_gpu, price_inetu, price_inetd, image.
- **update_a_vast_ai_machine_minbid_by_id** — Set the minimum bid price for a specified machine in vast. Returns: success, you_sent. Required: machine_id, price.
- **list_all_vast_ai_charges** — List vast charges per contract, including GPU, storage, and bandwidth usage, filtered by a date range. Returns: success, count, total, next_token, results. Required: select_filters (a JSON string specifying at minimum day.gte and day.lte in unix seconds UTC).
- **list_all_vast_ai_users_cloud_integrations** — List all cloud connections associated with the authenticated user in vast. Returns: id, cloud_type, name.
- **get_single_vast_ai_instances_balance_by_id** — Get the deposit balance details for a vast instance by id. Returns: success, refundable_deposit, total_discount, discount_months, instances_found, instances. Required: id.
- **list_all_vast_ai_user_machine_earnings** — List machine earnings history for a vast user over a specified time range. Returns: summary, username, email, fullname, address1, address2, city, zip, country, taxinfo, current, per_machine, per_day. Required: user_id.
- **list_all_vast_ai_invoices** — List vast billing invoices including Stripe top-ups, transfers, payouts, coinbase payments, and other billing transactions. Returns: success, count, total, next_token, results, start, end, source, description, amount, metadata. Required: select_filters (a JSON-encoded object containing a `when` date range in unix seconds).
- **list_all_vast_ai_user_ipaddrs** — List the IP address access history for a vast user. Returns records containing id, user_id, ip_address, and timestamp for each access event. Required: user_id.
- **list_all_vast_ai_machines** — List machines in vast associated with the authenticated user. Returns: machines, id, name. Required: user_id.
- **list_all_vast_ai_subaccounts** — List subaccounts associated with the authenticated vast account. Returns: users, id, parent_id, key_id, created_at, deleted_at.
- **list_all_vast_ai_team_roles_fulls** — List all roles for a vast team, excluding the owner role. Returns: name, permissions, identifier, id.
- **update_a_vast_ai_commands_transfer_credit_by_id** — Transfer credits from the authenticated user's account to another user's account in vast. Returns: success. Required: recipient, amount. The recipient may be specified by email address or user ID; amount must be at least 0.01.
- **delete_a_vast_ai_machine_ask_by_id** — Unlist a machine in vast by removing all 'ask' type offer contracts for it, making it unavailable for rent. Returns: success, machine_id, user_id. Required: machine_id.
- **create_a_vast_ai_network_volumes_unlist** — Unlist a network volume from rent in vast. Returns: success, id, msg. Required: id.
- **create_a_vast_ai_volumes_unlist** — Remove a volume listing from the vast marketplace. Returns: success, msg. Required: id.
- **list_all_vast_ai_workergroup_logs** — Retrieve logs for a specific vast workergroup by ID. Returns: api. Required: id.
- **list_all_vast_ai_workergroup_workers** — List workers associated with a vast.ai workergroup. Returns worker records including id. No required parameters are documented for this endpoint.
- **list_all_vast_ai_endpoint_logs** — Retrieve logs for a vast.ai serverless endpoint by name. Returns: logs, success, error, msg. Required: endpoint.
- **list_all_vast_ai_endpoint_workers** — List endpoint workers for vast's serverless infrastructure. The specific response fields for this endpoint were not enumerated in the retrieved source documentation; consult the vast.ai API reference for the full worker object shape.

## How it works

1. **Link your customer's Vast.ai account.** Use Truto's frontend SDK; we handle every OAuth and API key flow so you don't need to create the OAuth app.
2. **Authentication is automatic.** Truto refreshes tokens, stores credentials securely, and injects them into every API request.
3. **Call Truto's API to reach Vast.ai.** The Proxy API is a 1-to-1 mapping of the Vast.ai API.
4. **Get a unified response format.** Every response uses a single shape, with cursor-based pagination and data in the `result` field.

## Use cases

- **Offer BYOC GPU compute inside an MLOps platform** — Let your users connect their Vast.ai accounts and run training or fine-tuning jobs on cheap decentralized GPUs without leaving your product. You orchestrate instance search, lifecycle, and storage while the user pays Vast directly.
- **Power serverless inference with elastic GPU workers** — Generative AI products with bursty traffic can use Vast.ai worker groups and endpoint jobs to auto-scale inference capacity. Your platform manages routing and scaling logic while costs stay 60–80% lower than hyperscalers.
- **Centralize decentralized GPU spend in a FinOps dashboard** — Cost management tools can pull Vast.ai charges, invoices, and instance-level usage to give finance teams visibility into 'Shadow AI' spend. Map costs back to teams, projects, or specific training runs.
- **Automate dataset and model weight movement** — Data and ML pipeline tools can trigger server-side rclone transfers between user S3/GCS buckets and Vast.ai instances. Users get fast, secure dataset staging and weight exfiltration without managing SSH or transfer scripts.
- **Embed compute arbitrage for batch AI workloads** — Batch processing platforms (video generation, rendering, embeddings) can programmatically search the Vast marketplace for the cheapest qualifying GPUs, bid, run the job, and tear down. Pass the savings to end users or capture margin.

## What you can build

- **GPU marketplace search and bidding flow** — Let users filter Vast offers by GPU type, VRAM, reliability, and price, then place bids and provision instances directly from your UI.
- **Instance lifecycle controls** — Ship start, stop, reboot, recycle, prepay, and destroy actions for Vast instances so users can manage running GPU rentals without touching the Vast console.
- **Network volume management for persistent datasets** — Create, search, attach, and update Vast network volumes so users can keep large datasets and model checkpoints decoupled from ephemeral compute.
- **Serverless worker groups and endpoint routing** — Provision worker groups, register endpoint jobs, and create routes so your product can auto-scale Vast workers based on inference demand.
- **Remote command execution and rclone transfers** — Trigger bash scripts, training loops, and server-side rclone copies to and from external object storage without requiring users to set up SSH access.
- **Billing and usage dashboards** — Pull charges, invoices, and per-instance balances to render cost breakdowns, budget alerts, and chargeback reports inside your product.

## FAQs

### How do end users authenticate their Vast.ai account?

End users connect by providing a Vast.ai API key, which Truto stores and injects into every request. You can also create and rotate API keys programmatically via the auth apikey endpoints.

### Which Vast.ai resources are available through Truto?

Truto exposes instances, templates, network volumes, volumes, SSH keys, worker groups, endpoint jobs, routes, secrets, teams, team roles, team members, users, machines, asks, bundles, charges, invoices, benchmarks, and remote command and rclone operations.

### Can we run inference auto-scaling on top of this integration?

Yes. The integration supports creating and updating worker groups, registering endpoint jobs, listing workergroup and endpoint workers, and pulling workergroup and endpoint logs to drive your own autoscaling logic.

### Does Truto support server-side data transfers between Vast and external clouds?

Yes. The rclone command endpoints let you initiate, update, and delete server-side copies between Vast instances and external object stores like S3 or GCS without proxying data through your backend.

### Can we retrieve granular billing data for FinOps use cases?

Yes. You can list charges, invoices, per-instance balances, and user machine earnings, which is enough to build cost attribution, budgets, and alerts at the team or project level.

### Are writes supported, or is this a read-only integration?

Writes are fully supported. You can create, update, and delete instances, templates, volumes, worker groups, endpoint jobs, routes, secrets, SSH keys, team roles, and more — covering the full provisioning and teardown lifecycle.
