Organization usage
List the caller's organization's usage logs, most recent first.
The tenant-scoped counterpart of GET /api/v1/usage: same filters, same bare JSON array, same separate /count for a paginator's total, confined to what the caller's membership lets them see. Scope is never a parameter here.
Enter your API key here (sent as Otari-Key header).
Return logs with timestamp >= start_date (ISO 8601 or Unix epoch seconds)
Return logs with timestamp < end_date (ISO 8601 or Unix epoch seconds)
Filter to one or more users; repeatable (user_id=a&user_id=b). Several values match any of them. At most 50 per call.
Filter to a single status: 'success', 'error', or 'absorbed' (an attempt a routing policy recovered from, excluded from error_count and request_count)
Filter to a single failure status code (e.g. 429 for provider rate limits, 402 for missing-pricing rejections). Only error rows carry one, so this filter also restricts to status='error' unless 'status' is given explicitly
Filter to one or more models; repeatable (model=a&model=b). Several values match any of them. At most 50 per call.
Filter to a single endpoint (e.g. '/v1/chat/completions')
Filter to a single provider (e.g. 'openai')
Filter to a single provenance source (e.g. 'gateway' or 'claude_code')
Filter to a single session (source_label): the session's trace id on a gateway request that named one, or the session/project label imported usage carried
Filter by a request tag (what a request sent in its metadata), as key:value. Repeatable: values for the same key match any of them, and different keys must all match. At most 50 per call.
Filter to one or more API key ids; repeatable (api_key_id=a&api_key_id=b). Several values match any of them. At most 50 per call.
Filter by token-pricing state: true = only rows whose model tokens were priced, false = only rows that still need pricing (no cost at all, or tokens that were never metered because the model had no rate). A row charged only for gateway-run tool calls still counts as needing pricing.
Filter to requests that ran a gateway-run tool. 'any' matches any tool; a tool name (web_search, web_fetch, code_execution) matches that tool specifically.
Filter by budget participation, which is not the same question as provenance: true = only enforced gateway rows, false = every row that never touches a budget, meaning imported usage and also gateway traffic on a budget-exempt key
Filter to the rows of one or more request groups; repeatable (request_group_id=a&request_group_id=b). A routed request writes one row per attempt, all sharing a request_group_id, so this returns a request's whole plan: its absorbed attempts and the attempt that served it. Ignore ordering by timestamp and read attempt_position to reconstruct the plan. At most 1000 ids per call.
Only usage recorded in this workspace.
0100Successful Response
A single usage log entry.
Validation Error
GET /api/v1/organizations/me/usage HTTP/1.1
Otari-Key: YOUR_API_KEY
Accept: */*
[
{
"api_key_id": "text",
"api_key_name": "text",
"attempt_count": 1,
"attempt_position": 1,
"billing_meters": {
"tools": {
"ANY_ADDITIONAL_PROPERTY": {
"billed": 1,
"errors": 1,
"unit_rate": 1,
"ANY_ADDITIONAL_PROPERTY": "anything"
}
},
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"bulk_editable": true,
"cache_read_tokens": 1,
"cache_write_1h_tokens": 1,
"cache_write_tokens": 1,
"completion_tokens": 1,
"cost": 1,
"counts_toward_budget": true,
"endpoint": "text",
"error_message": "text",
"id": "text",
"latency_ms": 1,
"model": "text",
"policy_name": "text",
"pricing_breakdown": [
{
"cost": 1,
"label": "text",
"meter": "text",
"unit_rate": 1,
"units": 1,
"ANY_ADDITIONAL_PROPERTY": "anything"
}
],
"prompt_tokens": 1,
"provider": "text",
"provider_latency_ms": 1,
"reasoning_tokens": 1,
"request_group_id": "text",
"selection_reason": "text",
"source": "text",
"source_label": "text",
"status": "text",
"status_code": 1,
"stream_cut_by": "provider",
"tags": {
"ANY_ADDITIONAL_PROPERTY": "text"
},
"timestamp": "text",
"total_tokens": 1,
"user_alias": "text",
"user_id": "text"
}
]Total rows matching these filters, within the caller's scope.
Serves the paginator's "N of M" beside the list above, and is scoped the same way, so the total can never describe more rows than the list will show.
Unlike the operator's GET /api/v1/usage/count, counts_toward_budget=false is not narrowed to imported rows here: that narrowing sizes the bulk mutations, and this surface has none. So this total keeps matching the list beside it.
Enter your API key here (sent as Otari-Key header).
Return logs with timestamp >= start_date (ISO 8601 or Unix epoch seconds)
Return logs with timestamp < end_date (ISO 8601 or Unix epoch seconds)
Filter to one or more users; repeatable (user_id=a&user_id=b). Several values match any of them. At most 50 per call.
Filter to a single status: 'success', 'error', or 'absorbed' (an attempt a routing policy recovered from, excluded from error_count and request_count)
Filter to a single failure status code (e.g. 429 for provider rate limits, 402 for missing-pricing rejections). Only error rows carry one, so this filter also restricts to status='error' unless 'status' is given explicitly
Filter to one or more models; repeatable (model=a&model=b). Several values match any of them. At most 50 per call.
Filter to a single endpoint (e.g. '/v1/chat/completions')
Filter to a single provider (e.g. 'openai')
Filter to a single provenance source (e.g. 'gateway' or 'claude_code')
Filter to a single session (source_label): the session's trace id on a gateway request that named one, or the session/project label imported usage carried
Filter by a request tag (what a request sent in its metadata), as key:value. Repeatable: values for the same key match any of them, and different keys must all match. At most 50 per call.
Filter to one or more API key ids; repeatable (api_key_id=a&api_key_id=b). Several values match any of them. At most 50 per call.
Filter by token-pricing state: true = only rows whose model tokens were priced, false = only rows that still need pricing (no cost at all, or tokens that were never metered because the model had no rate). A row charged only for gateway-run tool calls still counts as needing pricing.
Filter to requests that ran a gateway-run tool. 'any' matches any tool; a tool name (web_search, web_fetch, code_execution) matches that tool specifically.
Filter by budget participation, which is not the same question as provenance: true = only enforced gateway rows, false = every row that never touches a budget, meaning imported usage and also gateway traffic on a budget-exempt key
Filter to the rows of one or more request groups; repeatable (request_group_id=a&request_group_id=b). A routed request writes one row per attempt, all sharing a request_group_id, so this returns a request's whole plan: its absorbed attempts and the attempt that served it. Ignore ordering by timestamp and read attempt_position to reconstruct the plan. At most 1000 ids per call.
Only usage recorded in this workspace.
Successful Response
Total number of usage logs matching a set of filters.
Validation Error
GET /api/v1/organizations/me/usage/count HTTP/1.1
Otari-Key: YOUR_API_KEY
Accept: */*
{
"total": 1
}Time series split by one dimension, for the caller's organization.
The tenant-scoped counterpart of GET /api/v1/usage/series, and kept in lockstep with the summary above for the reason that endpoint gives: the dashboard serializes one filter object for both, so a filter one of them ignored would make the stacked chart disagree with the tiles beside it.
Enter your API key here (sent as Otari-Key header).
Dimension to split the series by
Return logs with timestamp >= start_date (ISO 8601 or Unix epoch seconds)
Return logs with timestamp < end_date (ISO 8601 or Unix epoch seconds)
Filter to one or more users; repeatable (user_id=a&user_id=b). Several values match any of them. At most 50 per call.
Filter to a single status: 'success', 'error', or 'absorbed' (an attempt a routing policy recovered from, excluded from error_count and request_count)
Filter to a single failure status code (e.g. 429 for provider rate limits, 402 for missing-pricing rejections). Only error rows carry one, so this filter also restricts to status='error' unless 'status' is given explicitly
Filter to one or more models; repeatable (model=a&model=b). Several values match any of them. At most 50 per call.
Filter to a single endpoint (e.g. '/v1/chat/completions')
Filter to a single provider (e.g. 'openai')
Filter to a single provenance source (e.g. 'gateway' or 'claude_code')
Filter to a single session (source_label): the session's trace id on a gateway request that named one, or the session/project label imported usage carried
Filter by a request tag (what a request sent in its metadata), as key:value. Repeatable: values for the same key match any of them, and different keys must all match. At most 50 per call.
Filter to one or more API key ids; repeatable (api_key_id=a&api_key_id=b). Several values match any of them. At most 50 per call.
Filter by token-pricing state: true = only rows whose model tokens were priced, false = only rows that still need pricing (no cost at all, or tokens that were never metered because the model had no rate). A row charged only for gateway-run tool calls still counts as needing pricing.
Filter to requests that ran a gateway-run tool. 'any' matches any tool; a tool name (web_search, web_fetch, code_execution) matches that tool specifically.
Filter by budget participation, which is not the same question as provenance: true = only enforced gateway rows, false = every row that never touches a budget, meaning imported usage and also gateway traffic on a budget-exempt key
Only usage recorded in this workspace.
Time-series granularity: 'hour' or 'day'
dayPossible values: Successful Response
A per-group time series for the dashboard's stacked charts.
groups ranks the window's top groups by spend (plus the reconciling
other fold), in the order a chart should stack and color them; points
is sparse (only populated cells), keyed by canonical UTC bucket_start.
Validation Error
GET /api/v1/organizations/me/usage/series?group_by=model HTTP/1.1
Otari-Key: YOUR_API_KEY
Accept: */*
{
"bucket": "hour",
"end_date": "text",
"group_by": "model",
"groups": [
{
"cost": 1,
"is_other": false,
"key": "text",
"label": "text",
"requests": 1,
"tokens": 1
}
],
"points": [
{
"bucket_start": "text",
"cost": 1,
"is_other": false,
"key": "text",
"requests": 1,
"tokens": 1
}
],
"start_date": "text"
}Aggregate spend, tokens and request volume for the caller's organization.
The tenant-scoped counterpart of GET /api/v1/usage/summary, running the same aggregation over a narrower row set: the same bounded window, the same breakdowns, the same dimensions selector for paying only for the passes a caller reads. The breakdown by user names the people inside the caller's own scope, which is the roster they can already read.
Enter your API key here (sent as Otari-Key header).
Return logs with timestamp >= start_date (ISO 8601 or Unix epoch seconds)
Return logs with timestamp < end_date (ISO 8601 or Unix epoch seconds)
Filter to one or more users; repeatable (user_id=a&user_id=b). Several values match any of them. At most 50 per call.
Filter to a single status: 'success', 'error', or 'absorbed' (an attempt a routing policy recovered from, excluded from error_count and request_count)
Filter to a single failure status code (e.g. 429 for provider rate limits, 402 for missing-pricing rejections). Only error rows carry one, so this filter also restricts to status='error' unless 'status' is given explicitly
Filter to one or more models; repeatable (model=a&model=b). Several values match any of them. At most 50 per call.
Filter to a single endpoint (e.g. '/v1/chat/completions')
Filter to a single provider (e.g. 'openai')
Filter to a single provenance source (e.g. 'gateway' or 'claude_code')
Filter to a single session (source_label): the session's trace id on a gateway request that named one, or the session/project label imported usage carried
Filter by a request tag (what a request sent in its metadata), as key:value. Repeatable: values for the same key match any of them, and different keys must all match. At most 50 per call.
Filter to one or more API key ids; repeatable (api_key_id=a&api_key_id=b). Several values match any of them. At most 50 per call.
Filter by token-pricing state: true = only rows whose model tokens were priced, false = only rows that still need pricing (no cost at all, or tokens that were never metered because the model had no rate). A row charged only for gateway-run tool calls still counts as needing pricing.
Filter to requests that ran a gateway-run tool. 'any' matches any tool; a tool name (web_search, web_fetch, code_execution) matches that tool specifically.
Filter by budget participation, which is not the same question as provenance: true = only enforced gateway rows, false = every row that never touches a budget, meaning imported usage and also gateway traffic on a budget-exempt key
Only usage recorded in this workspace.
Time-series granularity: 'hour' or 'day'
dayPossible values: A tag key to break spend down by, returned as by_tag. Rows that do not carry the tag group under a null key.
Successful Response
Aggregate spend/volume for the Usage & analytics page.
Every breakdown field is always present. One the caller excluded through
dimensions comes back as an empty list, the same shape a window with no
matching rows produces, so narrowing the selector never changes the schema.
Validation Error
GET /api/v1/organizations/me/usage/summary HTTP/1.1
Otari-Key: YOUR_API_KEY
Accept: */*
{
"bucket": "hour",
"by_api_key": [
{
"cost": 1,
"is_other": false,
"key": "text",
"label": "text",
"requests": 1,
"tokens": 1
}
],
"by_endpoint": [
{
"cost": 1,
"is_other": false,
"key": "text",
"label": "text",
"requests": 1,
"tokens": 1
}
],
"by_model": [
{
"cost": 1,
"is_other": false,
"key": "text",
"label": "text",
"requests": 1,
"tokens": 1
}
],
"by_provider": [
{
"cost": 1,
"is_other": false,
"key": "text",
"label": "text",
"requests": 1,
"tokens": 1
}
],
"by_source": [
{
"cost": 1,
"is_other": false,
"key": "text",
"label": "text",
"requests": 1,
"tokens": 1
}
],
"by_source_label": [
{
"cost": 1,
"is_other": false,
"key": "text",
"label": "text",
"requests": 1,
"tokens": 1
}
],
"by_tag": [
{
"cost": 1,
"is_other": false,
"key": "text",
"label": "text",
"requests": 1,
"tokens": 1
}
],
"by_tool": [
{
"calls": 1,
"cost": 1,
"errors": 1,
"requests": 1,
"tool": "text"
}
],
"by_user": [
{
"cost": 1,
"is_other": false,
"key": "text",
"label": "text",
"requests": 1,
"tokens": 1
}
],
"end_date": "text",
"errors_by_status_code": [
{
"error_class": "pricing",
"requests": 1,
"status_code": 1
}
],
"series": [
{
"bucket_start": "text",
"cache_read_tokens": 0,
"cache_write_tokens": 0,
"cost": 1,
"errors": 0,
"input_tokens": 0,
"output_tokens": 0,
"requests": 1,
"tokens": 1
}
],
"start_date": "text",
"totals": {
"avg_latency_ms": 1,
"billed_input_tokens": 0,
"billed_output_tokens": 0,
"cache_read_tokens": 1,
"cache_write_1h_tokens": 1,
"cache_write_tokens": 1,
"completion_tokens": 1,
"cost": 1,
"error_count": 1,
"prompt_tokens": 1,
"reasoning_tokens": 0,
"request_count": 1,
"total_tokens": 1,
"unpriced_requests": 0
}
}Last updated
Was this helpful?
