--- title: "Usage Billing" description: "Run an app, database, bucket, or stack without buying a resource, billed by the second for what it reserves while it runs." --- Every application, service, bucket, and stack is created one of two ways, and the choice cannot be changed afterwards: | Placement | What it means | |---|---| | **On a resource** | Capacity bought as a [plan](/pricing/plans), shared by everything placed on it for one flat monthly price. | | **Usage Billing** | No resource. You pick a size and a region, and pay for what it reserves while it runs. | A workspace is never "in" one mode or the other - it can hold workloads on resources and workloads on Usage Billing side by side, and pays flat for the former and by usage for the latter. The API and some older screens still call this **pay per use** (`billing: "pay_per_use"`). It is the same thing. ## Choosing a size Usage Billing has no sliders. You pick a size from a fixed list, the same list `GET /api/v1/workspace/pay_per_use/sizes` returns, split into two CPU classes: - **Hobby** - shared CPU, the same best-effort cores a Hobby plan uses. - **Pro** - dedicated CPU, cores reserved for you alone. A workload cannot move between classes, or between a size list and a resource, once created - [cloning](/deployments/how-it-works) is the way across. | Size | CPU | RAM | Running all month | |---|---|---|---| | `hobby-0.25c-512m` | 0.25 | 512 Mi | $4.50 | | `hobby-0.5c-512m` | 0.5 | 512 Mi | $6.50 | | `hobby-0.5c-1g` | 0.5 | 1 Gi | $9.00 | | `hobby-1c-512m` | 1 | 512 Mi | $10.50 | | `hobby-1c-1g` | 1 | 1 Gi | $13.00 | | `hobby-1c-2g` | 1 | 2 Gi | $18.00 | | `hobby-2c-2g` | 2 | 2 Gi | $26.00 | | `hobby-2c-4g` | 2 | 4 Gi | $36.00 | | `hobby-4c-8g` | 4 | 8 Gi | $72.00 | | `hobby-8c-16g` | 8 | 16 Gi | $144.00 | | `pro-1c-2g` | 1 | 2 Gi | $34.00 | | `pro-2c-4g` | 2 | 4 Gi | $68.00 | | `pro-4c-8g` | 4 | 8 Gi | $136.00 | | `pro-8c-16g` | 8 | 16 Gi | $272.00 | | `pro-16c-32g` | 16 | 32 Gi | $544.00 | | `pro-32c-64g` | 32 | 64 Gi | $1,088.00 | | `pro-48c-96g` | 48 | 96 Gi | $1,632.00 | Most of these codes are also the size of a standard resource plan at the same price tier - the API and panel name resource plans by the same codes (see [Plans](/pricing/plans)). Four sizes exist only for Usage Billing, with no matching plan: `hobby-0.25c-512m`, `hobby-0.5c-512m`, `hobby-0.5c-1g`, and `hobby-1c-512m`. A volume or a bucket on Usage Billing is capped at 1 TB. The largest single workload you can run is the largest size of its CPU class - `hobby-8c-16g` or `pro-48c-96g` - whichever you need more than that is what a resource is for. ## What is charged Per unit, for a full 720-hour month: | Resource | Rate | Charged for | |---|---|---| | RAM | $5.00 / GiB | the seconds the workload ran | | CPU, Hobby (shared) | $8.00 / core | the seconds the workload ran | | CPU, Pro (dedicated) | $24.00 / core | the seconds the workload ran | | Storage (a volume) | $0.15 / GiB | every second of the billing cycle | | Object storage (a bucket) | $0.02 / GiB | every second of the billing cycle, at what it holds | - **CPU and RAM are billed by the second, with no minimum per run.** A workload that ran for ten minutes is billed for ten minutes, however short, on every replica it runs. - **Storage is billed around the clock, whatever the workload's state.** A stopped application still has a volume sitting on disk, so its storage keeps costing - that is also why a workload that only ever runs for a few minutes a day is never free. - **A bucket is billed for what it holds, not for the size you gave it.** `disk_size` is only the most it may hold; the actual charge is measured every hour against what is in it, the same way S3 and other object stores bill. Buckets on a resource are not billed this way - a resource's price already covers them. - **A database cluster is billed per instance.** Each read replica and each instance of a replicated database is its own workload at its own size. ## Free compute A personal workspace that pays for nothing yet can run small workloads on Usage Billing at no charge, with no monthly minimum and no checkout. The allowance belongs to your account - the workspace's owner - not to one workspace: | Workload | Size | How many | Sleeps | |---|---|---|---| | Application | 0.1 CPU, 512 Mi RAM, 1 Gi disk | Any number, sharing **750 running hours a calendar month** | After 15 minutes without traffic | | PostgreSQL service | 0.1 CPU, 256 Mi RAM, 1 Gi disk, one instance | One | When idle; deleted after 44 days asleep | | Valkey service | 0.1 CPU, 32 Mi RAM, 0.1 Gi disk | One | Never | Create one with the `free` size - the panel shows it as a **Free** row above the paid sizes while your account may take it. - **The hours.** Only an application's running time counts, and an application asleep counts nothing. You are emailed at 50% and 75% of the month's hours; at 100% every free application is stopped until the 1st of the next month, when the ones Miget stopped start again. The free services do not count toward the hours. - **Its limits.** One replica, no public ports, no deploys from a container registry, and no [private network](/networking/private-networks/overview). A free service runs as a single instance and stays private. - **It needs a card on file,** and it excludes the [free resource](/pricing/free-tier): an account that holds a free resource is not offered free compute, and one that has claimed free compute cannot get a free resource. MySQL has no free size. Only the application's web process is free. A bucket, a stack or shared storage on Usage Billing starts the monthly minimum like any other workload, and so does an add-on on a free application - a database, a cache or a volume: asking for one sends the workspace to checkout first when its subscription pays for nothing (`422` with a `checkout_url`). Choosing a paid size for a free workload takes it out of the free tier. Free compute covers an application's web process only. If your app has other [worker processes](/deployments/workers), they are held at zero replicas with an open issue until the workspace starts paying for Usage Billing - see [Workers](/deployments/workers#free-compute-and-held-workers). ## The monthly minimum The first workload you place on Usage Billing starts a **$5 a month** minimum, charged once per workspace no matter how many workloads you run on Usage Billing or what size they are. Usage up to $5 a cycle is covered by it; only usage beyond it is billed on top. - **It is waived whenever the subscription already pays for something else** - a resource, a seat, an add-on. In that case every cent of Usage Billing usage is billed, with nothing covered by a minimum that is not being charged. - **It needs a card on file.** A workspace with no active subscription is sent to checkout the first time it places a workload on Usage Billing (the request answers `422` with a `checkout_url`); complete that checkout, then repeat the request. - **It is refused while a payment is overdue.** - **It is released** once nothing runs on Usage Billing any more and the next renewal has passed. ## The spend limit Set a ceiling in dollars on the Usage Billing bill from **Settings -> Usage**, or `PUT /api/v1/workspace/spend_limit`. Miget checks it every minute. - At **50%** and **75%** the workspace admins are warned by email. - At **100%**, every workload on Usage Billing is stopped, an application scaling beyond its resource's plan drops back to the one replica the resource holds, and every cron job billed by the run is paused. Workloads on a resource you have already paid for are not touched, and buckets are not stopped. - Raising the limit (or the next renewal) starts everything that was stopped back up. The limit cannot be set below a floor: the monthly minimum, or what storage alone costs for a cycle when that is more - storage keeps costing whatever the limit says, so a limit under that floor could never actually be honored. It is never zero, which would stop everything the moment it is set. ## Charged before the renewal Usage is normally billed with the renewal that closes the cycle. To keep a lost or stolen card from running up a whole month unnoticed, a workspace is also charged mid-cycle whenever its unbilled usage reaches a **threshold**: - It starts at **$25** for a new workspace. - During a [free trial](/pricing/free-trial), the first charge comes at **$5** - the trial covers the plan, not Usage Billing. Every charge after it follows the steps below. - Each paid renewal raises it a step: **$50, $250, $1,000, $4,000.** Past the last step there is no threshold at all, and usage is billed only with the renewal. - A value Miget sets for your workspace, for example after you [request a limit increase](/pricing/workspace-limits), replaces these steps - past the last one too. - There is none before your subscription's first payment - see [Before your first payment](#before-your-first-payment). What was already charged at the threshold is not billed again - the renewal bills only the usage beyond it. If the card is refused, every workload on Usage Billing is stopped exactly as at the spend limit, until the charge is paid; retry it from the Usage page once the card is fixed. ## Before your first payment When Miget moves a workspace in for you, it can run free during an onboarding until its billing starts. Its Usage Billing is not part of that: it runs up as usual and is charged once the workspace pays. - **Counted by calendar month.** Until the first payment there is no billing cycle yet, so the cycle is the calendar month: the spend limit, app budgets and included cron minutes count per month. - **No monthly minimum and no threshold.** Nothing is charged before the first payment, and the months before it carry no minimum - so the spend limit's floor is what storage alone costs. - **Charged right after the first payment**, as a charge of its own: everything owed from $5 up, with credits paying first. Less than $5 waits for the first renewal. - **Shown as it builds up.** The Billing page shows what is owed so far, the email a week before billing starts names the amount, and `GET /api/v1/workspace/usage` returns it as `due_after_first_payment_in_cents`. ## Credits pay first If the workspace holds [credits](/pricing/referral-program) - referral and post credits its members transferred to it, or credits the Miget team added - they pay for Usage Billing usage beyond the monthly minimum before your card does, whatever cycle, and whatever other discount your subscription carries. Only what the credits do not cover reaches the threshold charge or the renewal. See [What credits pay for](/pricing/referral-program#what-credits-pay-for). ## The Usage page **Usage** in the dashboard, or `GET /api/v1/workspace/usage`, shows what the current cycle has cost so far, the monthly minimum, a projection for the rest of the cycle at the current pace, the day that pace would reach the spend limit, and a breakdown by workload - the hour still in progress included. ## Scaling an app beyond its resource's plan An application on a resource normally runs every replica inside that resource's capacity. Turning on **Scale beyond your plan** in its scaling settings (`within_resources: false` on `PUT /api/v1/apps/{uuid}/scaling_profile`) changes that for one application: its first replica still runs on the resource, and every replica past it - up to the workspace's [replica limit](/pricing/workspace-limits) - is billed on Usage Billing instead of needing room on the resource. On a Hobby (shared-CPU) resource only the extra replicas' RAM is billed, since they share the resource's CPU; on a Pro resource their CPU is billed too. This needs Usage Billing to be on for the workspace, is not available on an enterprise contract or with single-writer storage attached, and - like any first Usage Billing workload - starts the $5 monthly minimum if nothing else is covering it yet. ## Capping one app's spend Separately from the workspace-wide spend limit, one application running on Usage Billing (or scaling beyond its plan) can carry its own **monthly budget**, set in whole dollars on its scaling settings. Past it, Miget can email the workspace admins, scale the application down to one replica until the next cycle or until the budget is raised, or both - your choice. ## Workspace pool (enterprise contracts) An enterprise contract buys a CPU, RAM, and storage capacity up front instead of a bill that grows with use. On such a workspace, Usage Billing is not offered; a workload is instead placed straight into the **workspace pool**. | Placement | What it means | |---|---| | On a resource | A resource inside the contract, counted against the pool at its full size. | | Workspace pool | No resource. Counted against the pool by what it reserves - CPU and RAM on every replica, storage once per volume or database instance - whether it is running or not. | Nothing in the pool is billed by the hour. A workload, or a resize, that the remaining capacity cannot cover is refused, naming what ran out; shrinking is always accepted. Only Miget can change the size of the pool itself - talk to your account manager. ## Turning Usage Billing off A workspace admin can turn Usage Billing off for the whole workspace from **Settings -> Usage**, or `PUT /api/v1/workspace/pay_per_use`. It is refused while anything is still running on Usage Billing, so nothing is stranded - move or delete those workloads first. ## Next steps How a Procfile's background processes are sized, scaled, and billed. Sizes, included cron minutes, and what happens past them. Every limit the workspace runs into, and how to ask for more. Buy a fixed plan instead, for a predictable flat monthly price.