Get balance
curl --request GET \
--url https://api.replicas.dev/v1/organization/billing/balance \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.replicas.dev/v1/organization/billing/balance"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.replicas.dev/v1/organization/billing/balance', 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.replicas.dev/v1/organization/billing/balance",
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.replicas.dev/v1/organization/billing/balance"
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.replicas.dev/v1/organization/billing/balance")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.replicas.dev/v1/organization/billing/balance")
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{
"plan": "trial",
"period_start": "2023-11-07T05:31:56Z",
"period_end": "2023-11-07T05:31:56Z",
"credit": {
"total_cents": 123,
"plan_cents": 123,
"one_time_cents": 123,
"used_cents": 123,
"remaining_cents": 123,
"overage_cents": 123
},
"limit": {
"kind": "credit",
"limit_cents": 123,
"used_cents": 123,
"remaining_cents": 123
},
"blocked": {
"code": "INSUFFICIENT_MINUTES",
"message": "<string>"
}
}{
"error": "<string>",
"details": "<string>",
"code": "<string>"
}Billing
Get balance
Shows the credit left this period, as on the billing page, and the limit creating and waking workspaces is checked against. Check it before starting work to stop before requests return 402. Any API key can call it.
GET
/
v1
/
organization
/
billing
/
balance
Get balance
curl --request GET \
--url https://api.replicas.dev/v1/organization/billing/balance \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.replicas.dev/v1/organization/billing/balance"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.replicas.dev/v1/organization/billing/balance', 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.replicas.dev/v1/organization/billing/balance",
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.replicas.dev/v1/organization/billing/balance"
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.replicas.dev/v1/organization/billing/balance")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.replicas.dev/v1/organization/billing/balance")
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{
"plan": "trial",
"period_start": "2023-11-07T05:31:56Z",
"period_end": "2023-11-07T05:31:56Z",
"credit": {
"total_cents": 123,
"plan_cents": 123,
"one_time_cents": 123,
"used_cents": 123,
"remaining_cents": 123,
"overage_cents": 123
},
"limit": {
"kind": "credit",
"limit_cents": 123,
"used_cents": 123,
"remaining_cents": 123
},
"blocked": {
"code": "INSUFFICIENT_MINUTES",
"message": "<string>"
}
}{
"error": "<string>",
"details": "<string>",
"code": "<string>"
}Authorizations
Headers
API version. 2026-10-07 returns snake_case responses. See versioning.
Available options:
2026-10-07 Response
Balance
⌘I