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

# Get model summary

POST https://api.respan.ai/api/models/summary/
Content-Type: application/json

Returns model counts matching the filters. Anonymous counts cover managed global models; authenticated counts also include the organization's custom models.

Reference: https://respan.ai/docs/apis/models/get-model-summary

## Authentication

- `Authorization` header (bearer token, required) — Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer \<RESPAN\_API\_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan\_params.credential\_override in the request body, not in this authentication field.
- `Authorization` header (bearer token, required) — Use a dashboard JWT only for dashboard-authenticated endpoints. Respan API-key endpoints use the respanApiKey auth field instead.

## Request

### Body (application/json)

This endpoint expects an object.

- `filters` (ApiModelsSummaryPostRequestBodyContentApplicationJsonSchemaFilters, optional) — Each key is a field to filter on, and each value is a condition: `{"<field>": {"operator": "<operator>", "value": [...]}}`. A model must match every condition. To set two conditions on one field, such as a range, pass a list of conditions. **Operators:** `""` (equals, the default), `not`, `in`, `not_in`, `lt`, `lte`, `gt`, `gte`, `contains`, `not_contains`, `icontains` (ignores case), `startswith`, `not_startswith`, `endswith`, `not_endswith`, `empty`, `not_empty`. Put values in a list: `""` and `in` match any of the listed values, and `not` and `not_in` match none of them. Other operators take one value; for `empty` and `not_empty`, send `[""]`. **Fields:** `model_name`, `base_model_name`, `provider__provider_id`, `provider__provider_name`, `affiliation_category` (`custom` or `keywordsai`), `is_managed`, `status` (`active` or `deprecated`), `model_type` (`chat`, `embedding`, `image`, `video`, `rerank`, `speech` or `transcription`), `input_cost`, `output_cost`, `max_context_window`, `has_discount`, and `available_to_user` (`[true]` keeps only the models you can call). With `icontains`, `model_name` ignores `-`, `_`, `.` and spaces, so `gemini3` matches `gemini-3`. Unsupported fields return a 400 error. **Example:** ```json { "model_type": {"operator": "", "value": ["embedding"]}, "available_to_user": {"operator": "", "value": [true]} } ```

## Response

### 200

Models summary.

- `summary` (ApiModelsSummaryPostResponsesContentApplicationJsonSchemaSummary, required)

## Errors

### 400 Bad Request Error

Bad Request

- `detail` (string, optional)
- `error` (string, optional)

## Types

### ApiModelsSummaryPostRequestBodyContentApplicationJsonSchemaFilters

Each key is a field to filter on, and each value is a condition: `{"<field>": {"operator": "<operator>", "value": [...]}}`. A model must match every condition. To set two conditions on one field, such as a range, pass a list of conditions. **Operators:** `""` (equals, the default), `not`, `in`, `not_in`, `lt`, `lte`, `gt`, `gte`, `contains`, `not_contains`, `icontains` (ignores case), `startswith`, `not_startswith`, `endswith`, `not_endswith`, `empty`, `not_empty`. Put values in a list: `""` and `in` match any of the listed values, and `not` and `not_in` match none of them. Other operators take one value; for `empty` and `not_empty`, send `[""]`. **Fields:** `model_name`, `base_model_name`, `provider__provider_id`, `provider__provider_name`, `affiliation_category` (`custom` or `keywordsai`), `is_managed`, `status` (`active` or `deprecated`), `model_type` (`chat`, `embedding`, `image`, `video`, `rerank`, `speech` or `transcription`), `input_cost`, `output_cost`, `max_context_window`, `has_discount`, and `available_to_user` (`[true]` keeps only the models you can call). With `icontains`, `model_name` ignores `-`, `_`, `.` and spaces, so `gemini3` matches `gemini-3`. Unsupported fields return a 400 error. **Example:** ```json { "model_type": {"operator": "", "value": ["embedding"]}, "available_to_user": {"operator": "", "value": [true]} } ```

### ApiModelsSummaryPostResponsesContentApplicationJsonSchemaSummary

- `total_count` (integer, required) — Total models visible to this caller.
- `global_count` (integer, required) — Built-in shared model count.
- `custom_count` (integer, required) — Organization-specific model count. This is zero for anonymous callers.

## Examples

**Request**

```json
{
  "filters": {
    "affiliation_category": {
      "operator": "",
      "value": [
        "custom"
      ]
    }
  }
}
```

**Response**

```json
{
  "summary": {
    "total_count": 150,
    "global_count": 120,
    "custom_count": 30
  }
}
```

**SDK Code**

```python
import requests

url = "https://api.respan.ai/api/models/summary/"

payload = { "filters": { "affiliation_category": {
            "operator": "",
            "value": ["custom"]
        } } }
headers = {
    "Authorization": "Bearer <respanApiKey>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.respan.ai/api/models/summary/';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <respanApiKey>', 'Content-Type': 'application/json'},
  body: '{"filters":{"affiliation_category":{"operator":"","value":["custom"]}}}'
};

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"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.respan.ai/api/models/summary/"

	payload := strings.NewReader("{\n  \"filters\": {\n    \"affiliation_category\": {\n      \"operator\": \"\",\n      \"value\": [\n        \"custom\"\n      ]\n    }\n  }\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <respanApiKey>")
	req.Header.Add("Content-Type", "application/json")

	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.respan.ai/api/models/summary/")

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

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <respanApiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"filters\": {\n    \"affiliation_category\": {\n      \"operator\": \"\",\n      \"value\": [\n        \"custom\"\n      ]\n    }\n  }\n}"

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.post("https://api.respan.ai/api/models/summary/")
  .header("Authorization", "Bearer <respanApiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"filters\": {\n    \"affiliation_category\": {\n      \"operator\": \"\",\n      \"value\": [\n        \"custom\"\n      ]\n    }\n  }\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.respan.ai/api/models/summary/', [
  'body' => '{
  "filters": {
    "affiliation_category": {
      "operator": "",
      "value": [
        "custom"
      ]
    }
  }
}',
  'headers' => [
    'Authorization' => 'Bearer <respanApiKey>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api.respan.ai/api/models/summary/");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <respanApiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"filters\": {\n    \"affiliation_category\": {\n      \"operator\": \"\",\n      \"value\": [\n        \"custom\"\n      ]\n    }\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <respanApiKey>",
  "Content-Type": "application/json"
]
let parameters = ["filters": ["affiliation_category": [
      "operator": "",
      "value": ["custom"]
    ]]] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.respan.ai/api/models/summary/")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

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