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

# List Models

GET http://localhost:8000/v1/models

List available LLM models from the configured upstream provider.

The server forwards the `Authorization` header to the upstream provider
when the request includes one.


Reference: https://docs.nvidia.com/nemo/guardrails/nemo/guardrails/reference/guardrails-api-server/models/list-models

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: NVIDIA NeMo Guardrails Library API Server
  version: 1.0.0
paths:
  /v1/models:
    get:
      operationId: list-models
      summary: List models
      description: |
        List available LLM models from the configured upstream provider.

        The server forwards the `Authorization` header to the upstream provider
        when the request includes one.
      tags:
        - subpackage_models
      responses:
        '200':
          description: OpenAI-compatible models list.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OpenAIModelsList'
        '502':
          description: The upstream provider is unreachable or returned an error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
servers:
  - url: http://localhost:8000
    description: Local Guardrails server
components:
  schemas:
    OpenAiModelObject:
      type: string
      enum:
        - model
      title: OpenAiModelObject
    OpenAIModel:
      type: object
      properties:
        id:
          type: string
          description: Model identifier.
        object:
          $ref: '#/components/schemas/OpenAiModelObject'
        created:
          type: integer
          description: Unix timestamp in seconds.
        owned_by:
          type:
            - string
            - 'null'
          description: Organization that owns the model.
      required:
        - id
        - object
        - created
      title: OpenAIModel
    OpenAIModelsList:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/OpenAIModel'
      required:
        - data
      title: OpenAIModelsList
    ErrorResponseDetail:
      oneOf:
        - type: string
        - type: object
          additionalProperties:
            description: Any type
      description: Error detail.
      title: ErrorResponseDetail
    ErrorResponse:
      type: object
      properties:
        detail:
          $ref: '#/components/schemas/ErrorResponseDetail'
          description: Error detail.
      title: ErrorResponse

```

## Examples



**Response**

```json
{
  "data": [
    {
      "id": "meta/llama-3.1-8b-instruct",
      "object": "model",
      "created": 1700000000,
      "owned_by": "system"
    }
  ]
}
```

**SDK Code**

```python success
import requests

url = "http://localhost:8000/v1/models"

response = requests.get(url)

print(response.json())
```

```javascript success
const url = 'http://localhost:8000/v1/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 success
package main

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

func main() {

	url := "http://localhost:8000/v1/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 success
require 'uri'
require 'net/http'

url = URI("http://localhost:8000/v1/models")

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

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

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

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

HttpResponse<String> response = Unirest.get("http://localhost:8000/v1/models")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'http://localhost:8000/v1/models');

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

```csharp success
using RestSharp;

var client = new RestClient("http://localhost:8000/v1/models");
var request = new RestRequest(Method.GET);
IRestResponse response = client.Execute(request);
```

```swift success
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "http://localhost:8000/v1/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()
```