> 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.

# Get VirtualModel

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

Get a VirtualModel by workspace and name.

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

## Request

### Path parameters

- `workspace` (string, required)
- `name` (string, required)

## Response

### 200

VirtualModel details

- `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)

## Examples

**Response**

```json
{
  "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"
}
```

**SDK Code**

```python
import requests

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

response = requests.get(url)

print(response.json())
```

```javascript
const url = 'https://api.example.com/apis/inference-gateway/v2/workspaces/workspace/virtual-models/name';
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/name"

	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/name")

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/name")
  .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/name');

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

```csharp
using RestSharp;

var client = new RestClient("https://api.example.com/apis/inference-gateway/v2/workspaces/workspace/virtual-models/name");
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/name")! 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()
```