Skip to content

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.

Read the docs

Cube in numbers

to wake an instance1
3.5 ms
idle, then it sleeps2
100 ms
to roll back a deploy
1 call

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-mcp
  1. Deploy 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 8080
    curl $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}
  2. 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/"}
  3. Watch it

    A line a request, saying whether it woke an instance and how long that took.

    glac cube logs api -f
    curl -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.

Read the docs

Illustrative previews

Compared

Beside the two usual ways of running a service.

Always-on serverScale-to-zero containerCube
The first request after a quiet spellAnswered at onceWaits while it starts again from its imageWakes it in 3.5 ms1
Memory and processes while idleKeptLostKept while it sleeps: an hour, or for as long as a keyed instance lives
What you pay while idleAll of itNothingNo CPU; only what it keeps
Kept apart from others byA virtual machineUsually a shared kernelA 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 countedHowPrice
CPUBusy CPU time, by the millisecond$0.01 / million CPU-ms$0.00001 / CPU-second$0.036 / CPU-hour$26.28 / CPU-month
MemoryHeld, by the millisecond, in 128 MiB steps$0.00222 / million GiB-ms$0.00000222 / GiB-second$0.008 / GiB-hour$5.84 / GiB-month
RequestsPer request into a Cube or through a sandbox link$0.30 / million
Traffic outNA · EUPer GB leaving North America and Europe$0.004 / GB
Traffic outAPACPer GB leaving Asia-Pacific$0.01 / GB
Kept asleep3What sleeping instances keep, and snapshots$0.00000761 / million GB-ms$0.00000000761 / GB-second$0.0000274 / GB-hour$0.02 / GB-month
Logs3What 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.

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

$5.00

$0.35 a million requests

  • CPU26M CPU-ms$0.26
  • Memory29.4 GiB-h$0.24
  • Requests10M requests$3.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.

What the plans allow

Every limit of each plan
FreePaid
Cubesper account10500
Instances of a Cubein each region, at most5500
Awake at onceinstances and sandboxes5500
Largest instance2 vCPUs, 4 GiB8 vCPUs, 16 GiB
Variables and secretsper Cube64128
Logs kept3 days30 days

Kept apart

A virtual machine for every instance, and your project’s key on everything it keeps.

Security
  • A 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

The platform