Public market API
What GPUs can be rented on Legion now, and from what price, with no key.
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.
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.
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:
{
"generated_at": "2026-10-15T20:18:20.751571Z",
"currency": "USD",
"models": []
}Each entry in models has this shape (values shown as …):
{
"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": …
}| Field | What it is |
|---|---|
generated_ | When Legion computed this summary. |
currency | The currency of every price. |
models | One entry per GPU model with a GPU free now. Empty when nothing can be rented. |
slug | A stable, URL-safe name for the model. Match on it. |
gpu_ | The model's full name, as the NVIDIA driver reports it. |
class | datacenter or workstation. |
memory_ | Memory per GPU, in whole GiB. |
from_ | The lowest price for one GPU for one hour, as a decimal string. Never a float. |
max_ | The most GPUs free on a single host: the largest single rental possible now. |
gpus_ | GPUs free now, on all hosts together. |
hosts_ | Hosts with at least one GPU free. |
rent_ | The Legion market, filtered to this model. |
median_ | The 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., and format with Intl.. 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.
Link to the market
rent_ opens the market filtered to the model. To ask for more than one GPU, add min_, up to max_:
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_shows how old the data is.at 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
429for a minute.
Errors
A response that isn't 200 is application/. Treat it like an empty list. Don't show stale or sample prices as if they were live.