cURL
curl --request GET \
--url https://api.{environment}.corti.app/v2/agentic/agents/{agentId}/usage \
--header 'Authorization: Bearer <token>' \
--header 'Tenant-Name: <api-key>'import { CortiClient, CortiEnvironment } from "@corti/sdk";
const client = new CortiClient({
environment: CortiEnvironment.Eu,
auth: {
clientId: "YOUR_CLIENT_ID",
clientSecret: "YOUR_CLIENT_SECRET"
},
tenantName: "YOUR_TENANT_NAME"
});
await client.agentic.agents.usage("agt.0192f4c8-2c5a-7b3e-9f1a-3c8d6e2b7a40", {
from: new Date("2026-05-19T00:00:00.000Z"),
to: new Date("2026-05-20T00:00:00.000Z")
});
using Corti.Agentic;
using Corti;
var client = new CortiClient(
"TENANT_NAME",
CortiClientEnvironment.Eu,
new CortiClientAuth.ClientCredentials("client_id", "client_secret")
);
await client.Agentic.Agents.UsageAsync(
"agt.0192f4c8-2c5a-7b3e-9f1a-3c8d6e2b7a40",
new AgenticAgentsUsageRequest
{
From = new DateTime(2026, 05, 19, 00, 00, 00, 000),
To = new DateTime(2026, 05, 20, 00, 00, 00, 000),
}
);
import requests
url = "https://api.{environment}.corti.app/v2/agentic/agents/{agentId}/usage"
headers = {
"Authorization": "Bearer <token>",
"Tenant-Name": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.{environment}.corti.app/v2/agentic/agents/{agentId}/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>",
"Tenant-Name: <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.{environment}.corti.app/v2/agentic/agents/{agentId}/usage"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Tenant-Name", "<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.{environment}.corti.app/v2/agentic/agents/{agentId}/usage")
.header("Authorization", "Bearer <token>")
.header("Tenant-Name", "<api-key>")
.asString();{
"granularity": "day",
"from": "2026-05-19T00:00:00Z",
"to": "2026-05-21T00:00:00Z",
"totals": {
"invocations": 15,
"uniqueContexts": 6
},
"buckets": [
{
"periodStart": "2026-05-19T00:00:00Z",
"periodEnd": "2026-05-20T00:00:00Z",
"invocations": 12,
"uniqueContexts": 5
},
{
"periodStart": "2026-05-20T00:00:00Z",
"periodEnd": "2026-05-21T00:00:00Z",
"invocations": 3,
"uniqueContexts": 2
}
]
}{
"error": {
"code": "ASSIGNMENT_CONFLICT",
"message": "could not complete assignment",
"details": {
"assignment_id": "asg_99",
"expert_id": "exp_42"
}
}
}{
"error": {
"code": "ASSIGNMENT_CONFLICT",
"message": "could not complete assignment",
"details": {
"assignment_id": "asg_99",
"expert_id": "exp_42"
}
}
}{
"error": {
"code": "ASSIGNMENT_CONFLICT",
"message": "could not complete assignment",
"details": {
"assignment_id": "asg_99",
"expert_id": "exp_42"
}
}
}Usage
Get an agent's usage
Returns invocation metrics for the agent over the half-open [from, to)
time range (UTC), bucketed at the requested granularity. The response
echoes the resolved range and granularity, a totals summary across the
whole range, and one buckets entry per period that had activity (the
array is empty when there was none). When from/to are omitted, the
range defaults to the last 30 days.
GET
/
agentic
/
agents
/
{agentId}
/
usage
cURL
curl --request GET \
--url https://api.{environment}.corti.app/v2/agentic/agents/{agentId}/usage \
--header 'Authorization: Bearer <token>' \
--header 'Tenant-Name: <api-key>'import { CortiClient, CortiEnvironment } from "@corti/sdk";
const client = new CortiClient({
environment: CortiEnvironment.Eu,
auth: {
clientId: "YOUR_CLIENT_ID",
clientSecret: "YOUR_CLIENT_SECRET"
},
tenantName: "YOUR_TENANT_NAME"
});
await client.agentic.agents.usage("agt.0192f4c8-2c5a-7b3e-9f1a-3c8d6e2b7a40", {
from: new Date("2026-05-19T00:00:00.000Z"),
to: new Date("2026-05-20T00:00:00.000Z")
});
using Corti.Agentic;
using Corti;
var client = new CortiClient(
"TENANT_NAME",
CortiClientEnvironment.Eu,
new CortiClientAuth.ClientCredentials("client_id", "client_secret")
);
await client.Agentic.Agents.UsageAsync(
"agt.0192f4c8-2c5a-7b3e-9f1a-3c8d6e2b7a40",
new AgenticAgentsUsageRequest
{
From = new DateTime(2026, 05, 19, 00, 00, 00, 000),
To = new DateTime(2026, 05, 20, 00, 00, 00, 000),
}
);
import requests
url = "https://api.{environment}.corti.app/v2/agentic/agents/{agentId}/usage"
headers = {
"Authorization": "Bearer <token>",
"Tenant-Name": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.{environment}.corti.app/v2/agentic/agents/{agentId}/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>",
"Tenant-Name: <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.{environment}.corti.app/v2/agentic/agents/{agentId}/usage"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Tenant-Name", "<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.{environment}.corti.app/v2/agentic/agents/{agentId}/usage")
.header("Authorization", "Bearer <token>")
.header("Tenant-Name", "<api-key>")
.asString();{
"granularity": "day",
"from": "2026-05-19T00:00:00Z",
"to": "2026-05-21T00:00:00Z",
"totals": {
"invocations": 15,
"uniqueContexts": 6
},
"buckets": [
{
"periodStart": "2026-05-19T00:00:00Z",
"periodEnd": "2026-05-20T00:00:00Z",
"invocations": 12,
"uniqueContexts": 5
},
{
"periodStart": "2026-05-20T00:00:00Z",
"periodEnd": "2026-05-21T00:00:00Z",
"invocations": 3,
"uniqueContexts": 2
}
]
}{
"error": {
"code": "ASSIGNMENT_CONFLICT",
"message": "could not complete assignment",
"details": {
"assignment_id": "asg_99",
"expert_id": "exp_42"
}
}
}{
"error": {
"code": "ASSIGNMENT_CONFLICT",
"message": "could not complete assignment",
"details": {
"assignment_id": "asg_99",
"expert_id": "exp_42"
}
}
}{
"error": {
"code": "ASSIGNMENT_CONFLICT",
"message": "could not complete assignment",
"details": {
"assignment_id": "asg_99",
"expert_id": "exp_42"
}
}
}Authorizations
Path Parameters
Query Parameters
Response
The agent's bucketed usage over the requested range.
An agent's bucketed usage over a date range, with range-wide totals.
Was this page helpful?