curl --request GET \
--url https://console.vast.ai/api/v1/invoices/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"select_filters": {
"when": {
"gte": 1748736000,
"lte": 1764547200
},
"service": {
"eq": "<string>",
"in": [
"<string>"
],
"notin": [
"<string>"
]
}
},
"latest_first": true,
"order_by": {
"col": "paid_on",
"dir": "desc"
},
"limit": 60
}
'import requests
url = "https://console.vast.ai/api/v1/invoices/"
payload = {
"select_filters": {
"when": {
"gte": 1748736000,
"lte": 1764547200
},
"service": {
"eq": "<string>",
"in": ["<string>"],
"notin": ["<string>"]
}
},
"latest_first": True,
"order_by": {
"col": "paid_on",
"dir": "desc"
},
"limit": 60
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.get(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
select_filters: {
when: {gte: 1748736000, lte: 1764547200},
service: {eq: '<string>', in: ['<string>'], notin: ['<string>']}
},
latest_first: true,
order_by: {col: 'paid_on', dir: 'desc'},
limit: 60
})
};
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_POSTFIELDS => json_encode([
'select_filters' => [
'when' => [
'gte' => 1748736000,
'lte' => 1764547200
],
'service' => [
'eq' => '<string>',
'in' => [
'<string>'
],
'notin' => [
'<string>'
]
]
],
'latest_first' => true,
'order_by' => [
'col' => 'paid_on',
'dir' => 'desc'
],
'limit' => 60
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://console.vast.ai/api/v1/invoices/"
payload := strings.NewReader("{\n \"select_filters\": {\n \"when\": {\n \"gte\": 1748736000,\n \"lte\": 1764547200\n },\n \"service\": {\n \"eq\": \"<string>\",\n \"in\": [\n \"<string>\"\n ],\n \"notin\": [\n \"<string>\"\n ]\n }\n },\n \"latest_first\": true,\n \"order_by\": {\n \"col\": \"paid_on\",\n \"dir\": \"desc\"\n },\n \"limit\": 60\n}")
req, _ := http.NewRequest("GET", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
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>")
.header("Content-Type", "application/json")
.body("{\n \"select_filters\": {\n \"when\": {\n \"gte\": 1748736000,\n \"lte\": 1764547200\n },\n \"service\": {\n \"eq\": \"<string>\",\n \"in\": [\n \"<string>\"\n ],\n \"notin\": [\n \"<string>\"\n ]\n }\n },\n \"latest_first\": true,\n \"order_by\": {\n \"col\": \"paid_on\",\n \"dir\": \"desc\"\n },\n \"limit\": 60\n}")
.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>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"select_filters\": {\n \"when\": {\n \"gte\": 1748736000,\n \"lte\": 1764547200\n },\n \"service\": {\n \"eq\": \"<string>\",\n \"in\": [\n \"<string>\"\n ],\n \"notin\": [\n \"<string>\"\n ]\n }\n },\n \"latest_first\": true,\n \"order_by\": {\n \"col\": \"paid_on\",\n \"dir\": \"desc\"\n },\n \"limit\": 60\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"count": 2,
"total": 42,
"results": [
{
"start": 1762149123,
"end": null,
"type": "transfer",
"source": "sender@vast.ai",
"description": "Received credit from sender@vast.ai",
"amount": 35.5,
"metadata": {
"invoice_id": 4829137,
"service": "transfer",
"sender": 123456,
"recipient": 789012
},
"items": []
},
{
"start": 1761980044,
"end": 1761980301,
"type": "credit",
"source": "stripe",
"description": "Manual billing from VISA ending in 4412",
"amount": -19.99,
"metadata": {
"invoice_id": 4828771,
"service": "stripe_payments",
"last4": "4412",
"network": "visa",
"transfer_group": "pi_3TAbCdEfgHiJkLmN"
},
"items": []
}
],
"next_token": null
}{
"success": false,
"error": "Invalid date range",
"count": 0,
"total": 0,
"results": [],
"next_token": null
}{
"success": false,
"error": "<string>",
"msg": "<string>"
}{
"success": false,
"error": "<string>",
"msg": "<string>"
}{
"detail": "API requests too frequent endpoint threshold=2.0"
}show invoices
Gets your invoices within given timerange.
Timerange is required using the select_filters.when field.
Optionally filter by invoice service using select_filters.service.
Common services : transfer, stripe_payments, bitpay, coinbase, crypto.com, instance_prepay, paypal_manual, wise_manual
Date format: select_filters.when.gte and select_filters.when.lte must be UTC epoch seconds (integers).
Example range: 2026-01-01 00:00:00 UTC -> 1767225600, 2026-01-31 23:59:59 UTC -> 1769903999.
HTTP request: This is a GET endpoint that accepts JSON-encoded query parameters. URL-encode JSON values when calling directly.
GET /api/v1/invoices/?select_filters={"when":{"gte":1767225600,"lte":1769903999}}&limit=60
For pagination, pass the response next_token as after_token:
GET /api/v1/invoices/?select_filters={"when":{"gte":1767225600,"lte":1769903999}}&after_token=eyJ2YWx1ZXMiOiB7ImlkIjog...
CLI Usage: vastai show invoices-v1
curl --request GET \
--url https://console.vast.ai/api/v1/invoices/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"select_filters": {
"when": {
"gte": 1748736000,
"lte": 1764547200
},
"service": {
"eq": "<string>",
"in": [
"<string>"
],
"notin": [
"<string>"
]
}
},
"latest_first": true,
"order_by": {
"col": "paid_on",
"dir": "desc"
},
"limit": 60
}
'import requests
url = "https://console.vast.ai/api/v1/invoices/"
payload = {
"select_filters": {
"when": {
"gte": 1748736000,
"lte": 1764547200
},
"service": {
"eq": "<string>",
"in": ["<string>"],
"notin": ["<string>"]
}
},
"latest_first": True,
"order_by": {
"col": "paid_on",
"dir": "desc"
},
"limit": 60
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.get(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
select_filters: {
when: {gte: 1748736000, lte: 1764547200},
service: {eq: '<string>', in: ['<string>'], notin: ['<string>']}
},
latest_first: true,
order_by: {col: 'paid_on', dir: 'desc'},
limit: 60
})
};
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_POSTFIELDS => json_encode([
'select_filters' => [
'when' => [
'gte' => 1748736000,
'lte' => 1764547200
],
'service' => [
'eq' => '<string>',
'in' => [
'<string>'
],
'notin' => [
'<string>'
]
]
],
'latest_first' => true,
'order_by' => [
'col' => 'paid_on',
'dir' => 'desc'
],
'limit' => 60
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://console.vast.ai/api/v1/invoices/"
payload := strings.NewReader("{\n \"select_filters\": {\n \"when\": {\n \"gte\": 1748736000,\n \"lte\": 1764547200\n },\n \"service\": {\n \"eq\": \"<string>\",\n \"in\": [\n \"<string>\"\n ],\n \"notin\": [\n \"<string>\"\n ]\n }\n },\n \"latest_first\": true,\n \"order_by\": {\n \"col\": \"paid_on\",\n \"dir\": \"desc\"\n },\n \"limit\": 60\n}")
req, _ := http.NewRequest("GET", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
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>")
.header("Content-Type", "application/json")
.body("{\n \"select_filters\": {\n \"when\": {\n \"gte\": 1748736000,\n \"lte\": 1764547200\n },\n \"service\": {\n \"eq\": \"<string>\",\n \"in\": [\n \"<string>\"\n ],\n \"notin\": [\n \"<string>\"\n ]\n }\n },\n \"latest_first\": true,\n \"order_by\": {\n \"col\": \"paid_on\",\n \"dir\": \"desc\"\n },\n \"limit\": 60\n}")
.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>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"select_filters\": {\n \"when\": {\n \"gte\": 1748736000,\n \"lte\": 1764547200\n },\n \"service\": {\n \"eq\": \"<string>\",\n \"in\": [\n \"<string>\"\n ],\n \"notin\": [\n \"<string>\"\n ]\n }\n },\n \"latest_first\": true,\n \"order_by\": {\n \"col\": \"paid_on\",\n \"dir\": \"desc\"\n },\n \"limit\": 60\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"count": 2,
"total": 42,
"results": [
{
"start": 1762149123,
"end": null,
"type": "transfer",
"source": "sender@vast.ai",
"description": "Received credit from sender@vast.ai",
"amount": 35.5,
"metadata": {
"invoice_id": 4829137,
"service": "transfer",
"sender": 123456,
"recipient": 789012
},
"items": []
},
{
"start": 1761980044,
"end": 1761980301,
"type": "credit",
"source": "stripe",
"description": "Manual billing from VISA ending in 4412",
"amount": -19.99,
"metadata": {
"invoice_id": 4828771,
"service": "stripe_payments",
"last4": "4412",
"network": "visa",
"transfer_group": "pi_3TAbCdEfgHiJkLmN"
},
"items": []
}
],
"next_token": null
}{
"success": false,
"error": "Invalid date range",
"count": 0,
"total": 0,
"results": [],
"next_token": null
}{
"success": false,
"error": "<string>",
"msg": "<string>"
}{
"success": false,
"error": "<string>",
"msg": "<string>"
}{
"detail": "API requests too frequent endpoint threshold=2.0"
}Authorizations
API key must be provided in the Authorization header
Body
Shows invoices using given filters.
Required : Filter by timerange using when field.
Use unix timestamps (UTC) comparison operators.
Example : To filter invoices from June 1, 2025 to Dec 1, 2025:
"select_filters": {
"when": {
"gte": 1748736000,
"lte": 1764547200
}
}
Supported operators:
gtorgte: invoices created after this timeltorlte: invoices created before this time
Optional : Filter invoices by service using service field.
Supported services: transfer, stripe_payments, bitpay, coinbase, crypto.com, instance_prepay, paypal_manual, wise_manual
Supported operators:
in: include only these servicesnotin: exclude these serviceseq: matches a single service
Example: Get paypal and wise invoices only
"service": {
"in": ["paypal_manual", "wise_manual"]
}
Show child attributes
Show child attributes
Sort by newest invoices first.
Sort invoices by given columns.
Supported columns: paid_on, amount_cents, when
Example : To sort by oldest invoices first
"order_by": [
{
"col": "when",
"dir": "asc"
}
]
Show child attributes
Show child attributes
Maximum number of invoices to return.
Response
Paginated invoice results