Live tasks and spend, by day, model and key
curl --request GET \
--url https://api.apiforgeo.com/v1/usage \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.apiforgeo.com/v1/usage"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.apiforgeo.com/v1/usage', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"from": "<string>",
"to": "<string>",
"tasks": 123,
"failed": 123,
"spendMicros": 123,
"averageCostMicros": 123,
"failureRate": 123,
"byDay": [
{
"date": "<string>",
"tasks": 123,
"failed": 123,
"spendMicros": 123,
"models": {}
}
],
"byModel": [
{
"model": "<string>",
"tasks": 123,
"failed": 123,
"spendMicros": 123,
"share": 123
}
],
"byKey": [
{
"apiKeyId": "<string>",
"tasks": 123,
"failed": 123,
"spendMicros": 123,
"share": 123
}
]
}{
"error": {
"code": "insufficient_balance",
"message": "<string>",
"details": {},
"requestId": "<string>"
}
}{
"error": {
"code": "insufficient_balance",
"message": "<string>",
"details": {},
"requestId": "<string>"
}
}Account
Live tasks and spend, by day, model and key
GET
/
v1
/
usage
Live tasks and spend, by day, model and key
curl --request GET \
--url https://api.apiforgeo.com/v1/usage \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.apiforgeo.com/v1/usage"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.apiforgeo.com/v1/usage', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"from": "<string>",
"to": "<string>",
"tasks": 123,
"failed": 123,
"spendMicros": 123,
"averageCostMicros": 123,
"failureRate": 123,
"byDay": [
{
"date": "<string>",
"tasks": 123,
"failed": 123,
"spendMicros": 123,
"models": {}
}
],
"byModel": [
{
"model": "<string>",
"tasks": 123,
"failed": 123,
"spendMicros": 123,
"share": 123
}
],
"byKey": [
{
"apiKeyId": "<string>",
"tasks": 123,
"failed": 123,
"spendMicros": 123,
"share": 123
}
]
}{
"error": {
"code": "insufficient_balance",
"message": "<string>",
"details": {},
"requestId": "<string>"
}
}{
"error": {
"code": "insufficient_balance",
"message": "<string>",
"details": {},
"requestId": "<string>"
}
}Authorizations
Query Parameters
Response
OK