curl --request GET \
--url https://api.cekura.ai/test_framework/billing/unit-usage-report/ \
--header 'X-CEKURA-API-KEY: <api-key>'import requests
url = "https://api.cekura.ai/test_framework/billing/unit-usage-report/"
headers = {"X-CEKURA-API-KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-CEKURA-API-KEY': '<api-key>'}};
fetch('https://api.cekura.ai/test_framework/billing/unit-usage-report/', 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.cekura.ai/test_framework/billing/unit-usage-report/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-CEKURA-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.cekura.ai/test_framework/billing/unit-usage-report/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-CEKURA-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.cekura.ai/test_framework/billing/unit-usage-report/")
.header("X-CEKURA-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cekura.ai/test_framework/billing/unit-usage-report/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-CEKURA-API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"organization_id": 123,
"start_date": "2023-12-25",
"end_date": "2023-12-25",
"group_by": "<string>",
"timezone": "<string>",
"untyped_scheme": true,
"old_text_pricing": true,
"periods": [
"<string>"
],
"rows": [
{
"key": "<string>",
"group": "<string>",
"unit": "<string>",
"field": "<string>",
"kind": "count",
"values": {},
"total": 123
}
]
}Get Unit Usage Report
Returns an organization’s usage per billable unit (voice and text simulations, monitored calls, metric evaluations, triage, insights, Labs and AI metric building) with the credits billed for each, one column per calendar month (UTC) plus a total. The range may span at most 12 months. Each row’s values maps a month (YYYY-MM) to a number; other_credits covers any remaining billed item and refunds are a negative row, so credit rows sum to total_credits. With an organization-scoped API key the organization comes from the key; with a user session pass organization_id (organization admins only). Pass format=csv to download the same table as CSV. Results may lag usage by up to 30 minutes.
curl --request GET \
--url https://api.cekura.ai/test_framework/billing/unit-usage-report/ \
--header 'X-CEKURA-API-KEY: <api-key>'import requests
url = "https://api.cekura.ai/test_framework/billing/unit-usage-report/"
headers = {"X-CEKURA-API-KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-CEKURA-API-KEY': '<api-key>'}};
fetch('https://api.cekura.ai/test_framework/billing/unit-usage-report/', 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.cekura.ai/test_framework/billing/unit-usage-report/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-CEKURA-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.cekura.ai/test_framework/billing/unit-usage-report/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-CEKURA-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.cekura.ai/test_framework/billing/unit-usage-report/")
.header("X-CEKURA-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cekura.ai/test_framework/billing/unit-usage-report/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-CEKURA-API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"organization_id": 123,
"start_date": "2023-12-25",
"end_date": "2023-12-25",
"group_by": "<string>",
"timezone": "<string>",
"untyped_scheme": true,
"old_text_pricing": true,
"periods": [
"<string>"
],
"rows": [
{
"key": "<string>",
"group": "<string>",
"unit": "<string>",
"field": "<string>",
"kind": "count",
"values": {},
"total": 123
}
]
}Authorizations
API Key Authentication. It should be included in the header of each request.
Query Parameters
Response format. Default: json.
csv, json Organization ID. Required for user sessions; ignored for organization-scoped API keys.
First day of the range (YYYY-MM-DD), inclusive.
Last day of the range (YYYY-MM-DD), inclusive. At most 12 calendar months after start_date.
Period to group by. Default: month.
month Response
Timezone of the month boundaries (UTC).
True when the organization's charges in this range weren't recorded per unit; per-unit credit rows are then null and only counts and totals apply.
True when text simulations are billed at a flat rate, so #Responses is null.
Month keys (YYYY-MM) in order.
Show child attributes
Show child attributes