Cube
Cube
Any container image, awake for each request
Your image as an app at its own address. Its instances wake for requests, sleep 100 ms after the last one, and pick up where they left off.
Cube in numbers
In three steps
The same calls from the command line, the API, the SDKs and the MCP server.
Before you start
Put your API key in GLAC_API_KEY.
curl -fsSL https://glac.ai/install.sh | sh
export GLAC_API_KEY=ak_...API=https://api.glac.ai/v1
AUTH="Authorization: Bearer $GLAC_API_KEY"from glac import Glac
glac = Glac()import { Glac } from "glac";
const glac = new Glac();# give your agent the tools (Claude Code here)
claude mcp add glac -e GLAC_API_KEY=ak_... -- npx glac-mcpDeploy an image
Its version takes the traffic once it is ready, at an address of its own.
glac deploy ghcr.io/acme/api:1.4 \ --name api --port 8080curl $API/apps -H "$AUTH" --json '{"name": "api", "image": "ghcr.io/acme/api:1.4", "port": 8080}'app = glac.cube.deploy("ghcr.io/acme/api:1.4", name="api", port=8080)const app = await glac.cube.deploy("ghcr.io/acme/api:1.4", { name: "api", port: 8080 });cube_deploy {"app": "api", "image": "ghcr.io/acme/api:1.4", "port": 8080}Call it
The first request wakes an instance.
curl https://api-‹project›.glac.run/curl https://api-‹project›.glac.run/import urllib.request print(urllib.request.urlopen(app.url).status)console.log((await fetch(app.url)).status);# from a sandbox made for the one command sandbox_run {"command": "curl -s https://api-‹project›.glac.run/"}Watch it
A line a request, saying whether it woke an instance and how long that took.
glac cube logs api -fcurl -N "$API/apps/api/logs?follow=true" -H "$AUTH"for line in app.logs(follow=True): print(line)for await (const line of app.logs({ follow: true })) console.log(line);cube_logs {"app": "api", "kinds": ["requests"]}
‹project› is six characters of your project’s id. The API calls a Cube an app.
What it does
Asleep 100 ms after its last request, awake for the next in 3.5 ms.1
Every deploy is a version: the traffic moves once it is ready, and back in one call.
An instance for each key, made by its first request, with its own memory and disk.
Scale in each region: instances start as requests come, up to the most you allow.
Your own domain, its certificate issued and renewed for you.
Your Compose file becomes a Cube for each service, each reached by its name.
Illustrative previews
Compared
Beside the two usual ways of running a service.
| Always-on server | Scale-to-zero container | Cube | |
|---|---|---|---|
| The first request after a quiet spell | Answered at once | Waits while it starts again from its image | Wakes it in 3.5 ms1 |
| Memory and processes while idle | Kept | Lost | Kept while it sleeps: an hour, or for as long as a keyed instance lives |
| What you pay while idle | All of it | Nothing | No CPU; only what it keeps |
| Kept apart from others by | A virtual machine | Usually a shared kernel | A microVM of its own |
Built for
APIs and web apps
CPU billed by the busy millisecond, and asleep between requests.
glac deploy ghcr.io/acme/web:2.0 \ --name web --port 3000 curl https://web-‹project›.glac.run/A backend per user or agent
One instance a key, each with its own memory and disk.
glac.cube.deploy( "ghcr.io/acme/agent:3", name="agent", port=8080, keys={"from": {"header": "User"}})Jobs
An image that runs to its end, then stops.
glac deploy ghcr.io/acme/report:1 \ --name report --kind job glac cube logs report -f
Prices and limits
Billed by the Cube resources it uses, as every product is. All prices and plans
| What is counted | How | Price |
|---|---|---|
| CPU | Busy CPU time, by the millisecond | $0.01 / million CPU-ms$0.00001 / CPU-second$0.036 / CPU-hour$26.28 / CPU-month |
| Memory | Held, by the millisecond, in 128 MiB steps | $0.00222 / million GiB-ms$0.00000222 / GiB-second$0.008 / GiB-hour$5.84 / GiB-month |
| Requests | Per request into a Cube or through a sandbox link | $0.30 / million |
| Traffic outNA · EU | Per GB leaving North America and Europe | $0.004 / GB |
| Traffic outAPAC | Per GB leaving Asia-Pacific | $0.01 / GB |
| Kept asleep3 | What sleeping instances keep, and snapshots | $0.00000761 / million GB-ms$0.00000000761 / GB-second$0.0000274 / GB-hour$0.02 / GB-month |
| Logs3 | What Cubes print that is kept, as printed | $0.00000761 / million GB-ms$0.00000000761 / GB-second$0.0000274 / GB-hour$0.02 / GB-month |
Estimate a month
A real workload, and what its month comes to on Paid and on Free.
JSON in, JSON out, a database call or two.
Pages rendered on the server, with sign-in.
Each request waits on a model for its answer.
Events from other services, and work on a schedule.
An instance awake 7.85 hours a day on average.
A 30-day month, this workload alone on the account. Sources
A month on Paid
$0.35 a million requests
- CPU26M CPU-ms$0.26
- Memory29.4 GiB-h$0.24
- Requests10M requests$3.00
- Data stored$0.00
- NVMe cache$0.00
- Traffic out6 GB$0.02
- Usage at the list prices
- $3.52
- Included in Paid
- −$3.52
- Paid’s fee
- $5.00
Past what Free allows: requests.
Glac$3.52
By size
What the plans allow
Every limit of each plan| Free | Paid | |
|---|---|---|
| Cubesper account | 10 | 500 |
| Instances of a Cubein each region, at most | 5 | 500 |
| Awake at onceinstances and sandboxes | 5 | 500 |
| Largest instance | 2 vCPUs, 4 GiB | 8 vCPUs, 16 GiB |
| Variables and secretsper Cube | 64 | 128 |
| Logs kept | 3 days | 30 days |
Kept apart
A virtual machine for every instance, and your project’s key on everything it keeps.
SecurityA microVM of its own
A Firecracker microVM with its own kernel, booted from your image.
A jail around it
An empty root, a user with no privileges, its own limits.
Reached through the API
Commands and files go through an agent inside it, not its network.
The network you allow
A private network per project; rules for the hosts it may reach.
Sealed with your key
Disks, sleeping memory, snapshots and logs, before they leave the machine.
Keys that open only what they say
An API key opens one project, as far as its scopes allow; an audit log records what it does.
Read on
- CubeAddresses, versions, instances and when they sleep, protocols, keyed instances.
- Services and ComposeThe private network, shared variables, deploying several services, Compose files.
- Logs and exportA Cube’s log, its metrics, and sending both to any OpenTelemetry receiver.
- The API referenceEvery call for apps, versions, instances and domains.
The platform
Cube
Managed Applications
- SandboxA computer of its own for every agent
- SoonBrowserReal browsers, driven from code
- SoonServerless PostgresPostgres that sleeps when idle and wakes on a connection
- SoonThird-party appsOpen-source projects run for you, then a marketplace