Skip to content

Public market API

What GPUs can be rented on Legion now, and from what price, with no key.

On this page

One request tells you which GPU models can be rented on Legion now, how many are free, and the lowest price for each. It needs no key, no cookie and no sign-in.

Shell
curl -s "https://legion.ambient.xyz/api/public/market"

Call it from a browser

The response sends Access-Control-Allow-Origin: *. A plain fetch with no custom headers works from any page. Don't send credentials.

JavaScript
const response = await fetch("https://legion.ambient.xyz/api/public/market");
const market = response.ok ? await response.json() : undefined;

The response

When nothing can be rented, models is empty:

JSON
{
  "generated_at": "2026-10-15T20:18:20.751571Z",
  "currency": "USD",
  "models": []
}

Each entry in models has this shape (values shown as …):

JSON
{
  "slug": "rtx-4090",
  "gpu_model": "NVIDIA GeForce RTX 4090",
  "class": "workstation",
  "memory_gib": 24,
  "from_price_per_gpu_hour": "…",
  "max_gpus_on_one_host": …,
  "gpus_available": …,
  "hosts_available": …,
  "rent_url": "https://legion.ambient.xyz/rent/market?gpu_model=NVIDIA+GeForce+RTX+4090",
  "median_tflops": …
}
The response
FieldWhat it is
generated_atWhen Legion computed this summary.
currencyThe currency of every price.
modelsOne entry per GPU model with a GPU free now. Empty when nothing can be rented.
slugA stable, URL-safe name for the model. Match on it.
gpu_modelThe model's full name, as the NVIDIA driver reports it.
classdatacenter or workstation.
memory_gibMemory per GPU, in whole GiB.
from_price_per_gpu_hourThe lowest price for one GPU for one hour, as a decimal string. Never a float.
max_gpus_on_one_hostThe most GPUs free on a single host: the largest single rental possible now.
gpus_availableGPUs free now, on all hosts together.
hosts_availableHosts with at least one GPU free.
rent_urlThe Legion market, filtered to this model.
median_tflopsThe median measured TFLOPS per GPU across the free hosts, when there is one.

New fields can appear. Ignore the ones you don't know.

The summary is aggregated per GPU model. It never names a host, provider or organization.

Prices

Prices are decimal strings with two decimal places. To do arithmetic, convert to integer cents first, for example Math.round(Number(price) * 100), and format with Intl.NumberFormat. The prices are all-in: they include Legion's platform fee, like every price a renter sees. These are "from" prices: renters see each host's exact price in the market.

rent_url opens the market filtered to the model. To ask for more than one GPU, add min_gpus, up to max_gpus_on_one_host:

JavaScript
const url = new URL(model.rent_url);
url.searchParams.set("min_gpus", "2");

Caching and limits

  • Responses carry Cache-Control: public, max-age=30, s-maxage=60, stale-while-revalidate=300. generated_at shows how old the data is.

  • Fetch it once per page view. Don't poll faster than once a minute.

  • Each IP address can make 60 requests a minute. Over that, you get 429 for a minute.

Errors

A response that isn't 200 is application/problem+json. Treat it like an empty list. Don't show stale or sample prices as if they were live.