curl --request GET \
--url https://console.vast.ai/api/v1/invoices \
--header 'Authorization: Bearer <token>'import requests
url = "https://console.vast.ai/api/v1/invoices"
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/v1/invoices', 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/v1/invoices",
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/v1/invoices"
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/v1/invoices")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://console.vast.ai/api/v1/invoices")
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": 42,
"next_token": "eyJ2YWx1ZXMiOiB7ImlkIjogMjE4OTM4N30sICJvc19wYWdlIjogMH0=",
"results": [
{
"start": 1761980044,
"end": 1761980301,
"type": "credit",
"source": "stripe",
"description": "Manual Billing from MASTERCARD ...7376",
"amount": -25,
"metadata": {
"invoice_id": 2185418,
"service": "stripe_payments"
},
"items": []
}
]
}show invoices
Returns Stripe top-ups, transfers, payouts, coinbase payments, and other billing transactions. For per-instance cost breakdowns, use show charges instead.
CLI: vastai show invoices-v1 --invoices
curl --request GET \
--url https://console.vast.ai/api/v1/invoices \
--header 'Authorization: Bearer <token>'import requests
url = "https://console.vast.ai/api/v1/invoices"
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/v1/invoices', 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/v1/invoices",
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/v1/invoices"
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/v1/invoices")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://console.vast.ai/api/v1/invoices")
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": 42,
"next_token": "eyJ2YWx1ZXMiOiB7ImlkIjogMjE4OTM4N30sICJvc19wYWdlIjogMH0=",
"results": [
{
"start": 1761980044,
"end": 1761980301,
"type": "credit",
"source": "stripe",
"description": "Manual Billing from MASTERCARD ...7376",
"amount": -25,
"metadata": {
"invoice_id": 2185418,
"service": "stripe_payments"
},
"items": []
}
]
}Authorizations
API key must be provided in the Authorization header
Query Parameters
when (required). Date range in unix seconds (UTC). Operators: gte, gt, lte, lt.
service (optional). Filter by payment service: transfer, stripe_payments, bitpay, coinbase, crypto.com, instance_prepay, paypal_manual, wise_manual. Operators: eq, neq, in, notin.
Examples:
// January 2026, all services
{"when":{"gte":1767225600,"lte":1769903999}}
// Only PayPal and Wise payouts
{"when":{"gte":1767225600,"lte":1769903999},"service":{"in":["paypal_manual","wise_manual"]}}
// Everything except crypto
{"when":{"gte":1767225600,"lte":1769903999},"service":{"notin":["bitpay","coinbase","crypto.com"]}}
Sort results by column. Columns: paid_on, amount_cents, when. Direction: asc or desc (default desc).
Example: [{"col":"paid_on","dir":"desc"}]
Sort newest invoices first. If order_by is also set, order_by takes precedence.
true
Max results per page.
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.
"eyJ2YWx1ZXMiOiB7ImlkIjogMjY3MjU5N30sICJvc19wYWdlIjogMH0="
Response
Invoice results. A missing or invalid when range also returns HTTP 200 with success: false.
true
Number of invoices returned in this page.
2
Total number of invoices matching the filters.
42
Token for the next page. null when no more pages.
"eyJ2YWx1ZXMiOiB7ImlkIjogMjE4OTM4N30sICJvc19wYWdlIjogMH0="
List of invoice entries.
Show child attributes
Show child attributes