# List catalog

> GET /v1/catalog. Legion's catalog: the starter images and premade models of the legion-images release Legion is pinned to, with Legion's runtime state applied.

Source: https://legion.ambient.xyz/docs/api/images/list-catalog

`GET https://api.legion.ambient.xyz/v1/catalog`

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

Legion's catalog: the starter images and premade models of the legion-images release Legion is pinned to, with Legion's runtime state applied. Entries the catalog itself hides
(`serve.hidden`, for example licence-restricted models) and entries Legion hid or disabled
(`getCatalogSettings`) are never listed. The default starter image comes first, then the other
images, then the models. Rent an entry by passing its `reference` as `createRental`'s `image`; for a
model, also pass `serve` with `port`, `kind` (= `serve.protocol`), `model` and `catalog_id` (= `id`).

With `host_id` (an offer), every entry also says whether that host can run it (`compatible`), why
not (`incompatibilities`) and, when it can, how many of its GPUs it needs (`min_gpus`). The checks
are those of `listOffers`' facets: the host's platform is one of the entry's `platforms`, its driver
version is at least `min_driver_version` and its compute capability at least
`min_compute_capability`, both compared numerically part by part; for a model, the GPUs a new
rental can take hold at least `serve.min_vram_gb` together, counting `gpu_memory_mib / 1000` GB per
GPU. A host that does not report a platform, driver version or compute capability fails that check. `listOffers` with `catalog_id` lists the hosts that can run an entry, and `createRental` refuses an
incompatible one with 409 `catalog_entry_incompatible`. The answer carries `Cache-Control: private, max-age=30`.

## Query parameters

- `host_id`, string (uuid): An offer's host ID (`listOffers`). Each entry then says whether that host can run it; a host that is not offered is 404 `not_found`.

## Responses

### 200

The catalog.

- `custom_images_enabled`, boolean, required: False when renters may only run Legion's own images, the catalog's among them.
- `entries`, array of CatalogEntry, required
  - `id`, string, required
  - `name`, string, required
  - `description`, string, required
  - `reference`, string, required: The digest-pinned image reference to pass as `createRental`'s `image`.
  - `kind`, string, required: `image`: a starter image to work in over SSH. `model`: a premade model that serves itself (`serve`).
  - `platforms`, array of string, required: The OCI platforms the image is built for (`linux/amd64`).
  - `min_driver_version`, string, required: The lowest NVIDIA driver it runs on, compared numerically part by part.
  - `min_compute_capability`, ComputeCapability, required: CUDA compute capability as `major.minor`, as `nvidia-smi --query-gpu=compute_cap` reports it (`8.0` A100, `8.9` L40S and RTX 4090, `9.0` H100 and H200, `10.0` B200). Compare numerically by major, then minor, never as a string or a float: `10.0` is above `9.0`. Reported by the agent; absent when the agent predates it or the driver is too old to answer. On a host or an offer it is the lowest across the host's GPUs.
  - `cuda`, string, required: The CUDA version in the image.
  - `size_gb`, number (double), required: The image's compressed size, in GB.
  - `default`, boolean, required: The starter image a rental runs when no other is chosen. Exactly one entry is.
  - `serve`, CatalogServe: Present on models only. How the model serves itself, and what it needs.
    - `port`, integer, required
    - `protocol`, string, required: What the server speaks; `createRental`'s `serve.kind`.
    - `modality`, string, required
    - `category`, string, required
    - `model`, string, required: The model's name, as `createRental`'s `serve.model`.
    - `min_vram_gb`, number (double), required: The GPU memory the rental's GPUs need together, in GB.
    - `recommended_vram_gb`, number (double), required
    - `weights_gb`, number (double), required
    - `license`, string, required
    - `license_url`, string, required
    - `commercial_ok`, boolean, required
    - `notice`, string
    - `kv_bytes_per_token`, integer (int64): . The KV cache one token of context takes over all layers, in bytes; absent for a model without a KV cache.
  - `compatible`, boolean: With `host_id` only. Whether that host can run the entry.
  - `incompatibilities`, array of CatalogIncompatibility: With `host_id` only. Why that host cannot run the entry; empty when it can.
    - `code`, string, required
    - `detail`, string, required: A sentence for the renter.
  - `min_gpus`, integer: With `host_id` only, when the host can run the entry. The fewest of its GPUs a rental of the entry needs: 1 for an image, enough for `serve.min_vram_gb` for a model.
  - `settings`, array of CatalogSetting: . The curated settings a model accepts as `model_settings`; absent when it accepts none.
    - `key`, string, required
    - `label`, string, required
    - `type`, string, required
    - `min`, integer (int64)
    - `max`, integer (int64)
    - `options`, array of string
    - `default`, ModelSettingValue: . An integer for an `int` setting, a boolean for a `bool` setting, one of the setting's `options` for an `enum` setting.
    - `help`, string, required
    - `memory`, CatalogSettingMemory: . How a setting changes the GPU memory the model needs: `(weights_gb + kv_bytes_per_token * context_tokens / 1e9 + sum(value * gb_per_unit) + 2) / utilization` GB over the rental's GPUs together, and never less than `min_vram_gb`. `context_tokens`: the value is the context length whose KV cache must fit. `utilization`: the value is the share of each GPU's memory the server may use. `per_unit`: each unit of the value takes `gb_per_unit` GB.
      - `role`, string, required
      - `gb_per_unit`, number (double)

Example:

```json
{
  "custom_images_enabled": false,
  "entries": [
    {
      "id": "qwen3-5-4b",
      "name": "string",
      "description": "string",
      "reference": "string",
      "kind": "image",
      "platforms": [
        "string"
      ],
      "min_driver_version": "string",
      "min_compute_capability": "9.0",
      "cuda": "string",
      "size_gb": 0,
      "default": false,
      "serve": {
        "port": 1,
        "protocol": "openai",
        "modality": "text",
        "category": "chat",
        "model": "Qwen/Qwen3.5-4B",
        "min_vram_gb": 0,
        "recommended_vram_gb": 0,
        "weights_gb": 0,
        "license": "string",
        "license_url": "string",
        "commercial_ok": false,
        "notice": "string",
        "kv_bytes_per_token": 0
      },
      "compatible": false,
      "incompatibilities": [
        {
          "code": "platform",
          "detail": "string"
        }
      ],
      "min_gpus": 1,
      "settings": [
        {
          "key": "max_model_len",
          "label": "Context length",
          "type": "int",
          "min": 0,
          "max": 0,
          "options": [
            "string"
          ],
          "default": 0,
          "help": "string",
          "memory": {
            "role": "context_tokens",
            "gb_per_unit": 0
          }
        }
      ]
    }
  ]
}
```

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