> For the complete documentation index, see [llms.txt](https://docs.aimlapi.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.aimlapi.com/api-references/service-endpoints/model-metrics.md).

# Model Performance Metrics

<table data-header-hidden data-full-width="true"><thead><tr><th width="220" valign="top"></th><th valign="top"></th></tr></thead><tbody><tr><td valign="top"><a href="#get-model-performance-metrics">Get model performance metrics</a></td><td valign="top"><mark style="color:$success;"><strong><code>GET</code></strong></mark> <code>https://api.aimlapi.com/models/metrics</code></td></tr></tbody></table>

`GET /models/metrics` reports how fast models are responding **right now** — `ttft_ms`, `tps` and `duration_ms` as p50/p75/p90/p99 over a short sliding window, per model.\
No API key is required for this request. You can also open [the endpoint](https://api.aimlapi.com/models/metrics) directly in a browser.

Use it to pick between models that are otherwise interchangeable, or to check whether slowness you are seeing is on your side. These are the same numbers the model cards in the dashboard show.

{% hint style="warning" %}
**A higher percentile of `tps` is better, not worse.** These are percentiles of the measured value itself, so `p99` of `ttft_ms` or `duration_ms` is the slow tail — but `p99` of `tps` is the *fastest* requests, and `p50` is the typical one. Comparing models on `tps` p99 compares their best cases.
{% endhint %}

{% hint style="info" %}
A model that served no successful requests inside the window is **absent from `models` entirely**. That is "no data", not "zero latency" — and since only successful requests are measured, a model that is failing everything drops off the list rather than showing bad numbers.

`aliases` does not split on commas: repeat the parameter, as in `?aliases=openai/gpt-5&aliases=google/veo-3`. Names are matched exactly against the `id` and `aliases` from the [Complete Model List](/api-references/service-endpoints/complete-model-list.md).
{% endhint %}

### Get model performance metrics

Returns latency percentiles per model over the current window.

## GET /models/metrics

>

```json
{"openapi":"3.0.0","info":{"title":"AIML API","version":"1.0.0"},"servers":[{"url":"https://api.aimlapi.com"}],"paths":{"/models/metrics":{"get":{"operationId":"_models_metrics","parameters":[{"name":"aliases","in":"query","required":false,"description":"Keep only these models. Repeat the parameter once per model (`?aliases=openai/gpt-5&aliases=google/veo-3`), up to 100 values. Values are matched exactly, so a comma-separated list is read as one long name and matches nothing. Omit the parameter to get every measured model. Any other query parameter is rejected with 400.","schema":{"type":"string"}}],"responses":{"200":{"description":"Latency percentiles per model over the current window.","content":{"application/json":{"schema":{"type":"object","properties":{"window_seconds":{"type":"integer","description":"Length of the sliding window the percentiles were computed over."},"generated_at":{"type":"string","description":"When the aggregation was computed, in UTC."},"models":{"type":"array","description":"One entry per model that completed at least one successful request inside the window. Only successful requests are measured. Models with no such requests are absent from the list rather than reported as zero.","items":{"type":"object","properties":{"alias":{"type":"string","description":"Model name, matching an `id` or an alias from the model catalogue."},"endpoint":{"type":"string","description":"Endpoint the measurements were taken on."},"metrics":{"type":"object","description":"Only the metrics that apply to this model type and are backed by data in the window are present. A missing key means the metric does not apply, not that it is zero.","properties":{"ttft_ms":{"type":"object","description":"Time to first token, in milliseconds. Streaming text models only.","properties":{"p50":{"type":"number"},"p75":{"type":"number"},"p90":{"type":"number"},"p99":{"type":"number"}},"required":["p50","p75","p90","p99"]},"tps":{"type":"object","description":"Output tokens per second. Text models only. Note that these are percentiles of the throughput value itself, so a higher percentile is a faster request, not a slower one.","properties":{"p50":{"type":"number"},"p75":{"type":"number"},"p90":{"type":"number"},"p99":{"type":"number"}},"required":["p50","p75","p90","p99"]},"duration_ms":{"type":"object","description":"End-to-end request duration, in milliseconds.","properties":{"p50":{"type":"number"},"p75":{"type":"number"},"p90":{"type":"number"},"p99":{"type":"number"}},"required":["p50","p75","p90","p99"]}}}},"required":["alias","endpoint","metrics"]}}},"required":["window_seconds","generated_at","models"]}}}}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.aimlapi.com/api-references/service-endpoints/model-metrics.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
