API overview
The FluidStack API is a RESTful API you can use for command-line and programmatic management of your instances and SSH keys. You can also use it to retrieve information about available configurations and operating system templates.
Base URL
https://platform.fluidstack.io/
Authentication
An API key is required for authentication to use the FluidStack API. Your API key is unique to your FluidStack account. Conceptually, it is similar to a password that is sent with every API call.
View, add, and delete your API keys from the FluidStack Dashboard.
Warning
Keep your API keys secure! Treat them like you would any other password. Do not share them with others, or in public repositories such as in GitHub.
How to use your API key
Whenever you make a call to the FluidStack API, include your API key in the request headers with a header name of api-key
. Otherwise, your call will fail.
Example:
Requests and responses
All request and response bodies are sent in JSON format. When sending data in the body of a request, always include the header 'Content-Type: application/json'
.
Programmatic API use
Instance management
See our tutorial about how to use Python or TypeScript to manage instances.
SDKs
Use our Python SDK or TypeScript SDK to interface with our API in your applications.
Secure use of your API key
For security, avoid placing your API key in any file that could potentially be seen by others.
There are several ways to safeguard the privacy of your API key. One common approach is using an .env
file. Create a file named .env
or look for one that already exists in your project. Add your key to it, then use the dotenv
module to import it into your Python or TypeScript file.
Note
The dotenv
module is not available by default and must be installed before use. It is called dotenv
in both Python and Node.js/TypeScript.
Example:
Warning
If your .env
file is inside a git repository, make sure that it’s added to the .gitignore
file for that repository.