# Get host price recommendation

> GET /v1/hosts/{host_id}/price-recommendation. The price advisor: a deterministic recommendation for the host's GPU class, for an on-demand price and for an interruptible one, each with a low to high…

Source: https://legion.ambient.xyz/docs/api/hosts/get-host-price-recommendation

`GET https://api.legion.ambient.xyz/v1/hosts/{host_id}/price-recommendation`

Authenticate with an API key: `Authorization: Bearer $LEGION_API_KEY`.

The price advisor: a deterministic recommendation for the host's GPU
class, for an on-demand price and for an interruptible one, each with a `low` to `high` range. Needs `hosts.manage`; another organization's host is 404. It is a pure function of stored inputs, so the
same inputs always give the same price; no language model computes it.

How it is made: the anchor blends what other marketplaces charge for the class (the median across
sources of each source's latest observation at most 7 days old; `api` and `dataset` sources weigh 1,
`web_agent` 0.5) with what renters actually paid for it on Legion over 30 days (GPU-hour weighted,
manually priced hosts only), by `min(1, gpu_hours_30d / 500)`. It is then scaled by the class's
7-day utilization (busy classes price up, idle ones down, at most 15%), by the host's Legion
score against its class (at most 10%) and by its machine spec (at most 20%). The interruptible price is the on-demand price times the
class's interruptible-to-on-demand ratio (0.4 to 0.85, and 0.6 when unknown): the marketplaces' ratio
while Legion's own interruptible rentals are few, shifting to Legion's own as they reach 500 GPU-hours.

`confidence` is `high` with at least 3 independent sources and 50 GPU-hours rented, `low` with a single
source, `medium` otherwise. `basis` says what was used and `explanation` says so in words.

Machine spec: the price follows what the host provisions per GPU, against the median of the
approved hosts of its GPU class: CPU cores (physical cores plus a quarter of the other threads, up to 8%),
RAM (up to 5%), disk (up to 3%), the PCIe link (up to 2%) and NVLink (up to 2%), so at most 20% up or down. Each resource moves the price by `weight x log2(host / median)`, capped at twice or half the median, the
same rule up and down. A value the host does not report, or one fewer than 2 hosts of the class report,
does not move the price. Fewer than 4 CPU cores per GPU, or less RAM per GPU than the GPU's own memory,
is flagged (`below_minimum`) as a bottleneck renters notice. `basis.spec` lists every resource and
`basis.spec_adjustment` the total. The split with the Legion score is: the spec factor prices how much the
host provisions; the score prices how well it runs (uptime, failures, driver and CUDA, measured network,
disk read and GPU speed), so nothing counts twice. CPU generation is not priced. Both anchors are of a
host with the class's median spec: Legion's own prices are adjusted by their host's spec, and a
marketplace quote that states the spec of its offers (`basis.normalized_sources` counts them) by that spec.

Similar GPUs: when the class has too little data of its own (no marketplace price in 7 days,
no rental in 30 days and fewer than three manually priced listings, so often a new model whose
provider's hosts are the only ones), the recommendation is based on similar GPU classes with data:
the same vendor, the same architecture first, then nearest by performance and memory (up to three). Their prices are scaled to this GPU by the ratio of performance (70%) and memory (30%), averaged with
closer classes counting more, and the `low` to `high` range is 15% wider each way. `basis.kind` is
`similar`, `basis.similar_models` lists the classes, and `confidence` is `low`. Auto pricing uses the
same recommendation.

With no input at all (no external observation within 7 days and no Legion listing or rental for the
class, and no similar GPU class with enough data) the answer is still 200, with `available` false and no prices, so a client never has to treat
"no data yet" as an error.

## Path parameters

- `host_id`, string (uuid), required

## Responses

### 200

The recommendation, or `available` false when Legion has no data for the class.

- `available`, boolean, required: False when Legion has no data at all for the host's class and no similar GPU class has enough. Then only `basis`, `explanation` and `computed_at` are present. With too little data for the class itself but enough for similar GPUs it is true with `basis.kind` `similar`.
- `on_demand`, PriceBand
  - `price_per_gpu_hour`, Money, required
    - `amount_minor`, integer (int64), required: Amount in minor units (cents for USD).
    - `currency`, MoneyCurrency, required: ISO 4217 currency code. Only USD is supported.
  - `low`, Money, required
    - `amount_minor`, integer (int64), required: Amount in minor units (cents for USD).
    - `currency`, MoneyCurrency, required: ISO 4217 currency code. Only USD is supported.
  - `high`, Money, required
    - `amount_minor`, integer (int64), required: Amount in minor units (cents for USD).
    - `currency`, MoneyCurrency, required: ISO 4217 currency code. Only USD is supported.
- `interruptible`, PriceBand
  - `price_per_gpu_hour`, Money, required
    - `amount_minor`, integer (int64), required: Amount in minor units (cents for USD).
    - `currency`, MoneyCurrency, required: ISO 4217 currency code. Only USD is supported.
  - `low`, Money, required
    - `amount_minor`, integer (int64), required: Amount in minor units (cents for USD).
    - `currency`, MoneyCurrency, required: ISO 4217 currency code. Only USD is supported.
  - `high`, Money, required
    - `amount_minor`, integer (int64), required: Amount in minor units (cents for USD).
    - `currency`, MoneyCurrency, required: ISO 4217 currency code. Only USD is supported.
- `confidence`, PriceConfidence
- `basis`, PriceBasis
  - `gpu_class`, GpuClass, required: Legion's canonical class of a GPU model: one of `b300`, `b200`, `gh200`, `h200`, `h100-sxm`, `h100-pcie`, `h100-nvl`, `a100-80gb`, `a100-40gb`, `l40s`, `l40`, `l4`, `a10`, `a40`, `a6000`, `rtx-6000-ada`, `rtx-pro-6000`, `rtx-5090`, `rtx-4090`, `rtx-3090`, `v100`, `mi300x`, or `other-<slug of the model>` for a model that matches none of them. Derived from the model name and the GPU memory, so hosts of one class are comparable for pricing.
  - `legion_listings`, integer, required: Approved, listed Legion hosts of the class whose prices were counted.
  - `legion_gpu_hours_30d`, number (double), required: GPU-hours of the class rented on Legion in the last 30 days.
  - `utilization_7d`, number (double): The class's average share of listed GPUs that were rented over 7 days. Absent without snapshots.
  - `sources`, array of PriceSource, required: The external sources the anchor used, with when each was observed.
    - `source`, string, required
    - `source_kind`, PriceSourceKind, required
    - `as_of`, string (date-time), required: When the source's price was observed.
  - `kind`, PriceBasisKind: `exact`: the host's own GPU class had enough data (marketplace prices, Legion rentals, listings). `similar`: it had too little, so the price follows similar GPU classes of the same vendor (same architecture first, then nearest by performance and memory), scaled to this GPU, with a wider range and `low` confidence. Absent in rows stored before; read as `exact`.
  - `similar_models`, array of PriceSimilarModel: With `kind` `similar`: the similar GPU classes the price was derived from, nearest first. Absent with `kind` `exact`.
    - `gpu_class`, GpuClass, required: Legion's canonical class of a GPU model: one of `b300`, `b200`, `gh200`, `h200`, `h100-sxm`, `h100-pcie`, `h100-nvl`, `a100-80gb`, `a100-40gb`, `l40s`, `l40`, `l4`, `a10`, `a40`, `a6000`, `rtx-6000-ada`, `rtx-pro-6000`, `rtx-5090`, `rtx-4090`, `rtx-3090`, `v100`, `mi300x`, or `other-<slug of the model>` for a model that matches none of them. Derived from the model name and the GPU memory, so hosts of one class are comparable for pricing.
    - `weight`, number (double), required: This class's share of the average. Closer classes weigh more; the shares add up to 1.
    - `price_scale`, number (double), required: The factor its prices were multiplied by to get this GPU's, from the ratio of performance (70%) and memory (30%) of the two GPUs, between 0.5 and 2.
    - `on_demand_price_per_gpu_hour`, Money, required: The recommended on-demand price of that class itself, before scaling.
  - `spec`, array of PriceSpecAxis: The machine spec factor: what the host provisions per GPU against the median of its GPU class, one entry per resource (`cpu`, `memory`, `disk`, `pcie`, `nvlink`, in that order), always all five for a host's recommendation. Absent in recommendations without a host and in rows stored before.
    - `resource`, string, required
    - `unit`, string, required: The unit of `host_value` and `class_median`: `cores` (effective cores, physical cores plus a quarter of the other threads), `GiB` (RAM, disk), `lane-gen units` (PCIe, 2^(generation - 1) x lanes of the narrowest GPU link) or `links` (NVLink, of the GPU with the fewest).
    - `host_value`, number (double): The host's value per GPU. Absent when the host does not report it.
    - `class_median`, number (double): The median over the class's approved hosts. Absent when fewer than 2 hosts of the class report it.
    - `adjustment`, number (double), required: The share by which this resource moves the price, e.g. -0.0612; 0 when the axis is not known.
    - `below_minimum`, boolean, required: True when the host has fewer than 4 effective CPU cores per GPU, or less RAM per GPU than each GPU's own memory: renters see it as a bottleneck. It is a flag; the price moves by the same rule as any other value.
    - `known`, boolean, required: Whether the axis was priced. False when the host does not report the value or fewer than 2 hosts of the class do; then it does not move the price.
  - `spec_adjustment`, number (double): The sum of the axes' `adjustment`, e.g. -0.0612 for 6.12% less: the share by which the machine spec moves the price. Between -0.2 and 0.2. Present with `spec`.
  - `normalized_sources`, integer: How many of the external sources stated the machine spec of their offers (`ExternalPriceObservation.bundle`) and had their prices adjusted to the class's median spec before the anchor. Absent in rows stored before.
- `explanation`, array of string, required: Short lines saying how the price came about, as printable text.
- `computed_at`, string (date-time), required
- `auto_pricing_enabled`, boolean: Whether Legion's auto pricing ("Let Legion decide") is on platform-wide. While it is off (the admins' kill switch), auto-priced hosts keep their prices and a switch to `auto` is refused (409 `auto_pricing_disabled`). Always present in answers since.

Example:

```json
{
  "available": false,
  "on_demand": {
    "price_per_gpu_hour": {
      "amount_minor": 250,
      "currency": "USD"
    },
    "low": {
      "amount_minor": 250,
      "currency": "USD"
    },
    "high": {
      "amount_minor": 250,
      "currency": "USD"
    }
  },
  "interruptible": {
    "price_per_gpu_hour": {
      "amount_minor": 250,
      "currency": "USD"
    },
    "low": {
      "amount_minor": 250,
      "currency": "USD"
    },
    "high": {
      "amount_minor": 250,
      "currency": "USD"
    }
  },
  "confidence": "low",
  "basis": {
    "gpu_class": "h100-sxm",
    "legion_listings": 0,
    "legion_gpu_hours_30d": 0,
    "utilization_7d": 0,
    "sources": [
      {
        "source": "vast-ai",
        "source_kind": "api",
        "as_of": "2026-10-15T12:00:00Z"
      }
    ],
    "kind": "exact",
    "similar_models": [
      {
        "gpu_class": "h100-sxm",
        "weight": 0,
        "price_scale": 0,
        "on_demand_price_per_gpu_hour": {
          "amount_minor": 250,
          "currency": "USD"
        }
      }
    ],
    "spec": [
      {
        "resource": "cpu",
        "unit": "string",
        "host_value": 0,
        "class_median": 0,
        "adjustment": 0,
        "below_minimum": false,
        "known": false
      }
    ],
    "spec_adjustment": -0.2,
    "normalized_sources": 0
  },
  "explanation": [
    "string"
  ],
  "computed_at": "2026-10-15T12:00:00Z",
  "auto_pricing_enabled": false
}
```

### 401

Missing, unknown, expired or revoked credentials.

### 403

The caller lacks the permission this operation requires (`forbidden`),
or signed in without having joined an organization yet
(`no_organization`; `getOnboarding` and the invitation and
organization operations under it work), or could not sign in
(`email_unverified`, `account_conflict`, and `domain_not_allowed`). `not_invited` is no longer returned to
session tokens.

`access_not_approved`: a signed-in person who is not approved
for the beta yet. Every operation that takes a credential answers it to
them, except `getMe` and `joinMyWaitlist`; the problem carries
`access` (`waitlisted` or `not_requested`, and the email). Approved
means a member of an organization, holding a pending invitation, or Legion; an API key always belongs to a member.

`oauth_token_mcp_only`: the caller sent an OAuth access token (`lgo_`), which is accepted
only by `mcpMessage` and the tool calls it dispatches. Every other operation answers it, whatever
the token's scope. Use an API key or the Legion web app.

`org_suspended`: the caller's organization is suspended. Every operation that takes a
credential answers it, by session or API key, except `getMe` (which shows `org.suspended_at` and
`org.suspension_reason`) and the support operations under `/v1/support/`.

`terms_not_accepted`: an approved caller who has not accepted
the current version of the Terms of Use and the Acceptable Use Policy. Every operation that takes a credential answers it, except `getMe`,
`acceptLegalDocuments`, `joinMyWaitlist` and the wind-down operations
(`listRentals`, `stopRental`, `deleteRental`, `listHosts`,
`updateListing` with `listed` false, `removeHost`); the problem
carries `legal`. An API key acts for the person who created it, so it
is refused until that person accepts. Terminal
operations also return
`session_required` (called with an API key) and `step_up_required`
(neither a sign-in nor a step-up challenge within the step-up window).

### 404

The resource does not exist or belongs to another organization.

### 500

An unexpected server error. Safe to retry.

## Errors

- 403 [`no_organization`](https://legion.ambient.xyz/docs/errors#no_organization)

## Example request

```sh
curl -s "https://api.legion.ambient.xyz/v1/hosts/$HOST_ID/price-recommendation" \
  -H "Authorization: Bearer $LEGION_API_KEY"
```
