Get usage and quota
curl --request GET \
--url https://serva.servamind.com/api/usage \
--header 'Authorization: Bearer <token>'import requests
url = "https://serva.servamind.com/api/usage"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://serva.servamind.com/api/usage', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://serva.servamind.com/api/usage",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://serva.servamind.com/api/usage"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://serva.servamind.com/api/usage")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://serva.servamind.com/api/usage")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"plan_type": "free",
"total_bytes_this_month": 536870912,
"quota_bytes": 1099511627776,
"quota_remaining_bytes": 1098974756864,
"percentage_used": 0.0488
}{
"detail": "Invalid or expired session token"
}Usage
Usage
Returns your usage and quota for the current month. The first 1 TB each month is free; usage beyond that is billed.
GET
/
api
/
usage
Get usage and quota
curl --request GET \
--url https://serva.servamind.com/api/usage \
--header 'Authorization: Bearer <token>'import requests
url = "https://serva.servamind.com/api/usage"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://serva.servamind.com/api/usage', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://serva.servamind.com/api/usage",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://serva.servamind.com/api/usage"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://serva.servamind.com/api/usage")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://serva.servamind.com/api/usage")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"plan_type": "free",
"total_bytes_this_month": 536870912,
"quota_bytes": 1099511627776,
"quota_remaining_bytes": 1098974756864,
"percentage_used": 0.0488
}{
"detail": "Invalid or expired session token"
}Check your monthly usage and quota with your API key.
Authorizations
Accepts one of three credential types (detected by format):
- Session token (
sess_...) — O(1) Redis lookup, 24h TTL. Preferred. - Google ID Token (JWT — three
.-separated base64 segments) — calls Google tokeninfo API per request. - Service API Key (
sk_live_...) — HMAC-SHA256 constant-time validation, never expires unless revoked.
Note: The web UI authenticates via a session httpOnly cookie (set during login).
The cookie is checked first; the Authorization header is the fallback for programmatic clients.
Response
Usage information

