Get model activity
How callers used one of your models, by its number such as router@3, over the last
days UTC days, today included: each day’s answered calls through its family and by its
number, the calls another model answered in its place, its first and last answered call,
and the stretches it was kept warm. Evaluations aren’t calls. A family’s name or a base
model is refused with 422 invalid_reference, and a deleted model is gone (410).
curl --request GET \
--url https://console.sqwish.ai/v1/models/{model_id}/activity \
--header 'Authorization: Bearer <token>'import requests
url = "https://console.sqwish.ai/v1/models/{model_id}/activity"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://console.sqwish.ai/v1/models/{model_id}/activity', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"model": "<string>",
"days": 123,
"start": "<string>",
"end": "<string>",
"requests": 123,
"fallbacks": 123,
"first_call_at": 123,
"last_call_at": 123,
"last_call_via": "family",
"daily": [
{
"day": "<string>",
"family": 123,
"model": 123
}
],
"kept_warm": [
{
"started_at": 123,
"ended_at": 123
}
]
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"details": [
{
"path": [
"<string>"
],
"message": "<string>",
"type": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"details": [
{
"path": [
"<string>"
],
"message": "<string>",
"type": "<string>"
}
]
}
}Authorizations
Create an API key in the console. Required when accounts are enabled.
Path Parameters
Query Parameters
1 <= x <= 90Response
Successful Response
How callers used a model: its calls by day, through its family or by its number.
The model by its number, such as router@4.
Calls in the period that asked for it and it answered.
Calls in the period that asked for it and another model answered, while it couldn't.
When it first answered a call that asked for it, or null.
When it last answered a call that asked for it, or null.
Whether that last call named its family or the model itself.
family, model Show child attributes
Show child attributes
The stretches it was kept warm, through its own keep warm or its family's, as keep warm billed them in the period, oldest first. Empty where keep warm is free.
Show child attributes
Show child attributes
curl --request GET \
--url https://console.sqwish.ai/v1/models/{model_id}/activity \
--header 'Authorization: Bearer <token>'import requests
url = "https://console.sqwish.ai/v1/models/{model_id}/activity"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://console.sqwish.ai/v1/models/{model_id}/activity', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"model": "<string>",
"days": 123,
"start": "<string>",
"end": "<string>",
"requests": 123,
"fallbacks": 123,
"first_call_at": 123,
"last_call_at": 123,
"last_call_via": "family",
"daily": [
{
"day": "<string>",
"family": 123,
"model": 123
}
],
"kept_warm": [
{
"started_at": 123,
"ended_at": 123
}
]
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"details": [
{
"path": [
"<string>"
],
"message": "<string>",
"type": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"details": [
{
"path": [
"<string>"
],
"message": "<string>",
"type": "<string>"
}
]
}
}