Lightning AI cost estimation
Every machine price on
lightning.ai/pricing comes from one
public endpoint.
Always fetch live prices, and fetch the SKU slugs too — never quote either
from memory. Prices, spot rates, capacity
and slugs change. This file deliberately carries no
price snapshot: one went stale and cost a real run 59 minutes — see
From a quote to a
launch below.
1 Lightning credit = $1 USD. Machines bill
per second while allocated; storage bills
daily. Docs:
billing FAQ ·
manage costs.
Setup & auth
The accelerator catalog needs no auth — plain
works, which makes this skill usable
before login:
bash
curl -s "https://lightning.ai/v1/core/accelerators?cloudProvider=MACHINE" | jq '.accelerator | length'
The same call through the CLI (query string goes in the path, quoted).
always
sends credentials, so this route needs
or an API key first; only
works
logged out:
bash
# Use the Lightning AI CLI from the current env; install or upgrade it there if it's missing or older than 2026.9.18
v=$(lightning --version 2>/dev/null | sed -n 's/^Lightning CLI version //p')
[ -n "$v" ] && [ "$(printf '%s\n' 2026.9.18 "$v" | sort -V | head -1)" = 2026.9.18 ] \
|| uv pip install -U lightning-sdk || python3 -m pip install -U lightning-sdk
lightning --version # must print "Lightning CLI version …"; if not, see the table below
lightning api "/v1/core/accelerators?cloudProvider=MACHINE"
Auth is only needed for the
optional step of checking which clouds a teamspace can actually
reach (
, or
, optionally with
).
is required for
every recipe here.
This uses, and if needed installs into, the environment the agent runs in (the user's project
venv, a conda env, …). Then call plain
everywhere. If setup doesn't go cleanly:
| Symptom | Fix |
|---|
Both installs fail: no active env, or pip refuses with externally-managed-environment
| Install it on its own instead: uv tool install lightning-sdk
(or pipx install lightning-sdk
), then call "$(uv tool dir --bin)/lightning"
if that dir isn't on |
| still prints no line after installing | shows which one runs. Another tool owns the name (PyTorch Lightning also installs a command), or the env you installed into isn't on : activate it (source .venv/bin/activate
) or call its by full path |
, or unexpected extra argument
| The CLI is older than this skill expects: uv pip install -U lightning-sdk
(or pip install -U lightning-sdk
) in the env points into; uv tool upgrade lightning-sdk
for a uv tool install |
| The upgrade fails on a version conflict with the project's own pins | Don't fight the pins: install it outside the project with uv tool install lightning-sdk
and call "$(uv tool dir --bin)/lightning"
|
| Installing is blocked (read-only env or home, agent sandbox) | Skip it and run each command as UV_CACHE_DIR="${TMPDIR:-/tmp}/uv" uvx lightning-sdk …
|
Every call fails on SSL/certificates, even (Could not find a suitable TLS CA certificate bundle
), only inside an agent sandbox | A read-deny rule is hiding certifi's public CA bundle (site-packages/certifi/cacert.pem
). Allow that one path; don't disable the sandbox |
Resolving org and teamspace (only for availability checks)
Pricing is global — you do not need a teamspace to quote. You need one to check which
cloud accounts the user can launch on. Never guess it; resolve, and ask if ambiguous:
bash
lightning api /v1/memberships | jq -r '.memberships[] | [.ownerType, .name, .projectId] | @tsv'
PID=$(lightning api /v1/memberships | jq -r '.memberships[] | select(.name=="<teamspace>") | .projectId' | head -1)
lightning api "/v1/projects/$PID/clusters" | jq -r '.clusters[].id'
Map the returned cluster ids to catalog providers with the table under Cloud providers. A
cloud missing from that list can't be launched on by this teamspace, so don't quote it as the
answer — mention it only as "available if you enable that cloud account".
The accelerator catalog
GET https://lightning.ai/v1/core/accelerators?cloudProvider=<PROVIDER>
→
. Fields that matter for costing:
| Field | Meaning |
|---|
| On-demand USD per hour for the whole instance (not per GPU). on = $9/hr for both GPUs. |
| Interruptible/spot USD per hour. means the provider has no spot — do not read it as free. It is also not always cheaper than ; compare, don't assume. |
| Cross-cloud canonical name (). Use this to compare the same SKU across clouds. |
| / | Provider-specific names ( / on Lightning, on AWS). |
| , , , , , , , , , , . The SDK spells the RTX family , so filter with a loose regex (). |
| GPUs per instance (0 on CPU SKUs — use there). |
| e.g. , , . Sometimes omits VRAM () — see the VRAM table. |
| , , | Host RAM / vCPU / attached disk. Occasionally wrong (AWS reports MB) — sanity-check before quoting RAM. |
| = currently unavailable. A cheap SKU that is out of capacity is not a real quote. |
| / | Estimated wait to get the machine. Values in the 10⁴–10⁶ range mean "effectively unobtainable right now". |
| / | GCP Dynamic Workload Scheduler only — queued/batch allocation, not on-demand. |
| / | AWS capacity blocks: a materially cheaper reserved rate for long runs (H100×8 $43.61 vs $64.96 on-demand). Read it per SKU — the discount ranges ~18–55%. |
| Needs a paid plan tier. |
| , , | Whether it's live, where, and which cloud account it belongs to. |
Cloud providers
| What it is | Cluster id | When to use |
|---|
| Lightning Cloud (Lightning's own bare metal) | | Default and preferred. Cheapest generally-available H100s and near-zero queue times. |
| AWS | | Widest SKU range (T4/L4/L40S/RTXP/A100/H100/H200), capacity blocks. |
| GCP | gcp-lightning-public-prod
| Only source of TPUs; B200/H200 via DWS. |
| Lambda Labs | | Secondary — cheap H100/B200 when in capacity. |
| Nebius | | Secondary — good 1×B200 / 1×H200 availability. |
| Voltage Park | lightning-voltagepark-prod
| Secondary — cheapest H100 list price, frequently out of capacity. |
| Vultr | — | Niche (A16/A40/A100/L40S). |
Quote from
first, then AWS/GCP, and only bring up the secondary clouds when they win
on price
and are in capacity.
From a quote to a launch
The
/
values used by
,
and
map onto catalog SKUs like this — quote the SKU, launch with the name:
| | | | |
|---|
| | | … | or (by cloud) |
| | | … | … |
| / | / | | … | varies by cloud — look it up |
| / / | / / | | / | varies by cloud — look it up |
| / / () | / / | | () | look it up (family ) |
/
pin the memory size but are hidden from CLI
(the CLI
rejects them); they work only as
in Python or with
.
also exists.
Add
(e.g.
--cloud lightning-baremetal
) to pin the cloud you priced;
without it the job lands on the teamspace default and may bill a different rate.
The same value maps to different slugs on different clouds, so never hardcode one.
H200 is
on Nebius but
on Lightning Cloud, and B200 has shown up as
,
and
. The SDK (2026.9.18+) treats all of these as the
same
/
machine (canonical
/
), but the catalog may still
return any of them. Resolve it live:
bash
# every SKU on Lightning Cloud whose name mentions the accelerator you want
curl -s "https://lightning.ai/v1/core/accelerators?cloudProvider=MACHINE" \
| jq -r '.accelerator[] | select((.displayName + .family + .slugMultiCloud) | test("h200"; "i"))
| [.slugMultiCloud, .displayName, .cost, .availableInSeconds] | @tsv'
Match on the accelerator's display name and family as well as the slug (there is no
field;
in jq silently drops it). Filtering on a slug you assumed makes a
machine that exists look unavailable — which is exactly how a run ended up queued 59 minutes for
an H100 while an idle H200 sat in the same pool at the same price.
Price lookup recipes
Drop these into the shell once, then use them for every quote.
bash
# _litfetch <PROVIDER> — catalog JSON. Fails LOUDLY: a silently dropped cloud
# would make litcompare name the wrong winner.
_litfetch() {
curl -sf --retry 3 --retry-delay 1 --max-time 20 \
"https://lightning.ai/v1/core/accelerators?cloudProvider=$1" \
|| { echo "ERROR: could not fetch $1 catalog — do not quote a comparison" >&2; return 1; }
}
# litprice <PROVIDER> [family-regex] — live catalog, one row per SKU
litprice() {
_litfetch "${1:-MACHINE}" \
| jq -r --arg re "${2:-.}" '
["SKU","FAMILY","N","USD/HR","SPOT/HR","RAM_GB","WAIT_S","STATUS"],
(.accelerator[]
| select(.family|test($re;"i"))
| [ .slugMultiCloud, .family,
(if .acceleratorType=="GPU" then .resources.gpu else .resources.cpu end),
.cost,
(if .spotPrice > 0 then (.spotPrice*100|round/100) else "n/a" end),
((.resources.memoryMb|tonumber)/1024|round),
.availableInSeconds,
([ (if .outOfCapacity then "OUT-OF-CAPACITY" else empty end),
(if .dwsOnly then "DWS-ONLY" else empty end),
(if .isTierRestricted then "TIER-RESTRICTED" else empty end),
(if .reservable then "RESERVABLE" else empty end) ]
| if length==0 then "ok" else join(",") end )
])
| @tsv' | column -t
}
# litcompare <slugMultiCloud> — same SKU priced across every cloud, cheapest first
litcompare() {
{ printf 'CLOUD\tSLUG\tUSD/HR\tSPOT/HR\tWAIT_S\tSTATUS\n'
for p in MACHINE AWS GCP LAMBDA_LABS NEBIUS VOLTAGE_PARK VULTR; do
_litfetch "$p" \
| jq -r --arg p "$p" --arg s "$1" '.accelerator[] | select(.slugMultiCloud==$s)
| [ $p, .slug, .cost,
(if .spotPrice > 0 then (.spotPrice*100|round/100) else "n/a" end),
.availableInSeconds,
([ (if .outOfCapacity then "OUT-OF-CAPACITY" else empty end),
(if .dwsOnly then "DWS-ONLY" else empty end),
(if .isTierRestricted then "TIER-RESTRICTED" else empty end),
(if .reservable then "RESERVABLE" else empty end) ]
| if length==0 then "ok" else join(",") end )
] | @tsv'
done | sort -k3 -n; } | column -t
}
# litquote <usd_per_hour> <instances> <hours> [storage_gb] [storage_days]
litquote() {
jq -n --argjson r "$1" --argjson n "$2" --argjson h "$3" \
--argjson gb "${4:-0}" --argjson d "${5:-0}" '
($r*$n*$h) as $c | (([$gb-10,0]|max) * 0.10 * ($d/30)) as $s
| { rate_per_hour: $r, instances: $n, hours: $h,
cluster_per_hour: ($r*$n*100|round/100),
compute_usd: ($c*100|round/100),
storage_usd: ($s*100|round/100),
total_usd: (($c+$s)*100|round/100) }'
}
bash
litprice MACHINE # everything on Lightning Cloud
litprice GCP 'B200|H200' # just the Blackwell/Hopper-refresh SKUs on GCP
litcompare lit-h100-80gb-8 # who has the cheapest 8×H100 right now
litquote 36 32 336 # 32 nodes × 8×H100 × 2 weeks
Cost formulas
Durations: 1 day = 24 h · 1 week = 168 h · 1 month = 730 h (or
) · 1 year = 8760 h.
compute_usd = cost_per_hour × instances × hours # billed per second, no rounding up
spot_usd = spotPrice × instances × hours # only if spotPrice > 0
storage_usd = max(0, drive_gb − 10) × $0.10 × months # first 10 GB free, billed daily
total_usd = compute_usd + storage_usd
-
is per instance, not per GPU. For a per-GPU-hour figure divide by
.
-
Multi-node: total = per-node
×
. A multi-machine job with
on
bills 32 × the 8×H100 rate.
-
Serving: total =
× replicas × hours. With autoscaling (
/
), quote a
range:
is the floor you pay 24/7 (0 if
scale-to-zero),
the ceiling. For per-token economics:
usd_per_1M_tokens = (cost_per_hour × replicas) / (tokens_per_sec × 3600 / 1e6)
is the
measured aggregate output throughput of your server at your batch
size — never guess it; benchmark, or give a range. If the user only wants to
call a model
rather than own the GPU, compare against the per-token hosted models in the
skill: a dedicated GPU only wins above a fairly high steady load.
-
Spot / interruptible (
,
) is typically 15–60% off, but
can be preempted — only recommend it for checkpointed training, never for a serving SLA.
-
Billing covers the whole machine-allocation window, not just your workload. The bill runs
from
to
, which includes the image pull — and the SDK reports the job as
for most of that pull. Budget for it: a large image can add several minutes of billed
time before your first line of code runs. Quote container startup as a separate line item, or
give the estimate as a range.
-
Every account gets one free 4-CPU Studio; additional machines bill at list rate.
-
Folders are billed, connections are not — and the API calls both "data connections". Data
added to a teamspace as a
folder is internal storage and bills like Drive. Data
connected from outside (an S3/GCS bucket you already own and pay for) is
not billed by
Lightning. Both appear under
/v1/projects/<pid>/data-connections
, so the endpoint name tells
you nothing — go by
.
creates the
billed
kind, so a "just put the dataset somewhere reusable" step is a storage line item, not free.
Always state assumptions with the number: rate, instance count, hours, spot-or-on-demand,
storage, and the date you fetched prices.
Sizing hardware for a model (do this before pricing)
When the user names a model instead of a machine, size it first, state the assumptions, then
price it. VRAM per GPU (the catalog doesn't always carry this):
| Family | VRAM/GPU | Family | VRAM/GPU |
|---|
| T4 | 16 GB | H100 | 80 GB |
| L4 | 24 GB | H200 | 141 GB |
| A100 | 40 or 80 GB (check ) | B200 | 180 GB |
| L40S | 48 GB | RTXP (RTX PRO 6000) | 96 GB |
| A40 | 48 GB | TPU v6e | 32 GB HBM/chip |
Inference / serving memory
weights_gb ≈ params_B × bytes_per_param # BF16/FP16 = 2, FP8 = 1, INT4 = 0.5
kv_cache_gb ≈ 2 × layers × kv_heads × head_dim × bytes × ctx_len × concurrency / 1e9
vram_needed ≈ weights_gb × 1.15 + kv_cache_gb # ~15% for activations/fragmentation
Pick the smallest SKU where
vram_needed ≤ gpus × vram_per_gpu
, keeping tensor-parallel degree
a power of 2. Run the whole formula before picking, and keep units straight: the table's "80 GB"
is the vendor label, but
reports
81,559 MiB ≈ 85.5 decimal GB per H100 (our own
H200 reads 143,771 MiB ≈ 150.8 GB against a "141 GB" label). So a 70B in BF16 — 140 GB of weights,
before KV cache — leaves only ~10 GB of the 171 GB on 2×H100: it fits, but
only at modest context and concurrency, so size the KV cache before promising it. Aggregate memory
is a necessary condition, not a sufficient one — the model also has to partition across the cards
at your tensor-parallel degree.
Training memory — full fine-tune with AdamW mixed precision ≈ 16–18 bytes/param
(weights + grads + fp32 master + optimizer states) plus activations, sharded across GPUs with
FSDP/ZeRO-3. LoRA and QLoRA are not the same thing:
- LoRA keeps the base weights at full precision and freezes them — so ≈ in
BF16, plus optimizer state for the adapters only (a few % of params × 16 bytes), plus
activations. It removes the optimizer-state term for the base model, not the weights term.
- QLoRA additionally quantizes the frozen base (NF4 ≈ 0.5 bytes/param), which is what makes
the big drop.
Both still need activation memory, which scales with sequence length × batch size and drops
sharply with gradient checkpointing — parameterize those rather than assuming them away. A 70B
LoRA run carries ~140 GB of frozen weights, so it needs multiple cards; QLoRA at ~35 GB fits one.
Training time (this is what turns into money):
flops = 6 × params × tokens # fwd + bwd, dense transformer
gpu_hours = flops / (peak_flops × mfu × 3600)
wall_hours = gpu_hours / (num_gpus × scaling_efficiency)
cost = wall_hours × nodes × node_cost_per_hour
Dense BF16 peak (no sparsity): A100 312 TFLOPS · H100/H200 989 TFLOPS · B200 ≈ 2250 TFLOPS ·
L40S 362 TFLOPS · L4 121 TFLOPS. Use MFU 0.35–0.5 (0.4 is a fair default) and scaling
efficiency ~0.9 at 8–16 nodes, ~0.8 at 32+. These are estimates — say so, and give a range.
Example workflows
Prompts this skill handles: "how much to train on 32 8×H100 nodes for 2 weeks?", "what
would it cost to serve a model on B200?", "cheapest way to fine-tune Llama-70B", "what's my
monthly bill if I keep 2 A100s and 5 TB of data?".
1. 32 nodes of 8×H100 for 2 weeks (and 2 months)
bash
litcompare lit-h100-80gb-8 # -> MACHINE 36.00/hr, spot 30.56, wait ~145s (cheapest in capacity)
litquote 36 32 336 # 2 weeks: $1,152/hr -> $387,072
litquote 36 32 1440 # 2 months: $1,152/hr -> $1,658,880
litquote 30.56 32 336 # same on spot -> $328,581
litquote 36 32 336 20480 14 # + 20 TB of checkpoints for the fortnight -> +$955
Report it as: "32 × 8×H100 on Lightning Cloud is $36/node/hr = $1,152/hr; 2 weeks (336 h) =
~$387k on-demand, ~$329k on spot. Add ~$955 if you keep 20 TB of checkpoints in the
Drive for those two weeks. Prices fetched <date>."
2. Serve a model on B200
bash
litprice NEBIUS 'B200'; litprice GCP 'B200'; litprice LAMBDA_LABS 'B200'
Lightning Cloud has no B200 today, so quote the secondary clouds and flag the caveats: Nebius
1×B200 $9.86/hr →
~$7,100/month at 24/7 (720 h); 8×B200 $78.87/hr → ~$56.8k/month. GCP's
8×B200 is
(queued, not on-demand) and Lambda's is currently
. If the
deployment scales to zero, quote the range instead:
$0 → replicas × rate × hours
.
3. LoRA fine-tune a 7B model
Sizing: 7B in BF16 ≈ 14 GB weights + LoRA adapters → fits one H100 80 GB comfortably.
bash
litprice MACHINE 'H100' # lit-h100-80gb-1 -> $4.50/hr
litquote 4.5 1 6 # ~6 h run -> $27
4. Steady-state monthly bill
bash
litquote 5.68 2 730 5120 30 # 2 × 1×A100-80GB on GCP, 24/7, + 5 TB Drive
→ compute $8,292.80 + storage $511 ≈
$8,804/month. If the machines only run 8 h/day, pass
hours instead and the compute drops to ~$2,760.
Raw API fallback
bash
# full record for one SKU (all capacity/quota/reservation fields)
curl -s "https://lightning.ai/v1/core/accelerators?cloudProvider=AWS" \
| jq '.accelerator[] | select(.slugMultiCloud=="lit-h100-80gb-8")'
# AWS reserved capacity-block rate vs on-demand
curl -s "https://lightning.ai/v1/core/accelerators?cloudProvider=AWS" \
| jq -r '.accelerator[] | select(.reservable) | [.slugMultiCloud, .cost, .capacityBlockPrice] | @tsv'
# what a finished job actually cost (needs auth) — ground-truth to check an estimate against
lightning job inspect <job-name> --teamspace <owner>/<teamspace>
gives the realized USD for a finished job (see the
skill), but
wait for it to settle — see the Gotchas below. The
constants carry no prices
(
and
are
). With auth,
Teamspace("owner/teamspace").list_machines()
returns
objects with
,
,
and
filled in
from this same catalog, limited to machines in capacity on the teamspace's cloud accounts. For
cross-cloud comparisons and quotes before login, use the REST catalog above.
Gotchas
- and are for every constant. is
populated, so the object looks hydrated and the reads like a bug. Prices come from the
REST accelerator catalog, or from
Teamspace(...).list_machines()
(needs auth), not the constants.
- is provisional when a job first reports terminal, and keeps climbing. It is
not flagged as incomplete. A job that settled at read the moment
returned, and rose for ~2.5 minutes before stabilising; another read exactly
for 45–85s after finishing. Never quote the first value. Poll until it is unchanged across
two or three reads before reporting a realized cost, and treat on a just-finished job as
"not computed yet", not "free".
- The image pull is billed, and it is billed as . Billing spans
→. A 1200-second training run on a image billed 1683
seconds — a 397-second image pull, during which the SDK reported , plus shutdown. At
spot that is
1683 × 0.34775 / 3600 = $0.16257
, exactly the settled bill, versus
for the training time alone. Estimating from workload duration alone under-quotes
by ~40% on a short job. The smaller the job, the worse the ratio.
- is per instance, not per GPU. at is $36/hr for all 8 GPUs
($4.50/GPU-hr). Quoting it as per-GPU inflates an estimate 8×.
- means "no spot on this provider" (Lambda, Nebius, Voltage Park all report
0), not "free". Only use when it is .
- Spot is not always cheaper than on-demand. Figures below are illustrations of the
pattern, not current rates. GCP was $47.16 on-demand vs
$52.74 spot; AWS $2.89 vs $3.02; GCP $0.48 vs $0.71. Take
and say which one you quoted.
- Unknown values silently return the AWS catalog. , and
all echo AWS's 23 SKUs byte-for-byte — they are not real Azure prices. Only the
seven providers in the Cloud providers table have been checked. The API's provider enum also
lists , , , , , and aggregate values;
before quoting from one, diff its response against the AWS catalog to rule out the echo.
- Never price from or . They return a single internal cluster
entry with placeholder costs of and . The Lightning Cloud catalog is .
- The SDK's enum says , the pricing API says — same
platform, different spelling. To actually launch on it pass the cluster id:
--cloud lightning-baremetal
.
- Don't join the catalog to on . is but the
catalog's is . Join on + GPU count, which is what
the SDK's own equality does.
- Check and before naming a winner. Voltage Park's
$15.92 8×H100 is the cheapest number in the catalog and is currently unobtainable; GCP's
1×H100 reports a wait of ~1.5M seconds. Cheapest-on-paper ≠ cheapest-you-can-run.
- GCP B200/H200 are — allocated through Dynamic Workload Scheduler (queued batch),
so they are not a drop-in for an always-on serving endpoint.
- AWS H100/H200/A100 are with a well below on-demand, and
the discount varies a lot by SKU (H100×8 $43.61 vs $64.96 = −33%; H200×8 −18%; A100-40GB×8
$12.39 vs $27.67 = −55%). For any run measured in weeks, surface that number instead of the
on-demand one — but read it per SKU, don't apply a flat percentage. The same three are
— a free-tier account can't launch them at any price.
- Storage is $0.10/GB/month above the first 10 GB, billed daily — trivial for code, material
for training: 20 TB of checkpoints is ~$2,047/month. Always ask about checkpoint/dataset size
for multi-week training quotes. Count teamspace folders in that figure (see the folder vs
connection note above); an externally connected bucket is billed by its own cloud, not here.
- Stored bytes are not observable from the platform. on
does not move when a folder is created, filled or deleted — it read
byte-identical before, during and after storing 1.078 GB in a folder flagged
. Size the storage line from what you know you uploaded; you cannot
reconcile it against the platform afterwards.
- Estimates for model training are estimates. MFU, dataloader stalls, restarts and multi-node
scaling losses move the real number by tens of percent — give a range and list the assumptions
rather than a single confident figure.
- Confirm with the user before launching anything you priced; this skill only quotes.