Overview
This node integrates with the Vast AI platform, allowing users to interact programmatically with various Vast AI API endpoints related to instances management. It supports multiple instance-related operations such as creating, destroying, managing, rebooting, and executing commands on instances, among others. This node is beneficial for automating cloud infrastructure tasks on Vast AI, enabling DevOps engineers or developers to manage compute resources efficiently without manual intervention.
Practical examples include:
- Automatically creating or destroying instances based on workload demands.
- Attaching or detaching SSH keys to instances for secure access.
- Executing remote commands on instances for maintenance or deployment.
- Rebooting or recycling instances to maintain uptime and performance.
- Fetching logs or instance details for monitoring and troubleshooting.
Properties
| Name | Meaning |
|---|---|
| API Group Name or ID | Select the specific API operation to perform on instances (e.g., "Create Instance", "Reboot Instance"). Options are dynamically loaded and correspond to Vast AI instance-related API endpoints. |
| Body | Key-value pairs representing the request body parameters. Used for POST, PUT, or DELETE requests where additional data must be sent. For GET requests, this can remain blank. The keys are parameter names or IDs relevant to the selected API operation, and values are their corresponding inputs. |
Output
The node outputs an array of JSON objects, each containing the response from the Vast AI API for the executed operation. The structure of the JSON depends on the specific API endpoint called but generally includes detailed information about instances or the result of the requested action.
If the operation involves fetching data (e.g., showing instances or logs), the JSON will contain the requested data structures. For actions like create, destroy, or reboot, the JSON typically contains confirmation or status messages.
The node does not output binary data.
Dependencies
- Requires an API key credential for authenticating with the Vast AI API.
- The node makes HTTP requests to the Vast AI API base URL:
https://console.vast.ai/api/v0. - Proper configuration of the API key credential in n8n is necessary for successful authentication.
Troubleshooting
- Missing required path parameter errors: Many operations require specific path parameters such as
id,key, orinstance_id. 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 or operation may cause the node to fail or return unexpected results. Use the dropdown options to avoid invalid selections.
- Authentication failures: If the API key is invalid or missing, the node will fail to authenticate. Verify that the API key credential is correctly set up and has appropriate permissions.
- Incorrect request body: For non-GET methods, the body must be properly structured with valid keys and values. Invalid or missing parameters can cause API errors.
- Network issues: Connectivity problems to the Vast AI API endpoint will cause request failures. Check network settings and API availability.