> 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 status with filters

POST https://api.respan.ai/api/models/{model_name}/status/
Content-Type: application/json

Query parameters override matching values in the request body.

Reference: https://respan.ai/docs/apis/models/get-model-status-with-filters

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

### Path parameters

- `model_name` (string, required) — Exact logged model string; provider-prefixed values may contain a slash.

### Body (application/json)

This endpoint expects an object.

- `start_time` (string, required) — ISO-8601 or epoch timestamp. Raw window max 90 days.
- `end_time` (string, required) — Timestamp after start_time.
- `provider_id` (string, optional, nullable)
- `time_tick` (enum, optional, default: day)
  - Allowed values: `minute`, `hour`, `day`

## Response

### 200

Model status series. Unknown model names return empty series rather than 404.

- `model` (string, required)
- `provider_id` (string, required, nullable)
- `time_tick` (enum, required)
  - Allowed values: `minute`, `hour`, `day`
- `start_time` (datetime, required)
- `end_time` (datetime, required)
- `data` (list of ModelStatusUptimeBucket, required)
- `metrics_series` (list of ModelStatusMetricBucket, required)
- `respan_uptime` (list of ModelStatusUptimeBucket, optional) — Omitted when provider_id is supplied.
- `status` (ModelStatusResponseStatus, optional) — Omitted when provider_id is supplied. Volume fields are staff-only.

## Errors

### 400 Bad Request Error

Invalid timestamps, range, provider, or time tick.

- `map from string to any`

### 429 Too Many Requests Error

Anonymous callers are limited to 30 requests per minute per IP.

- `map from string to any`

## Types

### ModelStatusUptimeBucket

- `date_group` (datetime, required)
- `uptime` (double, required, nullable)
- `total_count` (integer, optional) — Staff-only.
- `down_count` (integer, optional) — Staff-only.

### ModelStatusMetricBucket

- `date_group` (datetime, required)
- `average_tps` (double, optional, nullable)
- `average_ttft` (double, optional, nullable)
- `average_latency` (double, optional, nullable)
- `cache_hit_percentage` (double, optional, nullable)
- `number_of_requests` (integer, optional) — Staff-only.
- `cost` (double, optional, nullable) — Staff-only.

### ModelStatusResponseStatus

Omitted when provider_id is supplied. Volume fields are staff-only.

- `uptime_percent` (double, optional, nullable)
- `average_tps` (double, optional, nullable)
- `average_ttft` (double, optional, nullable)
- `average_latency` (double, optional, nullable)
- `cache_hit_percentage` (double, optional, nullable)
- `input_cost` (double, optional, nullable)
- `number_of_requests` (integer, optional)
- `cost` (double, optional, nullable)
- `prompt_tokens` (integer, optional)
- `completion_tokens` (integer, optional)
- `prompt_cache_hit_tokens` (integer, optional)
- `prompt_cache_creation_tokens` (integer, optional)

## Examples

**Request**

```json
{
  "start_time": "string",
  "end_time": "string"
}
```

**Response**

```json
{
  "model": "string",
  "provider_id": "string",
  "time_tick": "minute",
  "start_time": "2024-01-15T09:30:00Z",
  "end_time": "2024-01-15T09:30:00Z",
  "data": [
    {
      "date_group": "2024-01-15T09:30:00Z",
      "uptime": 1.1,
      "total_count": 1,
      "down_count": 1
    }
  ],
  "metrics_series": [
    {
      "date_group": "2024-01-15T09:30:00Z",
      "average_tps": 1.1,
      "average_ttft": 1.1,
      "average_latency": 1.1,
      "cache_hit_percentage": 1.1,
      "number_of_requests": 1,
      "cost": 1.1
    }
  ],
  "respan_uptime": [
    {
      "date_group": "2024-01-15T09:30:00Z",
      "uptime": 1.1,
      "total_count": 1,
      "down_count": 1
    }
  ],
  "status": {
    "uptime_percent": 1.1,
    "average_tps": 1.1,
    "average_ttft": 1.1,
    "average_latency": 1.1,
    "cache_hit_percentage": 1.1,
    "input_cost": 1.1,
    "number_of_requests": 1,
    "cost": 1.1,
    "prompt_tokens": 1,
    "completion_tokens": 1,
    "prompt_cache_hit_tokens": 1,
    "prompt_cache_creation_tokens": 1
  }
}
```

**SDK Code**

```python
import requests

url = "https://api.respan.ai/api/models/model_name/status/"

payload = {
    "start_time": "string",
    "end_time": "string"
}
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/model_name/status/';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <respanApiKey>', 'Content-Type': 'application/json'},
  body: '{"start_time":"string","end_time":"string"}'
};

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/model_name/status/"

	payload := strings.NewReader("{\n  \"start_time\": \"string\",\n  \"end_time\": \"string\"\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/model_name/status/")

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  \"start_time\": \"string\",\n  \"end_time\": \"string\"\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/model_name/status/")
  .header("Authorization", "Bearer <respanApiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"start_time\": \"string\",\n  \"end_time\": \"string\"\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.respan.ai/api/models/model_name/status/', [
  'body' => '{
  "start_time": "string",
  "end_time": "string"
}',
  'headers' => [
    'Authorization' => 'Bearer <respanApiKey>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api.respan.ai/api/models/model_name/status/");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <respanApiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"start_time\": \"string\",\n  \"end_time\": \"string\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <respanApiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "start_time": "string",
  "end_time": "string"
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.respan.ai/api/models/model_name/status/")! 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()
```