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

# List Model Cards

GET https://api.hiddenlayer.ai/models/v4/cards

Reference: https://hiddenlayer.ferndocs.com/api-reference/llm-proxy-api/models/cards/list-v-3

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Servers

- `https://api.hiddenlayer.ai` (ProdUs, default)
- `https://api.eu.hiddenlayer.ai` (ProdEu)

## Request

### Query parameters

- `model_name` (ModelsV4CardsGetParametersModelName, optional) — substring match on model name
- `model_created` (ModelsV4CardsGetParametersModelCreated, optional) — match on models created between dates
- `aidr_severity` (list of enum, optional, deprecated) — Deprecated - use ModelCardAIDRThreatLevel(aidr_threat_level) instead
  - Allowed values: `SAFE`, `UNSAFE`, `SUSPICIOUS`
- `aidr_status` (enum, optional, default: ANY) — filter by aidr enabled
  - Allowed values: `ENABLED`, `DISABLED`, `ANY`
- `modscan_severity` (list of ModelsV4CardsGetParametersModscanSeveritySchemaItems, optional)
- `policy_status` (list of enum, optional)
  - Allowed values: `COMPLIANT`, `NONCOMPLIANT`
- `modscan_status` (enum, optional, default: ANY)
  - Allowed values: `ENABLED`, `DISABLED`, `ANY`
- `source` (ModelsV4CardsGetParametersSource, optional) — substring and full match on model source
- `provider` (list of enum, optional, default: ["AZURE","ADHOC"])
  - Allowed values: `AZURE`, `ADHOC`
- `limit` (integer, optional, default: 25) — Limit the number of items returned
- `offset` (integer, optional, default: 0) — Begin returning the results from this offset
- `sort` (string, optional, default: -created_at) — allow sorting by model name or created at timestamp, ascending (+) or the default descending (-)

## Response

### 200

Successful response

- `total_count` (integer, required)
- `page_size` (integer, required)
- `page_number` (integer, required)
- `results` (list of ModelCardV4QueryResponseResultsItems, required)

## Errors

### 400 Bad Request Error

The request failed due to a client error, with one or more of the following possible causes: 1. The request required a tenant_id field, which was missing. 2. The request was malformed syntactically or semantically.

- `any`

## Types

### ModelsV4CardsGetParametersModelName

- `contains` (string, optional)
- `eq` (string, optional)

### ModelsV4CardsGetParametersModelCreated

- `lte` (datetime, optional)
- `gte` (datetime, optional)

### ModelsV4CardsGetParametersModscanSeveritySchemaItems

### ModelsV4CardsGetParametersSource

- `contains` (string, optional)
- `eq` (string, optional)

### ModelCardV4QueryResponseResultsItems

- `model_id` (string, required)
- `created_at` (long, required) — Unix Nano Epoch Timestamp
- `plaintext_name` (string, required)
- `source` (string, required)
- `attack_monitoring_threat_level` (enum, required)
  - Allowed values: `safe`, `unsafe`, `suspicious`, `not available`
- `active_version_count` (integer, required)
- `has_genealogy` (boolean, required) — A value of `true` indicates that one or more versions of this model have associated model genealogy information.
- `model_scan_severity` (enum, required) — The severity of the model's latest scan
  - Allowed values: `not available`, `critical`, `high`, `medium`, `low`, `none`, `unknown`
- `model_scan_threat_level` (enum, required, deprecated)
  - Allowed values: `safe`, `unsafe`, `suspicious`, `not available`
- `tags` (map from string to any, optional)
- `aidr_threat_level` (enum, optional)
  - Allowed values: `high`, `medium`, `low`, `none`, `not available`
- `security_posture` (SecurityPosture, optional)
- `model_scan_has_error` (boolean, optional) — True if the model's latest scan has an error
- `policy_status` (enum, optional) — The status of the model's compliance with regard to any policies. A trailing asterisk indicates the model's status has been overridden.
  - Allowed values: `COMPLIANT`, `COMPLIANT*`, `NONCOMPLIANT`, `NONCOMPLIANT*`
- `latest_scan_id` (string, optional) — The ID of the most recent model scanner scan for this model's latest version. Absent if no scan has been run.

### SecurityPosture

- `model_scan` (boolean, optional)
- `attack_monitoring` (boolean, optional)

## Examples

**Response**

```json
{
  "total_count": 1,
  "page_size": 1,
  "page_number": 1,
  "results": [
    {
      "model_id": "string",
      "created_at": 1,
      "plaintext_name": "Resnet-50",
      "source": "azure:datascience-workspace",
      "attack_monitoring_threat_level": "safe",
      "active_version_count": 1,
      "has_genealogy": true,
      "model_scan_severity": "not available",
      "model_scan_threat_level": "safe",
      "tags": {},
      "aidr_threat_level": "high",
      "security_posture": {
        "model_scan": true,
        "attack_monitoring": true
      },
      "model_scan_has_error": true,
      "policy_status": "COMPLIANT",
      "latest_scan_id": "string"
    }
  ]
}
```

**SDK Code**

```python
import requests

url = "https://api.hiddenlayer.ai/models/v4/cards"

querystring = {"model_name":"{\"eq\":\"My_Example_Model\"}","model_created":"{\"lteExample\":{\"summary\":{\"value\":{\"lte\":\"2024-10-04T00:01:02.003Z\"}}},\"gteExample\":{\"summary\":{\"value\":{\"gte\":\"2024-10-04T00:01:02.003Z\"}}}}","source":"{\"containsExample\":{\"summary\":{\"value\":{\"contains\":\"azure\"}}},\"eqExample\":{\"summary\":{\"value\":{\"eq\":\"adhoc\"}}}}"}

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers, params=querystring)

print(response.json())
```

```javascript
const url = 'https://api.hiddenlayer.ai/models/v4/cards?model_name=%7B%22eq%22%3A%22My_Example_Model%22%7D&model_created=%7B%22lteExample%22%3A%7B%22summary%22%3A%7B%22value%22%3A%7B%22lte%22%3A%222024-10-04T00%3A01%3A02.003Z%22%7D%7D%7D%2C%22gteExample%22%3A%7B%22summary%22%3A%7B%22value%22%3A%7B%22gte%22%3A%222024-10-04T00%3A01%3A02.003Z%22%7D%7D%7D%7D&source=%7B%22containsExample%22%3A%7B%22summary%22%3A%7B%22value%22%3A%7B%22contains%22%3A%22azure%22%7D%7D%7D%2C%22eqExample%22%3A%7B%22summary%22%3A%7B%22value%22%3A%7B%22eq%22%3A%22adhoc%22%7D%7D%7D%7D';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

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.hiddenlayer.ai/models/v4/cards?model_name=%7B%22eq%22%3A%22My_Example_Model%22%7D&model_created=%7B%22lteExample%22%3A%7B%22summary%22%3A%7B%22value%22%3A%7B%22lte%22%3A%222024-10-04T00%3A01%3A02.003Z%22%7D%7D%7D%2C%22gteExample%22%3A%7B%22summary%22%3A%7B%22value%22%3A%7B%22gte%22%3A%222024-10-04T00%3A01%3A02.003Z%22%7D%7D%7D%7D&source=%7B%22containsExample%22%3A%7B%22summary%22%3A%7B%22value%22%3A%7B%22contains%22%3A%22azure%22%7D%7D%7D%2C%22eqExample%22%3A%7B%22summary%22%3A%7B%22value%22%3A%7B%22eq%22%3A%22adhoc%22%7D%7D%7D%7D"

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

	req.Header.Add("Authorization", "Bearer <token>")

	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.hiddenlayer.ai/models/v4/cards?model_name=%7B%22eq%22%3A%22My_Example_Model%22%7D&model_created=%7B%22lteExample%22%3A%7B%22summary%22%3A%7B%22value%22%3A%7B%22lte%22%3A%222024-10-04T00%3A01%3A02.003Z%22%7D%7D%7D%2C%22gteExample%22%3A%7B%22summary%22%3A%7B%22value%22%3A%7B%22gte%22%3A%222024-10-04T00%3A01%3A02.003Z%22%7D%7D%7D%7D&source=%7B%22containsExample%22%3A%7B%22summary%22%3A%7B%22value%22%3A%7B%22contains%22%3A%22azure%22%7D%7D%7D%2C%22eqExample%22%3A%7B%22summary%22%3A%7B%22value%22%3A%7B%22eq%22%3A%22adhoc%22%7D%7D%7D%7D")

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

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

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.hiddenlayer.ai/models/v4/cards?model_name=%7B%22eq%22%3A%22My_Example_Model%22%7D&model_created=%7B%22lteExample%22%3A%7B%22summary%22%3A%7B%22value%22%3A%7B%22lte%22%3A%222024-10-04T00%3A01%3A02.003Z%22%7D%7D%7D%2C%22gteExample%22%3A%7B%22summary%22%3A%7B%22value%22%3A%7B%22gte%22%3A%222024-10-04T00%3A01%3A02.003Z%22%7D%7D%7D%7D&source=%7B%22containsExample%22%3A%7B%22summary%22%3A%7B%22value%22%3A%7B%22contains%22%3A%22azure%22%7D%7D%7D%2C%22eqExample%22%3A%7B%22summary%22%3A%7B%22value%22%3A%7B%22eq%22%3A%22adhoc%22%7D%7D%7D%7D")
  .header("Authorization", "Bearer <token>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.hiddenlayer.ai/models/v4/cards?model_name=%7B%22eq%22%3A%22My_Example_Model%22%7D&model_created=%7B%22lteExample%22%3A%7B%22summary%22%3A%7B%22value%22%3A%7B%22lte%22%3A%222024-10-04T00%3A01%3A02.003Z%22%7D%7D%7D%2C%22gteExample%22%3A%7B%22summary%22%3A%7B%22value%22%3A%7B%22gte%22%3A%222024-10-04T00%3A01%3A02.003Z%22%7D%7D%7D%7D&source=%7B%22containsExample%22%3A%7B%22summary%22%3A%7B%22value%22%3A%7B%22contains%22%3A%22azure%22%7D%7D%7D%2C%22eqExample%22%3A%7B%22summary%22%3A%7B%22value%22%3A%7B%22eq%22%3A%22adhoc%22%7D%7D%7D%7D', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api.hiddenlayer.ai/models/v4/cards?model_name=%7B%22eq%22%3A%22My_Example_Model%22%7D&model_created=%7B%22lteExample%22%3A%7B%22summary%22%3A%7B%22value%22%3A%7B%22lte%22%3A%222024-10-04T00%3A01%3A02.003Z%22%7D%7D%7D%2C%22gteExample%22%3A%7B%22summary%22%3A%7B%22value%22%3A%7B%22gte%22%3A%222024-10-04T00%3A01%3A02.003Z%22%7D%7D%7D%7D&source=%7B%22containsExample%22%3A%7B%22summary%22%3A%7B%22value%22%3A%7B%22contains%22%3A%22azure%22%7D%7D%7D%2C%22eqExample%22%3A%7B%22summary%22%3A%7B%22value%22%3A%7B%22eq%22%3A%22adhoc%22%7D%7D%7D%7D");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.hiddenlayer.ai/models/v4/cards?model_name=%7B%22eq%22%3A%22My_Example_Model%22%7D&model_created=%7B%22lteExample%22%3A%7B%22summary%22%3A%7B%22value%22%3A%7B%22lte%22%3A%222024-10-04T00%3A01%3A02.003Z%22%7D%7D%7D%2C%22gteExample%22%3A%7B%22summary%22%3A%7B%22value%22%3A%7B%22gte%22%3A%222024-10-04T00%3A01%3A02.003Z%22%7D%7D%7D%7D&source=%7B%22containsExample%22%3A%7B%22summary%22%3A%7B%22value%22%3A%7B%22contains%22%3A%22azure%22%7D%7D%7D%2C%22eqExample%22%3A%7B%22summary%22%3A%7B%22value%22%3A%7B%22eq%22%3A%22adhoc%22%7D%7D%7D%7D")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

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