curl --request GET \
--url https://console.vast.ai/api/v0/charges/ \
--header 'Authorization: Bearer <token>'import requests
url = "https://console.vast.ai/api/v0/charges/"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://console.vast.ai/api/v0/charges/', 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://console.vast.ai/api/v0/charges/",
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://console.vast.ai/api/v0/charges/"
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://console.vast.ai/api/v0/charges/")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://console.vast.ai/api/v0/charges/")
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{
"success": true,
"count": 2,
"total": 14,
"next_token": "eyJ2YWx1ZXMiOiB7ImlkIjogMTIzNDU2Nzh9fQ==",
"results": [
{
"start": 1730419200,
"end": 1730678400,
"type": "instance",
"source": "instance-12345678",
"description": "Instance 12345678 Charges - 4 days",
"amount": 38.421,
"metadata": {
"template_id": 101,
"label": "my-training-job",
"endpoint_id": 19392,
"workergroup_id": 25355
},
"items": [
{
"start": 1730419200,
"end": 1730678400,
"type": "gpu",
"source": null,
"description": "96.000 hours at $0.389/hour",
"amount": 37.344,
"metadata": {},
"items": []
}
]
}
]
}show charges
Shows charges per instance, including GPU, storage, and bandwidth. For invoice/payment records (Stripe top-ups, transfers, payouts), use show invoices instead.
CLI: vastai show invoices-v1 --charges
curl --request GET \
--url https://console.vast.ai/api/v0/charges/ \
--header 'Authorization: Bearer <token>'import requests
url = "https://console.vast.ai/api/v0/charges/"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://console.vast.ai/api/v0/charges/', 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://console.vast.ai/api/v0/charges/",
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://console.vast.ai/api/v0/charges/"
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://console.vast.ai/api/v0/charges/")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://console.vast.ai/api/v0/charges/")
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{
"success": true,
"count": 2,
"total": 14,
"next_token": "eyJ2YWx1ZXMiOiB7ImlkIjogMTIzNDU2Nzh9fQ==",
"results": [
{
"start": 1730419200,
"end": 1730678400,
"type": "instance",
"source": "instance-12345678",
"description": "Instance 12345678 Charges - 4 days",
"amount": 38.421,
"metadata": {
"template_id": 101,
"label": "my-training-job",
"endpoint_id": 19392,
"workergroup_id": 25355
},
"items": [
{
"start": 1730419200,
"end": 1730678400,
"type": "gpu",
"source": null,
"description": "96.000 hours at $0.389/hour",
"amount": 37.344,
"metadata": {},
"items": []
}
]
}
]
}Authorizations
API key must be provided in the Authorization header
Query Parameters
day (required). Date range in unix seconds (UTC). Operators: gte, lte.
type (optional). Filter by contract type: instance, volume, serverless. Operator: in.
Examples:
// All charges in January 2026
{"day":{"gte":1767225600,"lte":1769903999}}
// Only instance charges
{"day":{"gte":1767225600,"lte":1769903999},"type":{"in":["instance"]}}
// Volumes and serverless only
{"day":{"gte":1767225600,"lte":1769903999},"type":{"in":["volume","serverless"]}}
table(default) flat list of per-contract rows withtype: "instance"or"volume".treeserverless contracts are collapsed under endpoint/workergroup wrappers withtype: "serverless"andsource: "endpoint-<id>"/"workergroup-<id>". Regular instances and volumes are unchanged.
table, tree "table"
Sort by most recent charges first.
true
Max results per page. Server maximum 500.
x >= 120
Pass the next_token value from the previous response to fetch the next page of results. When the response returns next_token: null, there are no more pages.
"eyJ2YWx1ZXMiOiB7ImlkIjogMTIzNDU2Nzh9fQ=="
Response
Paginated per-instance charge results
true
Number of contracts returned in this page.
2
Total number of contracts matching the filters.
14
Pagination cursor for the next page. null when no more pages.
"eyJ2YWx1ZXMiOiB7ImlkIjogMTIzNDU2Nzh9fQ=="
List of per-contract charge entries.
Show child attributes
Show child attributes