curl --request GET \
--url https://api.veryfront.com/account/usage/credits \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.veryfront.com/account/usage/credits"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.veryfront.com/account/usage/credits', 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://api.veryfront.com/account/usage/credits",
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://api.veryfront.com/account/usage/credits"
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://api.veryfront.com/account/usage/credits")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.veryfront.com/account/usage/credits")
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{
"summary": {
"credits_used": 123,
"requests": 123,
"input_tokens": 123,
"output_tokens": 123,
"cache_creation_input_tokens": 123,
"cache_read_input_tokens": 123
},
"timeframe": {
"from": "<string>",
"to": "<string>",
"granularity": "day",
"timezone": "<string>",
"bucket_count": 123
},
"series": [
{
"bucket_start": "<string>",
"credits_used": 123,
"requests": 123,
"input_tokens": 123,
"output_tokens": 123,
"cache_creation_input_tokens": 123,
"cache_read_input_tokens": 123,
"projects": [
{
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"project_name": "<string>",
"project_slug": "<string>",
"credits_used": 123,
"requests": 123,
"input_tokens": 123,
"output_tokens": 123,
"cache_creation_input_tokens": 123,
"cache_read_input_tokens": 123
}
]
}
],
"projects": [
{
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"project_name": "<string>",
"project_slug": "<string>",
"credits_used": 123,
"requests": 123,
"input_tokens": 123,
"output_tokens": 123,
"cache_creation_input_tokens": 123,
"cache_read_input_tokens": 123
}
],
"models": [
{
"model": "<string>",
"model_provider": "anthropic",
"inference_provider": "veryfront-cloud",
"credits_used": 123,
"requests": 123,
"input_tokens": 123,
"output_tokens": 123,
"cache_creation_input_tokens": 123,
"cache_read_input_tokens": 123,
"canonical_model_id": "<string>",
"provider_cost_usd": 123,
"veryfront_charge_usd": 123,
"cost_attribution": "estimated"
}
],
"serving": [
{
"host": "<string>",
"tier": "eu-resident",
"credits": 123,
"usd": 123,
"requests": 123,
"input_tokens": 123,
"output_tokens": 123,
"cache_read_tokens": 123,
"cache_creation_tokens": 123
}
]
}Get account AI credits usage
Returns AI credit usage for the authenticated account by day and project. Optionally scoped to a single project.
curl --request GET \
--url https://api.veryfront.com/account/usage/credits \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.veryfront.com/account/usage/credits"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.veryfront.com/account/usage/credits', 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://api.veryfront.com/account/usage/credits",
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://api.veryfront.com/account/usage/credits"
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://api.veryfront.com/account/usage/credits")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.veryfront.com/account/usage/credits")
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{
"summary": {
"credits_used": 123,
"requests": 123,
"input_tokens": 123,
"output_tokens": 123,
"cache_creation_input_tokens": 123,
"cache_read_input_tokens": 123
},
"timeframe": {
"from": "<string>",
"to": "<string>",
"granularity": "day",
"timezone": "<string>",
"bucket_count": 123
},
"series": [
{
"bucket_start": "<string>",
"credits_used": 123,
"requests": 123,
"input_tokens": 123,
"output_tokens": 123,
"cache_creation_input_tokens": 123,
"cache_read_input_tokens": 123,
"projects": [
{
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"project_name": "<string>",
"project_slug": "<string>",
"credits_used": 123,
"requests": 123,
"input_tokens": 123,
"output_tokens": 123,
"cache_creation_input_tokens": 123,
"cache_read_input_tokens": 123
}
]
}
],
"projects": [
{
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"project_name": "<string>",
"project_slug": "<string>",
"credits_used": 123,
"requests": 123,
"input_tokens": 123,
"output_tokens": 123,
"cache_creation_input_tokens": 123,
"cache_read_input_tokens": 123
}
],
"models": [
{
"model": "<string>",
"model_provider": "anthropic",
"inference_provider": "veryfront-cloud",
"credits_used": 123,
"requests": 123,
"input_tokens": 123,
"output_tokens": 123,
"cache_creation_input_tokens": 123,
"cache_read_input_tokens": 123,
"canonical_model_id": "<string>",
"provider_cost_usd": 123,
"veryfront_charge_usd": 123,
"cost_attribution": "estimated"
}
],
"serving": [
{
"host": "<string>",
"tier": "eu-resident",
"credits": 123,
"usd": 123,
"requests": 123,
"input_tokens": 123,
"output_tokens": 123,
"cache_read_tokens": 123,
"cache_creation_tokens": 123
}
]
}Authorizations
Use a JWT bearer token or a Veryfront API key in the Authorization header.
Query Parameters
Relative timeframe preset.
7d, 30d, 90d IANA timezone for daily bucket boundaries.
Optional project UUID or slug to scope credit usage to a single project.
Deprecated project ID or slug alias. Use project_reference.
Deprecated camelCase project ID or slug alias. Use project_reference.
Response
Account AI credits usage statistics.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
The same spend cut by the deployment that served it. Ordered by spend descending, then by request count descending, then by host, then by tier; the row whose host and tier are both null is always last, because it is the absence of a record rather than a deployment. Additive: it neither replaces nor re-slices any other field. Omitted where the serving breakdown is not enabled; models is unchanged by it.
Show child attributes
Show child attributes