Get a customer's agent balance
curl --request GET \
--url https://api.hyperline.co/v1/agents/customers/{customer_id}/balance \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.hyperline.co/v1/agents/customers/{customer_id}/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.hyperline.co/v1/agents/customers/{customer_id}/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.hyperline.co/v1/agents/customers/{customer_id}/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.hyperline.co/v1/agents/customers/{customer_id}/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.hyperline.co/v1/agents/customers/{customer_id}/balance")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hyperline.co/v1/agents/customers/{customer_id}/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{
"agent": "<string>",
"mode": "wallet",
"balance": {
"denomination": "minor_units",
"wallet": "<string>",
"unsettled": "<string>",
"available": "<string>"
},
"blocked": true,
"policy": {
"markup_percent": "<string>",
"floor": "<string>",
"plan_name": "<string>",
"settlement_interval_minutes": 123
},
"meters": [
{
"key": "<string>",
"included_units": "<string>",
"used_units": "<string>",
"remaining_units": "<string>",
"window_started_at": "<string>",
"resets_at": "<string>"
}
],
"credits": {
"balance": "<string>",
"currency": null,
"product_id": "<string>",
"aggregator_on_customer_id": "<string>",
"low_balance_threshold": "<string>",
"expiring_soon": [
{
"amount": "<string>",
"expires_at": "<string>"
}
],
"rate_card_summary": {
"llm_rows": 123,
"item_rows": 123,
"has_default_llm_row": true,
"fallback_credits_per_usd": "<string>"
}
},
"overage": {
"mode": "refuse",
"active": true,
"unsettled": "<string>"
},
"last_settled_at": "<string>",
"agents": [
{
"agent": "<string>",
"mode": "wallet",
"balance": {
"denomination": "minor_units",
"wallet": "<string>",
"unsettled": "<string>",
"available": "<string>"
},
"blocked": true,
"meters": [
{
"key": "<string>",
"included_units": "<string>",
"used_units": "<string>",
"remaining_units": "<string>",
"window_started_at": "<string>",
"resets_at": "<string>"
}
],
"overage": {
"mode": "refuse",
"active": true,
"unsettled": "<string>"
}
}
]
}{
"message": "<string>"
}Agents
Get a customer's agent balance
The mode-shaped live balance: the wallet shadow balance (wallet minus unsettled, correct the instant a consume commits), the credit pot, or every rolling window’s remaining allowance with its reset instant — decided by the scope’s mode. agents lists each agent with a pool of its own. This is the operator’s read of what the runtime snapshot endpoint answers the customer’s integration.
GET
/
v1
/
agents
/
customers
/
{customer_id}
/
balance
Get a customer's agent balance
curl --request GET \
--url https://api.hyperline.co/v1/agents/customers/{customer_id}/balance \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.hyperline.co/v1/agents/customers/{customer_id}/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.hyperline.co/v1/agents/customers/{customer_id}/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.hyperline.co/v1/agents/customers/{customer_id}/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.hyperline.co/v1/agents/customers/{customer_id}/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.hyperline.co/v1/agents/customers/{customer_id}/balance")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hyperline.co/v1/agents/customers/{customer_id}/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{
"agent": "<string>",
"mode": "wallet",
"balance": {
"denomination": "minor_units",
"wallet": "<string>",
"unsettled": "<string>",
"available": "<string>"
},
"blocked": true,
"policy": {
"markup_percent": "<string>",
"floor": "<string>",
"plan_name": "<string>",
"settlement_interval_minutes": 123
},
"meters": [
{
"key": "<string>",
"included_units": "<string>",
"used_units": "<string>",
"remaining_units": "<string>",
"window_started_at": "<string>",
"resets_at": "<string>"
}
],
"credits": {
"balance": "<string>",
"currency": null,
"product_id": "<string>",
"aggregator_on_customer_id": "<string>",
"low_balance_threshold": "<string>",
"expiring_soon": [
{
"amount": "<string>",
"expires_at": "<string>"
}
],
"rate_card_summary": {
"llm_rows": 123,
"item_rows": 123,
"has_default_llm_row": true,
"fallback_credits_per_usd": "<string>"
}
},
"overage": {
"mode": "refuse",
"active": true,
"unsettled": "<string>"
},
"last_settled_at": "<string>",
"agents": [
{
"agent": "<string>",
"mode": "wallet",
"balance": {
"denomination": "minor_units",
"wallet": "<string>",
"unsettled": "<string>",
"available": "<string>"
},
"blocked": true,
"meters": [
{
"key": "<string>",
"included_units": "<string>",
"used_units": "<string>",
"remaining_units": "<string>",
"window_started_at": "<string>",
"resets_at": "<string>"
}
],
"overage": {
"mode": "refuse",
"active": true,
"unsettled": "<string>"
}
}
]
}{
"message": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Query Parameters
Required string length:
1 - 128Response
Available options:
wallet, credits, windows Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Was this page helpful?
⌘I

