compare_gpu_prices
Compare tracked GPU rental prices for one model (e.g. 'H100', 'A100 SXM', 'RTX 4090', 'L40S'), cheapest first. Example call: compare_gpu_prices(gpu="H100"). If a result looks wrong, give the user its report_issue_url. The top in-stock results include a short Rent here label (`rent_here`) and `rent_url` (the counted /go/?src=mcp booking link; same target as `tracked_url`); show `rent_url` to the user and keep the top-level `referral_disclosure` visible.
Same data as https://thelanternworks.com/api/v1/gpu-prices.json. Sorted by hourly_usd ascending; each result
has source_url and checked_at. 'Cheapest' means cheapest among tracked providers, not the whole market.
limit 1-25. Unknown model returns not_found listing tracked models.
H100/A100: cheapest_by_form_factor gives one pick per form_factor (tier_class, interruptible, in_stock); same rule as the site. 'NVLink' rows are form 'not stated': NVLink is the bridge, and the vendor doesn't say SXM or PCIe.
Each result has tier_class: on-demand | community | marketplace | interruptible (spot/preemptible) |
reserved | dedicated-monthly. Reserved (reservation/commitment 'starting from') rates are left out unless
include_reserved=true, and even then they are never reported as cheapest. DEFAULT on_demand_only=true: results[0] is the cheapest
on-demand rate. Pass on_demand_only=false to include spot/interruptible, community and marketplace capacity (each
such row is labelled by tier_class and interruptible); the summary then names the cheapest on-demand rate when the
overall cheapest isn't. If a model has no on-demand rate, or every on-demand rate needs more GPUs than requested,
the default falls back to all rates and says so in on_demand_fallback.
gpus (optional, 1-1024; default 1, stated in assumptions): the GPU count you need. A rate ranks only when its
min_gpus (smallest allocation sold) is <= gpus; rates sold only as larger allocations (e.g. 8-GPU nodes) are NOT
ranked and are listed in excluded_min_gpus (vendor, gpu, tier, min_gpus, gpu_count, hourly_usd, rate_id, source_url,
checked_at, reason, min_bill_usd_per_hour, min_bill_basis); min_gpus_unmet counts them (also in brief). Pass gpus=8 to
compare 8-GPU nodes. If every rate needs more GPUs, the error says which gpus value ranks them.
Each result has min_bill_usd_per_hour = min_gpus x hourly_usd (min_bill_basis: hourly_rate, per_second_rate or
monthly_equivalent) and effective_at, when the vendor started charging this price (effective_at_basis vendor_stated,
or first_observed = first daily snapshot showing it after a different price, an upper bound; null when not datable),
separate from last_verified. Neither affects ranking.
Full results also include batch_due_ledger: each scheduled build (gpu-refresh, lium-collect, scout-import,
scout-wider) has expected_at, last_expected_at, and the member_rate_ids it covers, derived only from the
workflow schedules. Brief mode omits the ledger.
A failed or out-of-stock probe keeps failure_reason (sold_out, region, quota, or other) and
failure_reason_detail; both stay on a lapsed claim next to last_known_in_stock. Null when the source
does not say; never guessed. Display only.
A crashed availability probe may add probe_error ({type, sanitized message of at most 200 characters})
and probe_attempted_at; those fields appear only when a probe raised an error and never count as a
successful check (verified_at and the success checked_at are not refreshed).
availability_expires_claim says which claim availability_expires_at belongs to (checked_at or last_known_at).
When an older in-stock claim exists beside a newer read, last_known_expires_at is that older claim's own expiry
(last_known_at + its max_age), separate from the current-read expiry. Display only; not a successful check.
A row with unknown stock, and each stale_prices entry, has next_check_at (next scheduled check, UTC), will_backfill
(true: a scheduled check covers it; false: scope limit, nothing will re-check it; null: not derivable),
backfill_eta and next_check_basis (the schedule it came from).
Each result includes a small trend object (7d/30d % change and direction from daily snapshots, or null with
trend_reason). include_history=true also adds each result's price_history (change points) and history.recent_changes
(price changes for this model among tracked providers, last 30 days) from /api/v1/gpu-prices/history.json.
Each result has data_age_hours (hours since its price was last verified), degraded (> 48 h) and stale (> 7 days).
Each result also has stock_age_hours (hours since the stock claim was read: reader clock minus stock_read_at or the
stock checked_at), stock_age_basis, and stock_read_state (never_read, read, or read_expired). Computed at call time;
a missing stock timestamp stays never_read and no timestamp is invented. Display only; not a successful check.
A degraded row is shown and flagged but never ranked first while a fresh row exists; if none is fresh,
stale_fallback=true and the summary says so.
By default a rate whose price is older than 168 h is never ranked or named cheapest: it is listed in stale_prices
('stale price (N days old)'); if every rate is stale, results is empty and the summary says no current cheapest.
max_data_age_hours (optional) replaces the 168 h default and drops older rates; excluded_too_old counts them.
region (optional): a country/area code ('US', 'EU') matches every published zone in it; a zone code ('US-NE-1', 'us-east-1') matches exactly, any case. Rates whose unexpired published regions exclude it are dropped; rates with no region
evidence stay, labelled unresolved and ranked after the rest. Each result has eligibility {eligible, applied, unmet,
unknown} from the shared T47 contract; constraints.eligible_rate_ids is the same set estimate_job_cost and price
watches use. Unknown stock is not confirmed availability.
Marketplace median rows (price_status=marketplace) also have marketplace_query (the literal filter used for the median, plus structured filters; null when unknown) next to offer_count and lowest_offer_usd, and composition_flag (composition, price, mixed, unknown, or null) from successive median, minimum and listing count only, not a host intersection. A composition, mixed or unknown flag is not a price move. Missing previous min or n stays unknown, never invented. Stale prices stay flagged as stale.
model_identity (T61): sourced nominal_memory and usable_memory (vendor-allocatable) for the queried model, each
with source_url; unknown stays 'unknown'. min_usable_memory_gb (optional) keeps only rows whose SOURCED usable
memory meets it; rows with unknown usable memory are counted in usable_memory_filter.unknown and never matched
on nominal memory or vram_gb.
availability_rate_7d (when present): window_days is the planned window (7, not the observed span); observed_hours is the actual coverage from first_check_at to last_check_at (or window_end). coverage_note is set only when observed_hours is shorter than the planned window (e.g. "Covers 24.1h of the planned 7-day window."); otherwise null. When last_check_at is older than 7 days, rate is null, last_observed_rate / last_check_at stay visible, window_status is lapsed, and stale_age_hours is the age of last_check_at. availability_window_summary (file-level, also on this output): no_window_count is the number of ranked rates with no 7-day stock window, split by no_stock_source, read_no_usable_signal, and signal_no_window_yet; earliest_first_check_at is when current windows began (lapsed windows are excluded). content_build_id is a sha256 prefix of canonicalized rate content (timestamps and ids excluded); generation_id is unchanged.