Models
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).
GET
/
v1
/
models
/
{model_id}
/
activity
Get model activity
curl --request GET \
--url https://api.sqwish.ai/v1/models/{model_id}/activity \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.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://api.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>"
}
]
}
}Response
Successful Response
How callers used a model: its calls by day, through its family or by its number.
Get model activity
curl --request GET \
--url https://api.sqwish.ai/v1/models/{model_id}/activity \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.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://api.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>"
}
]
}
}