# A host's benchmark runs, newest first

> GET /v1/hosts/{host_id}/benchmarks. The provider's history of its host's benchmarks: each run as Legion kept it, with what was verified and what was flagged.

Source: https://legion.ambient.xyz/docs/api/hosts/list-host-benchmarks

`GET https://api.legion.ambient.xyz/v1/hosts/{host_id}/benchmarks`

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

The provider's history of its host's benchmarks: each run as Legion kept it, with what was
verified and what was flagged. At most 60 runs, the last 90 days.

## Path parameters

- `host_id`, string (uuid), required

## Responses

### 200

The runs.

- `items`, array of HostBenchmark, required
  - `run_id`, string (uuid), required
  - `measured_at`, string (date-time), required
  - `network_measured_at`, string (date-time): When the bandwidth figures (`download_mbps`, `upload_mbps`, `edge_download_mbps`, `edge_upload_mbps`) were measured: the newest run that measured any of them. Absent when none is shown, and in the list of runs (listHostBenchmarks), where each item is one run.
  - `network_skipped_reason`, string: Why this run (`run_id`) has no bandwidth figures, or no control-plane or no edge figures; absent when it measured both. `run_interval`: the host already ran a benchmark in the last 6 hours and no new request was made since, so the control plane and the edge refused the transfers. `daily_bytes`: the host used its control-plane transfer budget for the day. `edge_daily_runs`: it used its 4 edge runs for the day. `edge_run_over`: the run was more than 15 minutes old when it asked for an edge token. `edge_unavailable`: the edge test is not configured. `agent_skipped`: nothing was refused and nothing reached Legion, so the agent did not try. New values may be added.
  - `download_mbps`, BenchmarkValue
    - `value`, number (double), required
    - `verified`, boolean, required: True when Legion measured it itself (network bandwidth through its own listener, or through its edge Worker with a signed receipt); false when the host reported it.
  - `upload_mbps`, BenchmarkValue
    - `value`, number (double), required
    - `verified`, boolean, required: True when Legion measured it itself (network bandwidth through its own listener, or through its edge Worker with a signed receipt); false when the host reported it.
  - `control_plane_rtt_ms`, BenchmarkValue
    - `value`, number (double), required
    - `verified`, boolean, required: True when Legion measured it itself (network bandwidth through its own listener, or through its edge Worker with a signed receipt); false when the host reported it.
  - `edge_download_mbps`, BenchmarkValue
    - `value`, number (double), required
    - `verified`, boolean, required: True when Legion measured it itself (network bandwidth through its own listener, or through its edge Worker with a signed receipt); false when the host reported it.
  - `edge_upload_mbps`, BenchmarkValue
    - `value`, number (double), required
    - `verified`, boolean, required: True when Legion measured it itself (network bandwidth through its own listener, or through its edge Worker with a signed receipt); false when the host reported it.
  - `edge_location`, BenchEdgeLocation: Where the edge bandwidth test was served, as Cloudflare places the request.
    - `colo`, string, required: Cloudflare's location code, an IATA airport code such as LHR.
    - `city`, string
    - `country`, string: ISO 3166-1 alpha-2, as Cloudflare reports it.
  - `disk_read_mbps`, BenchmarkValue
    - `value`, number (double), required
    - `verified`, boolean, required: True when Legion measured it itself (network bandwidth through its own listener, or through its edge Worker with a signed receipt); false when the host reported it.
  - `disk_write_mbps`, BenchmarkValue
    - `value`, number (double), required
    - `verified`, boolean, required: True when Legion measured it itself (network bandwidth through its own listener, or through its edge Worker with a signed receipt); false when the host reported it.
  - `disk_read_range`, BenchmarkRange: The slowest and fastest of a disk figure's runs; its median is the figure itself.
    - `min`, number (double), required
    - `max`, number (double), required
    - `runs`, integer: How many runs; absent when the agent did not say.
  - `disk_write_range`, BenchmarkRange: The slowest and fastest of a disk figure's runs; its median is the figure itself.
    - `min`, number (double), required
    - `max`, number (double), required
    - `runs`, integer: How many runs; absent when the agent did not say.
  - `disk_cache_suspected`, boolean, required: The disk reads may include the hypervisor's cache: the agent said so, or the disk is `virtual` and reads more than 3 times faster than it writes. Informational: the figures stand and nothing is flagged. Setting the virtual disk's cache mode to none gives true figures.
  - `disk_randread_iops`, BenchmarkValue
    - `value`, number (double), required
    - `verified`, boolean, required: True when Legion measured it itself (network bandwidth through its own listener, or through its edge Worker with a signed receipt); false when the host reported it.
  - `disk_randwrite_iops`, BenchmarkValue
    - `value`, number (double), required
    - `verified`, boolean, required: True when Legion measured it itself (network bandwidth through its own listener, or through its edge Worker with a signed receipt); false when the host reported it.
  - `latency`, array of RegionLatency, required
    - `region`, LatencyRegion, required: The reference regions agents measure round trips to: TCP connects to each region's public EC2 API endpoint, the median of 5.
    - `rtt_ms`, number (double), required
  - `flags`, array of string, required: What looked wrong: `net_claim_mismatch` (the agent claimed a download more than 20% above what Legion measured; an upload claim never flags), `disk_implausible` (faster sequential throughput than the disk type can have), `disk_iops_implausible` (more random I/O operations per second than the disk type can do), `latency_impossible` (round trips that break the triangle inequality between regions), `location_mismatch` (the declared country is on another continent than the region the host is near), `hw_inconsistent` (a compute capability the GPU model does not have), `edge_claim_mismatch` (the agent claimed more than 20% above the edge bandwidth on the Worker's receipt), `edge_receipt_invalid` (an edge receipt that is not the Worker's, or not for this host and run). A bandwidth flag voids only the direction that mismatched (`claim_mismatches`); the edge upload never flags. A run kept before has no `claim_mismatches`, and its bandwidth flag voids both directions of its group.
  - `claim_mismatches`, array of BenchmarkClaimMismatch: The bandwidth figures the agent claimed more than 20% above what Legion measured, so the provider sees both numbers. `flag` is the flag it raised; absent for `edge_upload`, which is only noted: the edge Worker reads an upload as Cloudflare hands it the body, so its figure can fall well short of the line, and the line upload is then the higher of the edge and control-plane figures.
    - `metric`, string, required: `download` and `upload` are to the control plane, `edge_download` and `edge_upload` to `edge_location`.
    - `claimed_mbps`, number (double), required: What the host's agent measured.
    - `measured_mbps`, number (double), required: What Legion's server or edge Worker measured for the same run.
    - `flag`, string

Example:

```json
{
  "items": [
    {
      "run_id": "0192f1a2-7c3d-7e4f-8a9b-0c1d2e3f4a5b",
      "measured_at": "2026-10-15T12:00:00Z",
      "network_measured_at": "2026-10-15T12:00:00Z",
      "network_skipped_reason": "string",
      "download_mbps": {
        "value": 0,
        "verified": false
      },
      "upload_mbps": {
        "value": 0,
        "verified": false
      },
      "control_plane_rtt_ms": {
        "value": 0,
        "verified": false
      },
      "edge_download_mbps": {
        "value": 0,
        "verified": false
      },
      "edge_upload_mbps": {
        "value": 0,
        "verified": false
      },
      "edge_location": {
        "colo": "string",
        "city": "string",
        "country": "string"
      },
      "disk_read_mbps": {
        "value": 0,
        "verified": false
      },
      "disk_write_mbps": {
        "value": 0,
        "verified": false
      },
      "disk_read_range": {
        "min": 0,
        "max": 0,
        "runs": 1
      },
      "disk_write_range": {
        "min": 0,
        "max": 0,
        "runs": 1
      },
      "disk_cache_suspected": false,
      "disk_randread_iops": {
        "value": 0,
        "verified": false
      },
      "disk_randwrite_iops": {
        "value": 0,
        "verified": false
      },
      "latency": [
        {
          "region": "us-west-2",
          "rtt_ms": 0
        }
      ],
      "flags": [
        "string"
      ],
      "claim_mismatches": [
        {
          "metric": "download",
          "claimed_mbps": 0,
          "measured_mbps": 0,
          "flag": "string"
        }
      ]
    }
  ]
}
```

### 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/benchmarks" \
  -H "Authorization: Bearer $LEGION_API_KEY"
```
