curl --request GET \
--url https://app.pepline.ai/api/v1/usage \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.pepline.ai/api/v1/usage"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.pepline.ai/api/v1/usage', 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://app.pepline.ai/api/v1/usage",
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://app.pepline.ai/api/v1/usage"
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://app.pepline.ai/api/v1/usage")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.pepline.ai/api/v1/usage")
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{
"object": "usage",
"period": "current",
"trial": true,
"trial_granted": true,
"trial_ends_at": "2023-11-07T05:31:56Z",
"subscription": {
"status": "<string>",
"renews_at": "2023-11-07T05:31:56Z",
"cancels_at": "2023-11-07T05:31:56Z"
},
"credits": {
"used": 123,
"allowance": 123
},
"conversations": {
"count": 123,
"allowance": 123,
"credits": 123
},
"pages": {
"count": 123,
"credits": 123
},
"documents": {
"count": 123,
"credits": 123
},
"rates": {}
}{
"error": {
"type": "authentication_error",
"code": "missing_api_key",
"message": "<string>",
"param": "<string>"
}
}Credits consumed vs the allowance
The dashboard’s Usage arithmetic: conversations started, website pages read and documents processed in the period, each priced at the org’s credit rates, against the monthly allowance. period: current (this calendar month; the whole trial for trial orgs), 30d, or all.
curl --request GET \
--url https://app.pepline.ai/api/v1/usage \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.pepline.ai/api/v1/usage"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.pepline.ai/api/v1/usage', 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://app.pepline.ai/api/v1/usage",
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://app.pepline.ai/api/v1/usage"
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://app.pepline.ai/api/v1/usage")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.pepline.ai/api/v1/usage")
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{
"object": "usage",
"period": "current",
"trial": true,
"trial_granted": true,
"trial_ends_at": "2023-11-07T05:31:56Z",
"subscription": {
"status": "<string>",
"renews_at": "2023-11-07T05:31:56Z",
"cancels_at": "2023-11-07T05:31:56Z"
},
"credits": {
"used": 123,
"allowance": 123
},
"conversations": {
"count": 123,
"allowance": 123,
"credits": 123
},
"pages": {
"count": 123,
"credits": 123
},
"documents": {
"count": 123,
"credits": 123
},
"rates": {}
}{
"error": {
"type": "authentication_error",
"code": "missing_api_key",
"message": "<string>",
"param": "<string>"
}
}Authorizations
Your secret key (pep_sk_…) from Settings → API. Keys are org-scoped; treat them like passwords.
Query Parameters
current, 30d, all Response
Usage for the period.
"usage"current, 30d, all On the trial plan (no paid subscription).
The trial allowance exists (100 lifetime credits). A trial-plan org without a grant has allowance 0 and must pick a plan.
When the 30-day trial window closes; null while the clock has not started (operator-provisioned orgs start it when the owner claims the org).
The paid subscription's lifecycle as Stripe last reported it; null on the trial plan.
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
Credits per conversation, page and document.

