Overview
This node provides a flexible interface to interact with the Vast AI platform's API. It allows users to perform various operations grouped under different categories such as accounts, billing, instances, search, serverless, templates, and volumes. The node dynamically constructs API requests based on user-selected API endpoints and parameters, enabling automation of Vast AI account management, instance control, billing queries, template creation, and more.
Common scenarios where this node is beneficial include:
- Automating instance lifecycle management (create, reboot, destroy, etc.).
- Querying billing information or invoices.
- Searching for offers, benchmarks, or templates.
- Managing SSH keys attached to instances.
- Creating and managing templates programmatically.
For example, a user can automate creating a new instance by selecting the "Create Instance" API, providing necessary parameters like instance ID and configuration in the body, and executing the request to provision resources without manual intervention.
Properties
| Name | Meaning |
|---|---|
| API Group Name or ID | Select the specific Vast AI API endpoint to call. Options are dynamically loaded based on the chosen operation. |
| Body | Key-value pairs representing the request body parameters. Multiple parameters can be added. Blank if method is GET. |
The "API Group Name or ID" property lets users pick from a list of available API calls relevant to the selected operation. The "Body" property is a collection of parameters where each entry has:
- Parameter Name or ID: The name of the parameter to send in the request body, selectable from a dynamic list.
- Value: The value corresponding to the parameter.
Output
The node outputs an array of JSON objects, each containing the parsed JSON response from the Vast AI API for each input item processed. The structure of the output JSON depends on the specific API endpoint called and the data returned by Vast AI.
No binary data output is produced by this node.
Dependencies
- Requires an API key credential for Vast AI to authenticate requests.
- Uses HTTP requests to communicate with the Vast AI REST API at
https://console.vast.ai/api/v0. - No additional external dependencies beyond standard n8n HTTP request helpers.
Troubleshooting
- Missing required path parameter errors: Many API calls require certain path parameters (e.g.,
id,instance_id,key). If these are not provided in the input properties, the node will throw an error indicating which parameter is missing. Ensure all required parameters are set correctly. - Invalid API Group or Operation: Selecting an unsupported or incorrect API group or operation may result in empty options or failed requests. Verify that the correct operation and API group are selected.
- Authentication errors: If the API key credential is invalid or missing, requests will fail. Confirm that the Vast AI API key is configured properly in n8n credentials.
- HTTP request failures: Network issues or API downtime can cause request failures. Check network connectivity and Vast AI service status.
- Continue On Fail behavior: If enabled, the node will continue processing subsequent items even if some fail, returning error details alongside input data.
Links and References
- Vast AI API Documentation: https://vast.ai/docs/api
- n8n Expressions Documentation: https://docs.n8n.io/code/expressions/
- n8n Node Development Guide: https://docs.n8n.io/integrations/creating-nodes/