# List a service's replicas

> GET /v1/services/{service_id}/replicas. The service's live and warm replicas, newest first; include_retired=true adds those retired in the last 7 days with the reason.

Source: https://legion.ambient.xyz/docs/api/services/list-service-replicas

`GET https://api.legion.ambient.xyz/v1/services/{service_id}/replicas`

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

The service's live and warm replicas, newest first; `include_retired=true` adds those retired in the last
7 days with the reason. A replica is a rental of the organization that only the autoscaler manages: the
rental operations that change it answer 409 `rental_managed_by_service`. Needs `services.read`.

## Path parameters

- `service_id`, string (uuid), required

## Query parameters

- `include_retired`, boolean
- `cursor`, string: Opaque cursor from a previous page's `next_cursor`.
- `limit`, integer

## Responses

### 200

A page of replicas.

- `items`, array of ServiceReplica, required
  - `rental_id`, string (uuid), required
  - `rental_name`, string, required
  - `phase`, ServiceReplicaPhase, required
  - `rental_state`, string, required
  - `ready`, boolean, required: The router's health probe passed in the last 15 seconds.
  - `ready_at`, string (date-time), required
  - `host`, ServiceReplicaHost, required
    - `name`, string, required
    - `country`, string, required
    - `gpu_model`, string, required
  - `gpu_count`, integer, required
  - `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.
  - `tier`, RentalTier, required: The kind of rental. `on_demand`: the host's `price_per_gpu_hour`; never stopped for another rental. `interruptible`: a bid on the host's spot auction, above the host's floor `interruptible_price_per_gpu_hour`, on GPUs no on-demand rental needs: an on-demand rental on the same host that needs its GPUs stops it, with the stop of the container (after a 5-minute notice, `preempt_at`, on hosts whose agent supports it; the notice is also written to `/workspace/.legion/preemption.json`), and it ends `stopped` with `stop_reason` `preempted` and its workspace kept (billed as storage, and started again by itself with `auto_resume`), or deleted when it chose `interruption_behavior` `delete`. The on-demand price is fixed for the rental. An interruptible rental is a bid on the host's spot auction: it pays the clearing price, which moves every 2 minutes between the host's floor and the rental's `max_price_per_gpu_hour`, and a higher bid can also stop it (`stop_reason` `outbid`) with the same notice.
  - `in_flight`, integer: Requests in flight, as the router last reported.
  - `created_at`, string (date-time), required
  - `retire_reason`, string, required
  - `current_template`, boolean, required: False while a rolling change has not replaced this replica yet.
  - `startup`, Startup: . How far the replica's start has come: its rental's steps, after `finding_host` (done when the replica was placed), and `receiving_traffic` once the router's health probe passed (`ready_at`). Absent for a replica whose rental has no recorded steps (created before).
  - `failure`, ServeFailure: . Why the replica's model service last failed, when its host's agent said; also on a retired replica.
- `next_cursor`, string, required

Example:

```json
{
  "items": [
    {
      "rental_id": "0192f1a2-7c3d-7e4f-8a9b-0c1d2e3f4a5b",
      "rental_name": "string",
      "phase": "active",
      "rental_state": "string",
      "ready": false,
      "ready_at": "2026-10-15T12:00:00Z",
      "host": {
        "name": "string",
        "country": "string",
        "gpu_model": "string"
      },
      "gpu_count": 0,
      "price_per_gpu_hour": {
        "amount_minor": 250,
        "currency": "USD"
      },
      "tier": "on_demand",
      "in_flight": 0,
      "created_at": "2026-10-15T12:00:00Z",
      "retire_reason": "string",
      "current_template": false,
      "startup": {
        "steps": [
          {
            "started_at": "2026-10-15T12:00:00Z",
            "ended_at": "2026-10-15T12:00:00Z",
            "reason": "string",
            "detail": "string"
          }
        ]
      },
      "failure": {
        "reason": "string",
        "message": "string",
        "reported_at": "2026-10-15T12:00:00Z"
      }
    }
  ],
  "next_cursor": "string"
}
```

### 400

The request is malformed or fails validation. An image reference that
is not a container image reference answers `invalid_image_reference`.

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