# Progress of a host's first benchmark

> GET /v1/hosts/{host_id}/first-benchmark. Where the host's first benchmark stands and, once it completed, how Legion judged it.

Source: https://legion.ambient.xyz/docs/api/hosts/get-host-first-benchmark

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

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

Where the host's first benchmark stands and, once it completed, how Legion judged it. Cheap
enough to poll every 2 to 3 seconds (`poll_after_seconds`); Legion does not stream. Another
organization's host and a removed host are 404. Needs the `hosts.manage` permission.

## Path parameters

- `host_id`, string (uuid), required

## Responses

### 200

The progress.

- `state`, string, required
- `visibility`, ListingVisibility, required: Whether renters can find a host, as far as `listed` and the benchmark gate decide. See `Listing.visibility`.
- `requested_at`, string (date-time): When the run was queued. Absent when none is pending.
- `started_at`, string (date-time): When the agent first reported the run in progress. Present while `running`.
- `completed_at`, string (date-time): When the first run was kept (`Listing.first_benchmark_at`).
- `host_busy`, boolean, required: The host serves a rental now, so a queued run waits for it.
- `phases`, array of FirstBenchmarkPhase, required
  - `phase`, string, required
  - `status`, string, required
- `review`, FirstBenchmarkReview: How Legion judged the completed first run, present when `state` is `completed`. `listed`: nothing flagged, the host is offered (when listed). `under_review`: the host is not approved, is quarantined, or its benchmark carries a flag (`reason`: `pending_approval`, `quarantined`, or the flag code such as `net_claim_mismatch`), and an operator looks at it. `message` is plain words for the provider.
  - `outcome`, string, required
  - `reason`, string
  - `message`, string
- `failure`, FirstBenchmarkFailure: Present when `state` is `failed`. The provider re-runs it themselves with `requestHostBenchmark`.
  - `message`, string, required
  - `rerun`, object, required
    - `operation_id`, string, required
    - `method`, string, required
    - `path`, string, required: The path of the request, with the host's ID filled in.
    - `benchmark_request`, HostBenchmarkRequest, required: The state of a host's request for a new benchmark run, on the host reads. `state`: `scheduled` (asked, waiting for the host to be idle: no rental, two idle syncs in a row; a run never starts during a rental, and a rental that arrives cancels a run in progress, which is asked for again), `running` (the agent reported a run in progress in the last 2 minutes), `done` (the last request of the provider was fulfilled at `completed_at`); absent when nothing was requested. The request survives agent restarts, rentals and controller deploys: it stays until the runs it asked for arrive. A provider may make `requests_per_day` requests in any rolling 24 hours; `remaining_requests` are left, and when none is, `next_available_at` is when the oldest of the requests in the window leaves it.
      - `state`, string
      - `requested_at`, string (date-time)
      - `completed_at`, string (date-time)
      - `host_busy`, boolean, required: The host serves a rental now, so a scheduled run waits for it.
      - `remaining_requests`, integer, required
      - `requests_per_day`, integer, required
      - `next_available_at`, string (date-time)
      - `message`, string: Plain words for the provider about a scheduled or running request.
- `poll_after_seconds`, integer, required: How long to wait before asking again.

Example:

```json
{
  "state": "not_started",
  "visibility": "not_listed",
  "requested_at": "2026-10-15T12:00:00Z",
  "started_at": "2026-10-15T12:00:00Z",
  "completed_at": "2026-10-15T12:00:00Z",
  "host_busy": false,
  "phases": [
    {
      "phase": "network",
      "status": "pending"
    }
  ],
  "review": {
    "outcome": "listed",
    "reason": "string",
    "message": "string"
  },
  "failure": {
    "message": "string",
    "rerun": {
      "operation_id": "requestHostBenchmark",
      "method": "POST",
      "path": "/v1/hosts/6f1c2b1e-0000-4000-8000-000000000000/benchmark-request",
      "benchmark_request": {
        "state": "scheduled",
        "requested_at": "2026-10-15T12:00:00Z",
        "completed_at": "2026-10-15T12:00:00Z",
        "host_busy": false,
        "remaining_requests": 0,
        "requests_per_day": 1,
        "next_available_at": "2026-10-15T12:00:00Z",
        "message": "string"
      }
    }
  },
  "poll_after_seconds": 1
}
```

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