> ## Documentation Index
> Fetch the complete documentation index at: https://docs.scalacomputing.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Models

> Model catalog and discovery

Model catalog and discovery

## Endpoints

| Method | Path                                 | Description           |
| ------ | ------------------------------------ | --------------------- |
| GET    | `/api/v1/models`                     | List available models |
| GET    | `/api/v1/models/{model_id}`          | Get model details     |
| GET    | `/api/v1/models/{model_id}/versions` | List model versions   |

***

## List available models

<span class="api-method api-method-get">GET</span> `/api/v1/models`

### Parameters

| Name     | In    | Type    | Required | Description                                                            |
| -------- | ----- | ------- | -------- | ---------------------------------------------------------------------- |
| `limit`  | query | integer | No       | -                                                                      |
| `next`   | query | string  | No       | Opaque cursor token to fetch results after a specific item             |
| `type`   | query | string  | No       | Filter by model type (comma-separated for multiple)                    |
| `vendor` | query | string  | No       | Filter by vendor identifier                                            |
| `search` | query | string  | No       | Full-text search across name and description fields (case-insensitive) |

### Responses

**200** - List of models

```json theme={null}
{
  "models": [
    {
      "compatibility": null,
      "id": "string",
      "latestVersion": "string",
      "model": "string",
      "name": "string",
      "status": "...",
      "type": "...",
      "vendor": null
    }
  ],
  "pagination": {
    "count": 1,
    "hasMore": true,
    "nextCursor": "string"
  }
}
```

***

## Get model details

<span class="api-method api-method-get">GET</span> `/api/v1/models/{model_id}`

### Parameters

| Name       | In    | Type   | Required | Description                                              |
| ---------- | ----- | ------ | -------- | -------------------------------------------------------- |
| `model_id` | path  | string | Yes      | -                                                        |
| `version`  | query | string | No       | Specific version to retrieve (defaults to latest stable) |

### Responses

**200** - Model details in ComponentDeclaration format - copy-paste ready for configuration components array

```json theme={null}
{
  "allowedComponents": [
    "string"
  ],
  "components": [
    {
      "count": 4,
      "group": null,
      "model": "ScalaSwitch",
      "name": "spine-1",
      "parentApplicationName": null,
      "type": "switch",
      "version": "3.2.1"
    }
  ],
  "model": "ScalaSwitch",
  "name": "spine-switch-1",
  "trafficType": "chakra",
  "type": "switch",
  "typedParameters": {},
  "version": "3.2.1"
}
```

**404** - Model not found

***

## List model versions

<span class="api-method api-method-get">GET</span> `/api/v1/models/{model_id}/versions`

### Parameters

| Name       | In   | Type   | Required | Description |
| ---------- | ---- | ------ | -------- | ----------- |
| `model_id` | path | string | Yes      | -           |

### Responses

**200** - List of versions

```json theme={null}
{
  "id": "string",
  "model": "string",
  "versions": [
    {
      "compatibility": null,
      "status": "...",
      "version": "string"
    }
  ]
}
```

***
