Codespaces usage is billed for all organization and enterprise accounts on GitHub Team and GitHub Enterprise, which do not include any free minutes or storage. Personal accounts are not currently billed for Codespaces usage.
Codespaces usage is billed according to the units of measure in the following table:
|Product||SKU||Unit of measure||Price|
|Codespaces Compute||2 core||1 hour||$0.18|
|4 core||1 hour||$0.36|
|8 core||1 hour||$0.72|
|16 core||1 hour||$1.44|
|32 core||1 hour||$2.88|
|Codespaces Storage||Storage||1 GB-month||$0.07|
Codespaces are billed in US dollars (USD) according to their compute and storage usage.
Compute usage is defined as the total number of uptime minutes for which a Codespaces instance is active. Compute usage is calculated by summing the actual number of minutes used by all codespaces. These totals are reported to the billing service daily, and are billed monthly.
Uptime is controlled by stopping your codespace, which can be done manually or automatically after a developer specified period of inactivity. For more information, see "Closing or stopping your codespace".
For Codespaces billing purposes, this includes all storage used by all codespaces in your account. This includes any files used by the codespaces, such as cloned repositories, configuration files, and extensions, among others. These totals are reported to the billing service daily, and are billed monthly. At the end of the month, GitHub rounds your storage to the nearest MB.
Your Codespaces usage shares your account's existing billing date, payment method, and receipt. To view all the subscriptions for your account on GitHub.com, see "Viewing your subscriptions and billing date."
To estimate the costs for consumptive services, you can use the GitHub pricing calculator.
Note: The ability to prebuild codespaces is currently in beta and subject to change.
By default, a GitHub Actions workflow is triggered every time you create or update a prebuild template, or push to a prebuild-enabled branch. As with other workflows, while prebuild workflows are running they will either consume some of the Actions minutes included with your account, if you have any, or they will incur charges for Actions minutes. For more information about pricing for Actions minutes, see "About billing for GitHub Actions."
If you are an organization owner, you can track usage of prebuild workflows by downloading a GitHub Actions usage report for your organization. You can identify workflow runs for prebuilds by filtering the CSV output to only include the workflow called "Create Codespaces Prebuilds." For more information, see "Viewing your GitHub Actions usage."
To reduce consumption of Actions minutes, you can set a prebuild template to be updated only when you make a change to your dev container configuration files, or only on a custom schedule. For more information, see "Configuring prebuilds."
While Codespaces prebuilds is in beta there is no charge for storage of templates. When prebuilds become generally available, you will be billed for storing prebuild templates for each prebuild configuration in each region selected for that configuration.
Note: You must set a spending limit before you can use Codespaces.
By default, your organization or enterprise will have a Codespaces spending limit of $0, which prevents new codespaces from being created or existing codespaces from being opened. To allow your users to create codespaces in your organization, set the limit to a value higher than $0.
Overages are always billed monthly regardless of your billing term (even if your account is otherwise billed annually).
For information on managing and changing your account's spending limit, see "Managing your spending limit for Codespaces."
If you hit a spending limit, you will no longer be able to create or resume your codespaces. You can still export any work in progress changes to a new branch.
By default the machine type with the lowest valid resources is used when a codespace is created. However, users may be able to choose a machine type with more resources. They can do this either when they create a codespace, or they can change the machine type of an existing codespace. For more information, see "Creating a codespace"" and "Changing the machine type for your codespace."
If a machine type that has more resources is chosen, this will affect the per-minute charge for that codespace, as shown above.
Organization owners can create a policy to restrict the machine types that are available to users. For more information, see "Restricting access to machine types."
Codespaces can only be used in organizations where a billable owner has been defined. To incur charges to the organization, the user must be a member or collaborator, otherwise they cannot create a codespace.
For example, a user in a private organization can fork a repository within that organization, and can subsequently use a codespace billed to the organization; this is because the organization is the owner of the parent repository, which can remove the user's access, the forked repository, and the codespace.
Usage is billed and reported on every hour. As such, you pay for any usage when a repository is within your organization. When a repository is transferred out of your organization, any codespaces in that repository are removed as part of the transfer process.
If a user is removed from an organization or repository, their codespaces are automatically deleted.