curl --request GET \
--url https://api.anchorbrowser.io/v1/billing \
--header 'anchor-api-key: <api-key>'import requests
url = "https://api.anchorbrowser.io/v1/billing"
headers = {"anchor-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'anchor-api-key': '<api-key>'}};
fetch('https://api.anchorbrowser.io/v1/billing', 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.anchorbrowser.io/v1/billing",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"anchor-api-key: <api-key>"
],
]);
$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.anchorbrowser.io/v1/billing"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("anchor-api-key", "<api-key>")
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.anchorbrowser.io/v1/billing")
.header("anchor-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.anchorbrowser.io/v1/billing")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["anchor-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"credits": 42.5,
"credits_used": 12.5,
"included_credits": 50,
"billing_period": "2026-04",
"tier": "monthly_starter",
"gifts_balance": 42.5,
"max_concurrent_browsers": 25,
"cost_limit": 100
}
}Get Billing Info
Retrieves credit balance, current-period credit usage, tier, and billing limits for the authenticated project. Pass from_date, to_date, or granularity to additionally receive a usage time series of credits used per period, matching GET /v1/sessions/history?metrics=credits_used.
curl --request GET \
--url https://api.anchorbrowser.io/v1/billing \
--header 'anchor-api-key: <api-key>'import requests
url = "https://api.anchorbrowser.io/v1/billing"
headers = {"anchor-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'anchor-api-key': '<api-key>'}};
fetch('https://api.anchorbrowser.io/v1/billing', 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.anchorbrowser.io/v1/billing",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"anchor-api-key: <api-key>"
],
]);
$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.anchorbrowser.io/v1/billing"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("anchor-api-key", "<api-key>")
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.anchorbrowser.io/v1/billing")
.header("anchor-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.anchorbrowser.io/v1/billing")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["anchor-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"credits": 42.5,
"credits_used": 12.5,
"included_credits": 50,
"billing_period": "2026-04",
"tier": "monthly_starter",
"gifts_balance": 42.5,
"max_concurrent_browsers": 25,
"cost_limit": 100
}
}Authorizations
API key for your Anchor Browser account, sent as the anchor-api-key header on every
request. Create one at app.anchorbrowser.io (API Access),
or obtain one programmatically via the unauthenticated agent-access flow
(POST /v1/agent-access).
Query Parameters
Start of the usage window (ISO 8601 format, UTC). Passing any of from_date, to_date, or granularity adds a usage block to the response. Defaults to 30 days ago.
End of the usage window (ISO 8601 format, UTC). Defaults to now.
Time granularity for the usage time series.
hour, day, week, month Response
Billing information retrieved successfully.
Show child attributes
Show child attributes
Credits-usage time series. Present only when at least one of the from_date, to_date, or granularity query parameters is provided. Sums per-session credits bucketed by session creation time (UTC); recent buckets can still grow while sessions settle. Unlocker credits are tracked per calendar month and are not included in this series, so the bucket total can be lower than credits_used. The series matches GET /v1/sessions/history?metrics=credits_used.
Show child attributes
Show child attributes
Was this page helpful?

