Usage by app, agent, solver, member and day (CR6)
curl --request GET \
--url https://api.eddy.engineer/v1/credits/usage \
--header 'x-api-key: <api-key>'import requests
url = "https://api.eddy.engineer/v1/credits/usage"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.eddy.engineer/v1/credits/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://api.eddy.engineer/v1/credits/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 => [
"x-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.eddy.engineer/v1/credits/usage"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-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.eddy.engineer/v1/credits/usage")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eddy.engineer/v1/credits/usage")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"account": "<string>",
"billing": "<string>",
"by_agent": [
{
"cached": 123,
"credits": 123,
"key": "<string>",
"label": "<string>",
"microcredits": 123,
"rows": 123,
"runs": 123
}
],
"by_app": [
{
"cached": 123,
"credits": 123,
"key": "<string>",
"label": "<string>",
"microcredits": 123,
"rows": 123,
"runs": 123
}
],
"by_day": [
{}
],
"by_member": [
{
"cached": 123,
"credits": 123,
"key": "<string>",
"label": "<string>",
"microcredits": 123,
"rows": 123,
"runs": 123
}
],
"by_op": [
{
"cached": 123,
"credits": 123,
"key": "<string>",
"label": "<string>",
"microcredits": 123,
"rows": 123,
"runs": 123
}
],
"by_solver": [
{
"cached": 123,
"credits": 123,
"key": "<string>",
"label": "<string>",
"microcredits": 123,
"rows": 123,
"runs": 123
}
],
"complete": true,
"direct": {},
"scanned": 123,
"scope": "org",
"totals": {},
"window": {}
}{
"error": {
"code": "INVALID_GEOMETRY",
"message": "<string>"
}
}{
"error": {
"code": "INVALID_GEOMETRY",
"message": "<string>"
}
}{
"error": {
"code": "INVALID_GEOMETRY",
"message": "<string>"
}
}Meta
Usage by app, agent, solver, member and day (CR6)
The caller’s billing account’s metered usage in a window (month=YYYY-MM, or the last days): totals (credits, calls, cached calls, vCPU-seconds, model tokens, agent runs) and the same grouped by app, agent (with its runs), solver (the operation’s family: solve.structural → structural), operation, member and day (every day of the window, the quiet ones too). An org admin reads the whole account (scope: org); anyone else their own calls (scope: mine). Read from the most recent usage rows: scanned says how many, complete whether the read reached back past the window. An app or an agent run is refused 403.
GET
/
v1
/
credits
/
usage
Usage by app, agent, solver, member and day (CR6)
curl --request GET \
--url https://api.eddy.engineer/v1/credits/usage \
--header 'x-api-key: <api-key>'import requests
url = "https://api.eddy.engineer/v1/credits/usage"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.eddy.engineer/v1/credits/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://api.eddy.engineer/v1/credits/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 => [
"x-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.eddy.engineer/v1/credits/usage"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-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.eddy.engineer/v1/credits/usage")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eddy.engineer/v1/credits/usage")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"account": "<string>",
"billing": "<string>",
"by_agent": [
{
"cached": 123,
"credits": 123,
"key": "<string>",
"label": "<string>",
"microcredits": 123,
"rows": 123,
"runs": 123
}
],
"by_app": [
{
"cached": 123,
"credits": 123,
"key": "<string>",
"label": "<string>",
"microcredits": 123,
"rows": 123,
"runs": 123
}
],
"by_day": [
{}
],
"by_member": [
{
"cached": 123,
"credits": 123,
"key": "<string>",
"label": "<string>",
"microcredits": 123,
"rows": 123,
"runs": 123
}
],
"by_op": [
{
"cached": 123,
"credits": 123,
"key": "<string>",
"label": "<string>",
"microcredits": 123,
"rows": 123,
"runs": 123
}
],
"by_solver": [
{
"cached": 123,
"credits": 123,
"key": "<string>",
"label": "<string>",
"microcredits": 123,
"rows": 123,
"runs": 123
}
],
"complete": true,
"direct": {},
"scanned": 123,
"scope": "org",
"totals": {},
"window": {}
}{
"error": {
"code": "INVALID_GEOMETRY",
"message": "<string>"
}
}{
"error": {
"code": "INVALID_GEOMETRY",
"message": "<string>"
}
}{
"error": {
"code": "INVALID_GEOMETRY",
"message": "<string>"
}
}Query Parameters
Response
The usage