Pick a plan
A multi-tenant platform runs on the same plans as any other workspace. Start on a standard plan, and move to Enterprise when you need billing terms of your own.
Pricing has each plan’s fee and unit prices, and Limits has how
many machines each plan can hold and run at once. For Enterprise, contact us at
https://instabox.sh/contact.
The plan changes only what your workspace pays. The steps below, and the prices you read for each
customer, are the same on every plan.
Set up and run machines
1
Make a key for your workspace
Make one key that belongs to your workspace, because a key reaches only the workspace it belongs
to. Give it the scopes your server needs and nothing else, so that it cannot change members or
Secrets.The command prints the key once. Store it on your server and set it for the calls below. The SDKs
read it from the same variable.Your customers never see this key. They sign in to your product, and your server calls InstaBox
for them.
2
Create a machine for a customer
Create the machine with your customer’s ID in The SDK calls wait until the machine runs and give you its ID, A machine can carry up to 32 labels. You can add a second label, such as
metadata. The label is how you find the
customer’s machines and add up their usage later.m_.... Store that ID with your
customer. The API call returns an operation with the ID in machineId, and you follow the
operation until its state is succeeded.plan or project, when
you need to split one customer’s usage further.3
Find a customer's machines
List the machines that carry the customer’s label. The list has only the machines whose
To match on two labels, give both. Over the API, repeat the
customer label is exactly acme.metadata parameter.4
Pause and resume it
Pause a machine when your customer is not using it, because a paused machine keeps its memory and
files and is not billed for runtime.Resume it when the customer comes back.Lifecycle has every state and what each one bills.
5
Delete it
Delete the machine when the customer is done. Over the API and in Python, you repeat the machine’s
ID to confirm, so that a mistyped ID cannot delete another customer’s machine.A deleted machine’s usage is kept, so you can still bill the customer for it.
Read what a customer used
Ask for the usage of the customer’s machines over the period you bill, with the same label filter. The SDKs do not wrap this endpoint yet, so the TypeScript and Python examples call it over HTTP.computeUSD, diskUSD, and egressUSD over the rows is the customer’s total. A machine
that the customer deleted during the period is still in the list, with deletedAt set. When total
is larger than the rows you got, read the next page with offset.
What the prices mean
The three prices on a row are list prices: the machine’s use times the unit prices on Pricing. The unit prices are the same on every paid plan, so a paid machine’s price does not depend on your plan or on what the plan includes. A free machine’s three prices are 0, and disk is not priced while the workspace is on the free plan. Your own bill can be lower than the sum of the rows. A plan’s monthly allowance, its included disk, and its included egress belong to the whole workspace and not to one machine, so they come off the workspace’s total. To see what your workspace owes after those, read Billing and usage.React to changes without polling
You can register a webhook for your workspace, so that your server learns when a customer’s machine is ready, pauses, fails, or is deleted. See Webhooks.Limits
- A key cannot make another key. You make and revoke keys while signed in.
- The window of a usage request can be at most 366 days.
- Egress is counted by whole hour, so a window that starts inside an hour includes that whole hour.
API keys
Scopes, and which workspace a key reaches.
SDK quick start
Install the SDK, run commands, and move files.
Billing and usage
Your workspace’s cost and credits this month.
API overview
Authentication, operations, idempotency, and errors.