Get org usage
curl --request GET \
--url https://api.omnara.com/v1/orgs/{orgID}/usage \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.omnara.com/v1/orgs/{orgID}/usage"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.omnara.com/v1/orgs/{orgID}/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.omnara.com/v1/orgs/{orgID}/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://api.omnara.com/v1/orgs/{orgID}/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://api.omnara.com/v1/orgs/{orgID}/usage")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.omnara.com/v1/orgs/{orgID}/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{
"totals": {
"model_calls": 1,
"tokens": {
"input_tokens_total": 1,
"uncached_input_tokens": 1,
"cache_read_input_tokens": 1,
"cache_write_input_tokens": 1,
"output_tokens_total": 1,
"reasoning_output_tokens": 1
},
"cost": {
"provider_reported_usd": "<string>",
"model_calls_with_reported_cost": 1
}
},
"by_model": [
{
"model": {
"configured_model_id": "<string>",
"name": "<string>",
"provider_model_slug": "<string>",
"model_provider_config_id": "<string>",
"model_provider_config_name": "<string>"
},
"model_calls": 1,
"tokens": {
"input_tokens_total": 1,
"uncached_input_tokens": 1,
"cache_read_input_tokens": 1,
"cache_write_input_tokens": 1,
"output_tokens_total": 1,
"reasoning_output_tokens": 1
},
"cost": {
"provider_reported_usd": "<string>",
"model_calls_with_reported_cost": 1
}
}
]
}{
"error": "<string>",
"code": "invalid_request",
"issues": [
{
"path": "<string>",
"message": "<string>",
"line": 2,
"column": 2
}
]
}{
"error": "<string>",
"code": "invalid_request",
"issues": [
{
"path": "<string>",
"message": "<string>",
"line": 2,
"column": 2
}
]
}{
"error": "<string>",
"code": "invalid_request",
"issues": [
{
"path": "<string>",
"message": "<string>",
"line": 2,
"column": 2
}
]
}{
"error": "<string>",
"code": "invalid_request",
"issues": [
{
"path": "<string>",
"message": "<string>",
"line": 2,
"column": 2
}
]
}{
"error": "<string>",
"code": "invalid_request"
}{
"error": "<string>",
"code": "internal_error"
}Organizations and Projects
Get org usage
Tallies model token usage and provider-reported cost across every agent in the organization, broken down by configured model. Optionally limits the tally to a time window or to a subset of projects.
GET
/
orgs
/
{orgID}
/
usage
Get org usage
curl --request GET \
--url https://api.omnara.com/v1/orgs/{orgID}/usage \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.omnara.com/v1/orgs/{orgID}/usage"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.omnara.com/v1/orgs/{orgID}/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.omnara.com/v1/orgs/{orgID}/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://api.omnara.com/v1/orgs/{orgID}/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://api.omnara.com/v1/orgs/{orgID}/usage")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.omnara.com/v1/orgs/{orgID}/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{
"totals": {
"model_calls": 1,
"tokens": {
"input_tokens_total": 1,
"uncached_input_tokens": 1,
"cache_read_input_tokens": 1,
"cache_write_input_tokens": 1,
"output_tokens_total": 1,
"reasoning_output_tokens": 1
},
"cost": {
"provider_reported_usd": "<string>",
"model_calls_with_reported_cost": 1
}
},
"by_model": [
{
"model": {
"configured_model_id": "<string>",
"name": "<string>",
"provider_model_slug": "<string>",
"model_provider_config_id": "<string>",
"model_provider_config_name": "<string>"
},
"model_calls": 1,
"tokens": {
"input_tokens_total": 1,
"uncached_input_tokens": 1,
"cache_read_input_tokens": 1,
"cache_write_input_tokens": 1,
"output_tokens_total": 1,
"reasoning_output_tokens": 1
},
"cost": {
"provider_reported_usd": "<string>",
"model_calls_with_reported_cost": 1
}
}
]
}{
"error": "<string>",
"code": "invalid_request",
"issues": [
{
"path": "<string>",
"message": "<string>",
"line": 2,
"column": 2
}
]
}{
"error": "<string>",
"code": "invalid_request",
"issues": [
{
"path": "<string>",
"message": "<string>",
"line": 2,
"column": 2
}
]
}{
"error": "<string>",
"code": "invalid_request",
"issues": [
{
"path": "<string>",
"message": "<string>",
"line": 2,
"column": 2
}
]
}{
"error": "<string>",
"code": "invalid_request",
"issues": [
{
"path": "<string>",
"message": "<string>",
"line": 2,
"column": 2
}
]
}{
"error": "<string>",
"code": "invalid_request"
}{
"error": "<string>",
"code": "internal_error"
}Authorizations
bearerAuthbrowserSessionCookie
An opaque Omnara personal or organization bearer token.
Path Parameters
Pattern:
^org_[a-z2-7]{26}$Query Parameters
Only tally model calls started at or after this instant. Omit to start from the earliest recorded call.
Only tally model calls started before this instant. Must be later than since when both are given. Omit to include calls up to now.
Only tally model calls from these projects. Cannot be combined with exclude_project_ids.
Required array length:
1 - 100 elementsPattern:
^proj_[a-z2-7]{26}$Tally model calls from every project except these. Cannot be combined with include_project_ids.
Required array length:
1 - 100 elementsPattern:
^proj_[a-z2-7]{26}$Response
Usage totals for the organization.