Get project usage
curl --request GET \
--url https://api.omnara.com/v1/orgs/{orgID}/projects/{projectID}/usage \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.omnara.com/v1/orgs/{orgID}/projects/{projectID}/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}/projects/{projectID}/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}/projects/{projectID}/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}/projects/{projectID}/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}/projects/{projectID}/usage")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.omnara.com/v1/orgs/{orgID}/projects/{projectID}/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 project usage
Tallies model token usage and provider-reported cost across every agent in the project, including subagents, broken down by configured model. Optionally limits the tally to a time window.
GET
/
orgs
/
{orgID}
/
projects
/
{projectID}
/
usage
Get project usage
curl --request GET \
--url https://api.omnara.com/v1/orgs/{orgID}/projects/{projectID}/usage \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.omnara.com/v1/orgs/{orgID}/projects/{projectID}/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}/projects/{projectID}/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}/projects/{projectID}/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}/projects/{projectID}/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}/projects/{projectID}/usage")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.omnara.com/v1/orgs/{orgID}/projects/{projectID}/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}$Pattern:
^proj_[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.