Vast AI icon

Vast AI

Get all informations of an account.

Overview

This node integrates with the Vast AI platform, allowing users to manage and interact with various Vast AI resources through its API. Specifically, for the "Instances" operation under the "Default" resource, it provides a wide range of instance-related actions such as creating, managing, rebooting, destroying instances, attaching/detaching SSH keys, executing commands on instances, and retrieving logs or SSH keys.

Common scenarios where this node is beneficial include:

  • Automating cloud instance lifecycle management on Vast AI.
  • Running remote commands or scripts on instances.
  • Managing SSH access keys for instances.
  • Monitoring instance logs and status.
  • Adjusting bidding prices or prepaying for instances.

Practical examples:

  • Automatically create and configure a new instance based on specific parameters.
  • Reboot an instance after deploying updates.
  • Attach an SSH key to an instance to enable secure access.
  • Retrieve logs from an instance for troubleshooting purposes.

Properties

Name Meaning
API Group Name or ID Select the specific API action related to Instances you want to perform. Options include: Attach SSH Key, Cancel Copy, Cancel Sync, Change Bid, Cloud Copy, Copy, Create Instance, Destroy Instance, Detach SSH Key, Execute, Manage Instance, Prepay Instance, Reboot Instance, Recycle Instance, Show Instance, Show Instances, Show Logs, Show SSH Keys. You can choose from the list or specify an ID using an expression.
Body The body of the request sent to the API. This is a collection of key-value pairs representing parameters required by the selected API action. It supports multiple entries. For GET methods, this is usually blank or used as query parameters.

Output

The node outputs JSON data corresponding to the response from the Vast AI API for the requested instance operation. The structure of the JSON depends on the specific API call made but generally includes details about instances, operation results, logs, SSH keys, or other relevant information returned by Vast AI.

If the operation involves binary data (not evident in the provided code), it would be handled accordingly, but this node primarily deals with JSON responses.

Dependencies

  • Requires an API key credential for Vast AI to authenticate requests.
  • Uses Vast AI's REST API endpoint at https://console.vast.ai/api/v0.
  • No additional external dependencies beyond standard HTTP requests.
  • The node expects proper configuration of the Vast AI API credentials within n8n.

Troubleshooting

  • Missing Required Path Parameters: Many API calls require specific path parameters like id, instance_id, or key. If these are missing or empty, the node throws an error indicating which parameter is missing. Ensure all required parameters are provided.
  • Invalid API Group or Operation: Selecting an unsupported or incorrect API group name or operation may result in no available parameters or failed requests.
  • Authentication Errors: If the API key credential is invalid or missing, requests will fail. Verify that the Vast AI API key is correctly configured.
  • HTTP Request Failures: Network issues or API downtime can cause errors. Check connectivity and Vast AI service status.
  • Incorrect Parameter Formatting: Parameters must be correctly named and formatted according to Vast AI API expectations; otherwise, the API may reject the request.

Links and References

Discussion