> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/nemo-platform/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.nvidia.com/nemo-platform/_mcp/server.

# List VirtualModels

GET /apis/inference-gateway/v2/workspaces/{workspace}/virtual-models

List VirtualModels for the given workspace.

Use ``workspace=-`` to list across all workspaces accessible to the caller.

Reference: https://docs.nvidia.com/nemo-platform/nemo-platform/v0.3.0/documentation/reference/api-reference/virtual-models/list-virtual-models

## Request

### Path parameters

- `workspace` (string, required)

### Query parameters

- `page` (integer, optional, default: 1) — Page number (1-indexed).
- `page_size` (integer, optional, default: 20) — Number of results per page.
- `sort` (string, optional, default: -created_at) — Sort field. Prefix with ``-`` for descending order.
- `exclude_autoprovisioned` (boolean, optional, default: false) — When true, controller-managed (autoprovisioned) passthrough VirtualModels are excluded from the results.
- `filter` (object, optional) — Filter virtual models by workspace, project, name, default_model_entity, created_at, and updated_at.
  - `workspace` (string, optional) — Filter by workspace.
  - `project` (string, optional) — Filter by project URN.
  - `name` (object or string, optional) — Filter by name.
    - StringFilter
      - `$eq` (string, optional) — Filter for results equal to this value.
      - `$like` (string, optional) — Filter for results matching this pattern.
      - `$in` (list of string, optional) — Filter for results in this list of values.
      - `$nin` (list of string, optional) — Filter for results not in this list of values.
  - `default_model_entity` (object or string, optional) — Filter by default model entity.
    - StringFilter
      - `$eq` (string, optional) — Filter for results equal to this value.
      - `$like` (string, optional) — Filter for results matching this pattern.
      - `$in` (list of string, optional) — Filter for results in this list of values.
      - `$nin` (list of string, optional) — Filter for results not in this list of values.
  - `created_at` (object, optional) — Filter by creation date.
    - `$gte` (datetime, optional) — Filter for results greater than or equal to this datetime.
    - `$lte` (datetime, optional) — Filter for results less than or equal to this datetime.
  - `updated_at` (object, optional) — Filter by update date.
    - `$gte` (datetime, optional) — Filter for results greater than or equal to this datetime.
    - `$lte` (datetime, optional) — Filter for results less than or equal to this datetime.

## Response

### 200

Paginated list of virtual models

- `data` (list of object, required)
  - `workspace` (string, required) — Workspace identifier
  - `id` (string, required)
  - `created_at` (datetime, required)
  - `created_by` (string, required, nullable)
  - `updated_at` (datetime, required)
  - `updated_by` (string, required, nullable)
  - `entity_id` (string, required) — Alias for id for backwards compatibility.
  - `parent` (string, required) — Parent entity ID for nested entities.
  - `db_version` (integer, required) — Database version of the entity for optimistic locking.
  - `name` (string, optional, default: ) — Entity name within the workspace
  - `project` (string, optional) — The name of the project associated with this entity.
  - `default_model_entity` (string, optional)
  - `autoprovisioned` (boolean, optional, default: false) — Marks this VirtualModel as controller-managed. The Models controller will delete it once no ModelProvider serves the matching entity. Setting this manually opts the VirtualModel into that cleanup behavior.
  - `models` (list of object, optional)
    - `model` (string, required)
    - `backend_format` (enum, optional, nullable) — Optional backend format override for this VirtualModel entry.
      - Allowed values: `OPENAI_CHAT`, `ANTHROPIC_MESSAGES`
  - `request_middleware` (list of object, optional, default: [])
    - `name` (string, required)
    - `config_type` (string, required)
    - `config` (map from string to any, optional)
    - `config_id` (string, optional)
  - `response_middleware` (list of object, optional, default: [])
    - `name` (string, required)
    - `config_type` (string, required)
    - `config` (map from string to any, optional)
    - `config_id` (string, optional)
  - `post_response_middleware` (list of object, optional, default: [])
    - `name` (string, required)
    - `config_type` (string, required)
    - `config` (map from string to any, optional)
    - `config_id` (string, optional)
  - `override_proxy` (string, optional)
- `pagination` (object, optional) — Pagination information.
  - `page` (integer, required) — The current page number.
  - `page_size` (integer, required) — The page size used for the query.
  - `current_page_size` (integer, required) — The size for the current page.
  - `total_pages` (integer, required) — The total number of pages.
  - `total_results` (integer, required) — The total number of results.
- `sort` (string, optional) — The field on which the results are sorted.
- `filter` (map from string to any, optional) — Filtering information.

## Examples

**Response**

```json
{
  "data": [
    {
      "workspace": "string",
      "id": "string",
      "created_at": "2024-01-15T09:30:00Z",
      "created_by": "string",
      "updated_at": "2024-01-15T09:30:00Z",
      "updated_by": "string",
      "entity_id": "string",
      "parent": "string",
      "db_version": 1,
      "name": "",
      "project": "string",
      "default_model_entity": "string",
      "autoprovisioned": false,
      "models": [
        {
          "model": "string",
          "backend_format": "OPENAI_CHAT"
        }
      ],
      "request_middleware": [
        {
          "name": "string",
          "config_type": "string",
          "config": {},
          "config_id": "string"
        }
      ],
      "response_middleware": [
        {
          "name": "string",
          "config_type": "string",
          "config": {},
          "config_id": "string"
        }
      ],
      "post_response_middleware": [
        {
          "name": "string",
          "config_type": "string",
          "config": {},
          "config_id": "string"
        }
      ],
      "override_proxy": "string"
    }
  ],
  "pagination": {
    "page": 1,
    "page_size": 1,
    "current_page_size": 1,
    "total_pages": 1,
    "total_results": 1
  },
  "sort": "string",
  "filter": {}
}
```

**SDK Code**

```python
import requests

url = "https://api.example.com/apis/inference-gateway/v2/workspaces/workspace/virtual-models"

response = requests.get(url)

print(response.json())
```

```javascript
const url = 'https://api.example.com/apis/inference-gateway/v2/workspaces/workspace/virtual-models';
const options = {method: 'GET'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.example.com/apis/inference-gateway/v2/workspaces/workspace/virtual-models"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.example.com/apis/inference-gateway/v2/workspaces/workspace/virtual-models")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.example.com/apis/inference-gateway/v2/workspaces/workspace/virtual-models")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.example.com/apis/inference-gateway/v2/workspaces/workspace/virtual-models');

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.example.com/apis/inference-gateway/v2/workspaces/workspace/virtual-models");
var request = new RestRequest(Method.GET);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "https://api.example.com/apis/inference-gateway/v2/workspaces/workspace/virtual-models")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```