Audit pricing coverage for recent cost events
curl --request POST \
--url http://localhost:3000/api/v1/costs/pricing \
--header 'Content-Type: application/json' \
--data '
{
"dryRun": true,
"fields": "<string>",
"hours": "<string>",
"includePriced": true,
"limit": "<string>",
"recompute": true
}
'import requests
url = "http://localhost:3000/api/v1/costs/pricing"
payload = {
"dryRun": True,
"fields": "<string>",
"hours": "<string>",
"includePriced": True,
"limit": "<string>",
"recompute": True
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
dryRun: true,
fields: '<string>',
hours: '<string>',
includePriced: true,
limit: '<string>',
recompute: true
})
};
fetch('http://localhost:3000/api/v1/costs/pricing', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "3000",
CURLOPT_URL => "http://localhost:3000/api/v1/costs/pricing",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'dryRun' => true,
'fields' => '<string>',
'hours' => '<string>',
'includePriced' => true,
'limit' => '<string>',
'recompute' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://localhost:3000/api/v1/costs/pricing"
payload := strings.NewReader("{\n \"dryRun\": true,\n \"fields\": \"<string>\",\n \"hours\": \"<string>\",\n \"includePriced\": true,\n \"limit\": \"<string>\",\n \"recompute\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("http://localhost:3000/api/v1/costs/pricing")
.header("Content-Type", "application/json")
.body("{\n \"dryRun\": true,\n \"fields\": \"<string>\",\n \"hours\": \"<string>\",\n \"includePriced\": true,\n \"limit\": \"<string>\",\n \"recompute\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3000/api/v1/costs/pricing")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"dryRun\": true,\n \"fields\": \"<string>\",\n \"hours\": \"<string>\",\n \"includePriced\": true,\n \"limit\": \"<string>\",\n \"recompute\": true\n}"
response = http.request(request)
puts response.read_body{
"rows": [
{
"events": 123,
"lastCreatedAt": 123,
"model": "<string>",
"pricingModel": "<string>",
"pricingSource": "<string>",
"pricingStatus": "<string>",
"totalCost": 123,
"totalTokens": 123
}
],
"window": {
"effectiveHours": 123,
"requestedHours": "<string>",
"sinceMs": 123,
"untilMs": 123
},
"recompute": {
"attempted": 123,
"dryRun": true,
"includePriced": true,
"limit": 123,
"priced": 123,
"rows": [
{
"id": 123,
"model": "<string>",
"previousPricingStatus": "<string>",
"pricingError": "<string>",
"pricingModel": "<string>",
"pricingSource": "<string>",
"pricingStatus": "<string>",
"totalCost": 123
}
],
"unpriced": 123,
"updated": 123
}
}costs
Audit pricing coverage for recent cost events
POST
/
api
/
v1
/
costs
/
pricing
Audit pricing coverage for recent cost events
curl --request POST \
--url http://localhost:3000/api/v1/costs/pricing \
--header 'Content-Type: application/json' \
--data '
{
"dryRun": true,
"fields": "<string>",
"hours": "<string>",
"includePriced": true,
"limit": "<string>",
"recompute": true
}
'import requests
url = "http://localhost:3000/api/v1/costs/pricing"
payload = {
"dryRun": True,
"fields": "<string>",
"hours": "<string>",
"includePriced": True,
"limit": "<string>",
"recompute": True
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
dryRun: true,
fields: '<string>',
hours: '<string>',
includePriced: true,
limit: '<string>',
recompute: true
})
};
fetch('http://localhost:3000/api/v1/costs/pricing', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "3000",
CURLOPT_URL => "http://localhost:3000/api/v1/costs/pricing",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'dryRun' => true,
'fields' => '<string>',
'hours' => '<string>',
'includePriced' => true,
'limit' => '<string>',
'recompute' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://localhost:3000/api/v1/costs/pricing"
payload := strings.NewReader("{\n \"dryRun\": true,\n \"fields\": \"<string>\",\n \"hours\": \"<string>\",\n \"includePriced\": true,\n \"limit\": \"<string>\",\n \"recompute\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("http://localhost:3000/api/v1/costs/pricing")
.header("Content-Type", "application/json")
.body("{\n \"dryRun\": true,\n \"fields\": \"<string>\",\n \"hours\": \"<string>\",\n \"includePriced\": true,\n \"limit\": \"<string>\",\n \"recompute\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3000/api/v1/costs/pricing")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"dryRun\": true,\n \"fields\": \"<string>\",\n \"hours\": \"<string>\",\n \"includePriced\": true,\n \"limit\": \"<string>\",\n \"recompute\": true\n}"
response = http.request(request)
puts response.read_body{
"rows": [
{
"events": 123,
"lastCreatedAt": 123,
"model": "<string>",
"pricingModel": "<string>",
"pricingSource": "<string>",
"pricingStatus": "<string>",
"totalCost": 123,
"totalTokens": 123
}
],
"window": {
"effectiveHours": 123,
"requestedHours": "<string>",
"sinceMs": 123,
"untilMs": 123
},
"recompute": {
"attempted": 123,
"dryRun": true,
"includePriced": true,
"limit": 123,
"priced": 123,
"rows": [
{
"id": 123,
"model": "<string>",
"previousPricingStatus": "<string>",
"pricingError": "<string>",
"pricingModel": "<string>",
"pricingSource": "<string>",
"pricingStatus": "<string>",
"totalCost": 123
}
],
"unpriced": 123,
"updated": 123
}
}Body
application/json
Preview recompute results without updating cost_events
Compact mode: keep only these fields of each coverage row
Time window in hours (default: 24)
Also recompute rows already marked as priced
Maximum rows to recompute (default: 500, max: 5000)
Recompute pricing metadata for non-priced rows in the window