Get a customer's agent billing overview
curl --request GET \
--url https://api.hyperline.co/v1/agents/customers/{customer_id}/overview \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.hyperline.co/v1/agents/customers/{customer_id}/overview"
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}/overview', 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}/overview",
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}/overview"
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}/overview")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hyperline.co/v1/agents/customers/{customer_id}/overview")
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{
"customer": {
"id": "<string>",
"name": "<string>",
"external_id": "<string>",
"domain": "<string>",
"status": "<string>",
"country": "<string>",
"currency": "<string>"
},
"default_policy": {
"id": "<string>",
"customer_id": "<string>",
"internal_description": "<string>",
"created_at": "2024-12-20T16:04:11Z",
"updated_at": "2024-12-20T16:04:11Z",
"agent_slug": "<string>",
"is_default": true,
"mode": "wallet",
"wallet_id": "<string>",
"credit_product_id": "<string>",
"markup_percent": "<string>",
"overage_mode": "refuse",
"overage_markup_percent": "<string>",
"overage_rate_card_id": "<string>",
"overage_rate_card_source": "policy",
"overage_wallet_id": "<string>",
"floor": "<string>",
"credit_rates": {
"llm": [
{
"credits_per_1m_input": "<string>",
"credits_per_1m_output": "<string>",
"provider": "<string>",
"model": "<string>",
"credits_per_1m_cached_input": "<string>",
"credits_per_1m_cache_write": "<string>",
"dimensions": [
{
"key": "<string>",
"rate": "<string>",
"per": "1m"
}
]
}
],
"items": [
{
"vendor": "<string>",
"item": "<string>",
"credits_per_unit": "<string>",
"dimensions": [
{
"key": "<string>",
"rate": "<string>",
"per": "1m"
}
]
}
],
"fallback_credits_per_usd": "<string>"
},
"window_rates": {
"unit_rates": {
"llm": [
{
"units_per_1m_input": "<string>",
"units_per_1m_output": "<string>",
"provider": "<string>",
"model": "<string>",
"units_per_1m_cached_input": "<string>",
"units_per_1m_cache_write": "<string>",
"dimensions": [
{
"key": "<string>",
"rate": "<string>",
"per": "1m"
}
]
}
],
"items": [
{
"vendor": "<string>",
"item": "<string>",
"units_per_unit": "<string>",
"dimensions": [
{
"key": "<string>",
"rate": "<string>",
"per": "1m"
}
]
}
],
"fallback_units_per_usd": "<string>"
},
"windows": [
{
"key": "<string>",
"duration_minutes": 263520,
"included_units": "<string>"
}
]
},
"rate_card_id": "<string>",
"rate_card_source": "policy",
"plan": {
"id": "<string>",
"name": "<string>"
},
"settlement_interval_minutes": 123,
"settlement_schedule": "calendar_month",
"resolved_rate_card": {
"fallback_per_usd": "<string>",
"layer_count": 123,
"llm_rows": 123,
"item_rows": 123,
"has_default_llm_row": true
},
"blocked": true
},
"agents": [
{
"agent": "<string>",
"display_name": "<string>",
"has_override": true,
"policy": {
"id": "<string>",
"customer_id": "<string>",
"internal_description": "<string>",
"created_at": "2024-12-20T16:04:11Z",
"updated_at": "2024-12-20T16:04:11Z",
"agent_slug": "<string>",
"is_default": true,
"mode": "wallet",
"wallet_id": "<string>",
"credit_product_id": "<string>",
"markup_percent": "<string>",
"overage_mode": "refuse",
"overage_markup_percent": "<string>",
"overage_rate_card_id": "<string>",
"overage_rate_card_source": "policy",
"overage_wallet_id": "<string>",
"floor": "<string>",
"credit_rates": {
"llm": [
{
"credits_per_1m_input": "<string>",
"credits_per_1m_output": "<string>",
"provider": "<string>",
"model": "<string>",
"credits_per_1m_cached_input": "<string>",
"credits_per_1m_cache_write": "<string>",
"dimensions": [
{
"key": "<string>",
"rate": "<string>",
"per": "1m"
}
]
}
],
"items": [
{
"vendor": "<string>",
"item": "<string>",
"credits_per_unit": "<string>",
"dimensions": [
{
"key": "<string>",
"rate": "<string>",
"per": "1m"
}
]
}
],
"fallback_credits_per_usd": "<string>"
},
"window_rates": {
"unit_rates": {
"llm": [
{
"units_per_1m_input": "<string>",
"units_per_1m_output": "<string>",
"provider": "<string>",
"model": "<string>",
"units_per_1m_cached_input": "<string>",
"units_per_1m_cache_write": "<string>",
"dimensions": [
{
"key": "<string>",
"rate": "<string>",
"per": "1m"
}
]
}
],
"items": [
{
"vendor": "<string>",
"item": "<string>",
"units_per_unit": "<string>",
"dimensions": [
{
"key": "<string>",
"rate": "<string>",
"per": "1m"
}
]
}
],
"fallback_units_per_usd": "<string>"
},
"windows": [
{
"key": "<string>",
"duration_minutes": 263520,
"included_units": "<string>"
}
]
},
"rate_card_id": "<string>",
"rate_card_source": "policy",
"plan": {
"id": "<string>",
"name": "<string>"
},
"settlement_interval_minutes": 123,
"settlement_schedule": "calendar_month",
"resolved_rate_card": {
"fallback_per_usd": "<string>",
"layer_count": 123,
"llm_rows": 123,
"item_rows": 123,
"has_default_llm_row": true
},
"blocked": true
},
"mode": "wallet",
"blocked": true,
"balance": {
"denomination": "minor_units",
"wallet": "<string>",
"unsettled": "<string>",
"available": "<string>"
},
"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>"
}
},
"consumed": {
"denomination": "minor_units",
"amount": "<string>",
"entry_count": 123
},
"unpriced_entry_count": 123,
"last_consumed_at": "<string>"
}
],
"unpriced_entry_count": 123
}{
"message": "<string>"
}Agents
Get a customer's agent billing overview
Everything the customer’s AI billing page renders in one read: the customer, their default policy, and one row per agent with a pool of its own — each with its balance, mode and consumed total. Consumed totals come from the billed ledger, never from provider cost.
GET
/
v1
/
agents
/
customers
/
{customer_id}
/
overview
Get a customer's agent billing overview
curl --request GET \
--url https://api.hyperline.co/v1/agents/customers/{customer_id}/overview \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.hyperline.co/v1/agents/customers/{customer_id}/overview"
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}/overview', 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}/overview",
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}/overview"
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}/overview")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hyperline.co/v1/agents/customers/{customer_id}/overview")
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{
"customer": {
"id": "<string>",
"name": "<string>",
"external_id": "<string>",
"domain": "<string>",
"status": "<string>",
"country": "<string>",
"currency": "<string>"
},
"default_policy": {
"id": "<string>",
"customer_id": "<string>",
"internal_description": "<string>",
"created_at": "2024-12-20T16:04:11Z",
"updated_at": "2024-12-20T16:04:11Z",
"agent_slug": "<string>",
"is_default": true,
"mode": "wallet",
"wallet_id": "<string>",
"credit_product_id": "<string>",
"markup_percent": "<string>",
"overage_mode": "refuse",
"overage_markup_percent": "<string>",
"overage_rate_card_id": "<string>",
"overage_rate_card_source": "policy",
"overage_wallet_id": "<string>",
"floor": "<string>",
"credit_rates": {
"llm": [
{
"credits_per_1m_input": "<string>",
"credits_per_1m_output": "<string>",
"provider": "<string>",
"model": "<string>",
"credits_per_1m_cached_input": "<string>",
"credits_per_1m_cache_write": "<string>",
"dimensions": [
{
"key": "<string>",
"rate": "<string>",
"per": "1m"
}
]
}
],
"items": [
{
"vendor": "<string>",
"item": "<string>",
"credits_per_unit": "<string>",
"dimensions": [
{
"key": "<string>",
"rate": "<string>",
"per": "1m"
}
]
}
],
"fallback_credits_per_usd": "<string>"
},
"window_rates": {
"unit_rates": {
"llm": [
{
"units_per_1m_input": "<string>",
"units_per_1m_output": "<string>",
"provider": "<string>",
"model": "<string>",
"units_per_1m_cached_input": "<string>",
"units_per_1m_cache_write": "<string>",
"dimensions": [
{
"key": "<string>",
"rate": "<string>",
"per": "1m"
}
]
}
],
"items": [
{
"vendor": "<string>",
"item": "<string>",
"units_per_unit": "<string>",
"dimensions": [
{
"key": "<string>",
"rate": "<string>",
"per": "1m"
}
]
}
],
"fallback_units_per_usd": "<string>"
},
"windows": [
{
"key": "<string>",
"duration_minutes": 263520,
"included_units": "<string>"
}
]
},
"rate_card_id": "<string>",
"rate_card_source": "policy",
"plan": {
"id": "<string>",
"name": "<string>"
},
"settlement_interval_minutes": 123,
"settlement_schedule": "calendar_month",
"resolved_rate_card": {
"fallback_per_usd": "<string>",
"layer_count": 123,
"llm_rows": 123,
"item_rows": 123,
"has_default_llm_row": true
},
"blocked": true
},
"agents": [
{
"agent": "<string>",
"display_name": "<string>",
"has_override": true,
"policy": {
"id": "<string>",
"customer_id": "<string>",
"internal_description": "<string>",
"created_at": "2024-12-20T16:04:11Z",
"updated_at": "2024-12-20T16:04:11Z",
"agent_slug": "<string>",
"is_default": true,
"mode": "wallet",
"wallet_id": "<string>",
"credit_product_id": "<string>",
"markup_percent": "<string>",
"overage_mode": "refuse",
"overage_markup_percent": "<string>",
"overage_rate_card_id": "<string>",
"overage_rate_card_source": "policy",
"overage_wallet_id": "<string>",
"floor": "<string>",
"credit_rates": {
"llm": [
{
"credits_per_1m_input": "<string>",
"credits_per_1m_output": "<string>",
"provider": "<string>",
"model": "<string>",
"credits_per_1m_cached_input": "<string>",
"credits_per_1m_cache_write": "<string>",
"dimensions": [
{
"key": "<string>",
"rate": "<string>",
"per": "1m"
}
]
}
],
"items": [
{
"vendor": "<string>",
"item": "<string>",
"credits_per_unit": "<string>",
"dimensions": [
{
"key": "<string>",
"rate": "<string>",
"per": "1m"
}
]
}
],
"fallback_credits_per_usd": "<string>"
},
"window_rates": {
"unit_rates": {
"llm": [
{
"units_per_1m_input": "<string>",
"units_per_1m_output": "<string>",
"provider": "<string>",
"model": "<string>",
"units_per_1m_cached_input": "<string>",
"units_per_1m_cache_write": "<string>",
"dimensions": [
{
"key": "<string>",
"rate": "<string>",
"per": "1m"
}
]
}
],
"items": [
{
"vendor": "<string>",
"item": "<string>",
"units_per_unit": "<string>",
"dimensions": [
{
"key": "<string>",
"rate": "<string>",
"per": "1m"
}
]
}
],
"fallback_units_per_usd": "<string>"
},
"windows": [
{
"key": "<string>",
"duration_minutes": 263520,
"included_units": "<string>"
}
]
},
"rate_card_id": "<string>",
"rate_card_source": "policy",
"plan": {
"id": "<string>",
"name": "<string>"
},
"settlement_interval_minutes": 123,
"settlement_schedule": "calendar_month",
"resolved_rate_card": {
"fallback_per_usd": "<string>",
"layer_count": 123,
"llm_rows": 123,
"item_rows": 123,
"has_default_llm_row": true
},
"blocked": true
},
"mode": "wallet",
"blocked": true,
"balance": {
"denomination": "minor_units",
"wallet": "<string>",
"unsettled": "<string>",
"available": "<string>"
},
"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>"
}
},
"consumed": {
"denomination": "minor_units",
"amount": "<string>",
"entry_count": 123
},
"unpriced_entry_count": 123,
"last_consumed_at": "<string>"
}
],
"unpriced_entry_count": 123
}{
"message": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Was this page helpful?
⌘I

