Расход ключа, по которому пришёл запрос
curl --request GET \
--url https://api.tungo.kz/v1/api-key/usage \
--header 'x-api-key: <api-key>'import requests
url = "https://api.tungo.kz/v1/api-key/usage"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.tungo.kz/v1/api-key/usage', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"key_id": "<string>",
"from": "2026-10-05T09:30:00.000Z",
"to": "2026-10-05T09:30:00.000Z",
"totals": {
"requests": 123,
"input_tokens": 123,
"output_tokens": 123,
"cache_write_tokens": 123,
"cache_read_tokens": 123,
"cost_tiyn": 123
},
"by_day": [
{
"day": "2026-11-03",
"requests": 123,
"cost_tiyn": 123
}
],
"by_model": [
{
"model": "<string>",
"requests": 123,
"cost_tiyn": 123
}
],
"by_company": [
{
"company_id": "<string>",
"requests": 123,
"cost_tiyn": 123
}
],
"month": {
"month": "2026-11-01",
"spent_tiyn": 123,
"cap_tiyn": 123
}
}{
"type": "error",
"error": {
"type": "payment_required_error",
"message": "Баланс доп. использования закончился — пополнить его или включить автопополнение могут владелец и админ workspace.",
"code": "balance_exhausted",
"permission": "proposals.approve",
"resets_at": "2026-11-01T19:00:00.000Z",
"retry_after_seconds": 42,
"next_request_at": "2026-11-12T09:30:42.000Z",
"allowed_methods": [
"email_otp"
],
"role": "<string>",
"permissions": [
"<string>"
],
"fields": [
{
"path": "bin",
"code": "invalid_format",
"message": "БИН/ИИН — 12 цифр"
}
]
},
"request_id": "req_4f9c2a7e1b3d4c5a8e6f7a9b0c1d2e3f"
}{
"type": "error",
"error": {
"type": "payment_required_error",
"message": "Баланс доп. использования закончился — пополнить его или включить автопополнение могут владелец и админ workspace.",
"code": "balance_exhausted",
"permission": "proposals.approve",
"resets_at": "2026-11-01T19:00:00.000Z",
"retry_after_seconds": 42,
"next_request_at": "2026-11-12T09:30:42.000Z",
"allowed_methods": [
"email_otp"
],
"role": "<string>",
"permissions": [
"<string>"
],
"fields": [
{
"path": "bin",
"code": "invalid_format",
"message": "БИН/ИИН — 12 цифр"
}
]
},
"request_id": "req_4f9c2a7e1b3d4c5a8e6f7a9b0c1d2e3f"
}{
"type": "error",
"error": {
"type": "payment_required_error",
"message": "Баланс доп. использования закончился — пополнить его или включить автопополнение могут владелец и админ workspace.",
"code": "balance_exhausted",
"permission": "proposals.approve",
"resets_at": "2026-11-01T19:00:00.000Z",
"retry_after_seconds": 42,
"next_request_at": "2026-11-12T09:30:42.000Z",
"allowed_methods": [
"email_otp"
],
"role": "<string>",
"permissions": [
"<string>"
],
"fields": [
{
"path": "bin",
"code": "invalid_format",
"message": "БИН/ИИН — 12 цифр"
}
]
},
"request_id": "req_4f9c2a7e1b3d4c5a8e6f7a9b0c1d2e3f"
}Ключи API
Расход ключа, по которому пришёл запрос
Только по ключу API; как GET /v1/workspaces//api-keys//usage.
Доступно по ключу API.
GET
/
v1
/
api-key
/
usage
Расход ключа, по которому пришёл запрос
curl --request GET \
--url https://api.tungo.kz/v1/api-key/usage \
--header 'x-api-key: <api-key>'import requests
url = "https://api.tungo.kz/v1/api-key/usage"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.tungo.kz/v1/api-key/usage', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"key_id": "<string>",
"from": "2026-10-05T09:30:00.000Z",
"to": "2026-10-05T09:30:00.000Z",
"totals": {
"requests": 123,
"input_tokens": 123,
"output_tokens": 123,
"cache_write_tokens": 123,
"cache_read_tokens": 123,
"cost_tiyn": 123
},
"by_day": [
{
"day": "2026-11-03",
"requests": 123,
"cost_tiyn": 123
}
],
"by_model": [
{
"model": "<string>",
"requests": 123,
"cost_tiyn": 123
}
],
"by_company": [
{
"company_id": "<string>",
"requests": 123,
"cost_tiyn": 123
}
],
"month": {
"month": "2026-11-01",
"spent_tiyn": 123,
"cap_tiyn": 123
}
}{
"type": "error",
"error": {
"type": "payment_required_error",
"message": "Баланс доп. использования закончился — пополнить его или включить автопополнение могут владелец и админ workspace.",
"code": "balance_exhausted",
"permission": "proposals.approve",
"resets_at": "2026-11-01T19:00:00.000Z",
"retry_after_seconds": 42,
"next_request_at": "2026-11-12T09:30:42.000Z",
"allowed_methods": [
"email_otp"
],
"role": "<string>",
"permissions": [
"<string>"
],
"fields": [
{
"path": "bin",
"code": "invalid_format",
"message": "БИН/ИИН — 12 цифр"
}
]
},
"request_id": "req_4f9c2a7e1b3d4c5a8e6f7a9b0c1d2e3f"
}{
"type": "error",
"error": {
"type": "payment_required_error",
"message": "Баланс доп. использования закончился — пополнить его или включить автопополнение могут владелец и админ workspace.",
"code": "balance_exhausted",
"permission": "proposals.approve",
"resets_at": "2026-11-01T19:00:00.000Z",
"retry_after_seconds": 42,
"next_request_at": "2026-11-12T09:30:42.000Z",
"allowed_methods": [
"email_otp"
],
"role": "<string>",
"permissions": [
"<string>"
],
"fields": [
{
"path": "bin",
"code": "invalid_format",
"message": "БИН/ИИН — 12 цифр"
}
]
},
"request_id": "req_4f9c2a7e1b3d4c5a8e6f7a9b0c1d2e3f"
}{
"type": "error",
"error": {
"type": "payment_required_error",
"message": "Баланс доп. использования закончился — пополнить его или включить автопополнение могут владелец и админ workspace.",
"code": "balance_exhausted",
"permission": "proposals.approve",
"resets_at": "2026-11-01T19:00:00.000Z",
"retry_after_seconds": 42,
"next_request_at": "2026-11-12T09:30:42.000Z",
"allowed_methods": [
"email_otp"
],
"role": "<string>",
"permissions": [
"<string>"
],
"fields": [
{
"path": "bin",
"code": "invalid_format",
"message": "БИН/ИИН — 12 цифр"
}
]
},
"request_id": "req_4f9c2a7e1b3d4c5a8e6f7a9b0c1d2e3f"
}Авторизации
apiKeybearerKey
Параметры запроса
Ответ
Расход (в тиынах)
Расход ключа на ИИ за период: итоги, по дням, моделям и компаниям; суммы — в тиынах.