Get Project Usage Breakdown
GET https://api.deepgram.com/v1/projects//usage/breakdown
Retrieves the usage breakdown for a specific project, with various filter options by API feature or by groupings. Setting a feature (e.g. diarize) to true includes requests that used that feature, while false excludes requests that used it. Multiple true filters are combined with OR logic, while false filters use AND logic.
Reference: https://developers.deepgram.com/reference/manage/usage/breakdown/get
Authentication
Section titled “Authentication”Authorizationheader (required) (prefixed withToken) — UseAuthorization: Token <API_KEY>Example:Authorization: Token 12345abcdef
Request
Section titled “Request”Path parameters
Section titled “Path parameters”project_id(string, required) — The unique identifier of the project
Query parameters
Section titled “Query parameters”start(string, optional) — Start date of the requested date range. Format accepted is YYYY-MM-DDend(string, optional) — End date of the requested date range. Format accepted is YYYY-MM-DDgrouping(enum, optional) — Common usage grouping parameters- Allowed values:
accessor,endpoint,feature_set,models,method,tags,deployment
- Allowed values:
accessor(string, optional) — Filter for requests where a specific accessor was usedalternatives(boolean, optional) — Filter for requests where alternatives were usedcallback_method(boolean, optional) — Filter for requests where callback method was usedcallback(boolean, optional) — Filter for requests where callback was usedchannels(boolean, optional) — Filter for requests where channels were usedcustom_intent_mode(boolean, optional) — Filter for requests where custom intent mode was usedcustom_intent(boolean, optional) — Filter for requests where custom intent was usedcustom_topic_mode(boolean, optional) — Filter for requests where custom topic mode was usedcustom_topic(boolean, optional) — Filter for requests where custom topic was useddeployment(enum, optional) — Filter for requests where a specific deployment was used- Allowed values:
hosted,beta,self-hosted
- Allowed values:
detect_entities(boolean, optional) — Filter for requests where detect entities was useddetect_language(boolean, optional) — Filter for requests where detect language was useddiarize(boolean, optional) — Filter for requests where diarize was useddictation(boolean, optional) — Filter for requests where dictation was usedencoding(boolean, optional) — Filter for requests where encoding was usedendpoint(enum, optional) — Filter for requests where a specific endpoint was used- Allowed values:
listen,read,speak,agent
- Allowed values:
extra(boolean, optional) — Filter for requests where extra was usedfiller_words(boolean, optional) — Filter for requests where filler words was usedintents(boolean, optional) — Filter for requests where intents was usedkeyterm(boolean, optional) — Filter for requests where keyterm was usedkeywords(boolean, optional) — Filter for requests where keywords was usedlanguage(boolean, optional) — Filter for requests where language was usedmeasurements(boolean, optional) — Filter for requests where measurements were usedmethod(enum, optional) — Filter for requests where a specific method was used- Allowed values:
sync,async,streaming
- Allowed values:
model(string, optional) — Filter for requests where a specific model uuid was usedmultichannel(boolean, optional) — Filter for requests where multichannel was usednumerals(boolean, optional) — Filter for requests where numerals were usedparagraphs(boolean, optional) — Filter for requests where paragraphs were usedprofanity_filter(boolean, optional) — Filter for requests where profanity filter was usedpunctuate(boolean, optional) — Filter for requests where punctuate was usedredact(boolean, optional) — Filter for requests where redact was usedreplace(boolean, optional) — Filter for requests where replace was usedsample_rate(boolean, optional) — Filter for requests where sample rate was usedsearch(boolean, optional) — Filter for requests where search was usedsentiment(boolean, optional) — Filter for requests where sentiment was usedsmart_format(boolean, optional) — Filter for requests where smart format was usedsummarize(boolean, optional) — Filter for requests where summarize was usedtag(string, optional) — Filter for requests where a specific tag was usedtopics(boolean, optional) — Filter for requests where topics was usedutt_split(boolean, optional) — Filter for requests where utt split was usedutterances(boolean, optional) — Filter for requests where utterances was usedversion(boolean, optional) — Filter for requests where version was used
Response
Section titled “Response”Usage breakdown response
start(string, required) — Start date of the usage periodend(string, required) — End date of the usage periodresolution(UsageBreakdownV1ResponseResolution, required)results(list of UsageBreakdownV1ResponseResultsItems, required)
Errors
Section titled “Errors”400 Bad Request Error
Section titled “400 Bad Request Error”Invalid Request
ErrorResponse
UsageBreakdownV1ResponseResolution
Section titled “UsageBreakdownV1ResponseResolution”units(string, required) — Time unit for the resolutionamount(double, required) — Amount of units
UsageBreakdownV1ResponseResultsItems
Section titled “UsageBreakdownV1ResponseResultsItems”hours(float, required) — Audio hours processedtotal_hours(float, required) — Total hours including all processingagent_hours(float, required) — Agent hours usedtokens_in(double, required) — Number of input tokenstokens_out(double, required) — Number of output tokenstts_characters(double, required) — Number of text-to-speech characters processedrequests(double, required) — Number of requestsgrouping(UsageBreakdownV1ResponseResultsItemsGrouping, required)
ErrorResponseLegacyError
Section titled “ErrorResponseLegacyError”err_code(string, optional) — The error codeerr_msg(string, optional) — The error messagerequest_id(string, optional) — The request ID
ErrorResponseModernError
Section titled “ErrorResponseModernError”category(string, optional) — The category of the errormessage(string, optional) — A message about the errordetails(string, optional) — A description of the errorrequest_id(string, optional) — The unique identifier of the request
UsageBreakdownV1ResponseResultsItemsGrouping
Section titled “UsageBreakdownV1ResponseResultsItemsGrouping”start(string, optional) — Start date for this groupend(string, optional) — End date for this groupaccessor(string, optional, nullable) — Optional accessor identifierendpoint(string, optional, nullable) — Optional endpoint identifierfeature_set(string, optional, nullable) — Optional feature set identifiermodels(list of string, optional)method(string, optional, nullable) — Optional method identifiertags(list of string, optional, nullable) — Optional list of tags, null unless grouped by tags.deployment(string, optional, nullable) — Optional deployment identifier
Examples
Section titled “Examples”Response
{
"start": "2025-01-16",
"end": "2025-01-23",
"resolution": {
"units": "day",
"amount": 1
},
"results": [
{
"hours": 1619.7242069444444,
"total_hours": 1621.7395791666668,
"agent_hours": 41.33564388888889,
"tokens_in": 0,
"tokens_out": 0,
"tts_characters": 9158866,
"requests": 373381,
"grouping": {
"start": "2025-01-16",
"end": "2025-01-16",
"accessor": "123456789012345678901234",
"endpoint": "listen",
"feature_set": "punctuate",
"models": [
"Nova-2"
],
"method": "async",
"tags": [
"tag1",
"tag2"
],
"deployment": "self-hosted"
}
}
]
}SDK Code
import requests
url = "https://api.deepgram.com/v1/projects/123456-7890-1234-5678-901234/usage/breakdown"
querystring = {"accessor":"12345678-1234-1234-1234-123456789012","alternatives":"true","callback":"true","callback_method":"true","channels":"true","custom_intent":"true","custom_intent_mode":"true","custom_topic":"true","custom_topic_mode":"true","deployment":"hosted","detect_entities":"true","detect_language":"true","diarize":"true","dictation":"true","encoding":"true","endpoint":"listen","extra":"true","filler_words":"true","intents":"true","keyterm":"true","keywords":"true","language":"true","measurements":"true","method":"async","model":"6f548761-c9c0-429a-9315-11a1d28499c8","multichannel":"true","numerals":"true","paragraphs":"true","profanity_filter":"true","punctuate":"true","redact":"true","replace":"true","search":"true","sentiment":"true","smart_format":"true","summarize":"true","tag":"tag1","topics":"true","utt_split":"true","utterances":"true","version":"true"}
headers = {"Authorization": "Token <apiKey>"}
response = requests.get(url, headers=headers, params=querystring)
print(response.json())const url = 'https://api.deepgram.com/v1/projects/123456-7890-1234-5678-901234/usage/breakdown?accessor=12345678-1234-1234-1234-123456789012&alternatives=true&callback=true&callback_method=true&channels=true&custom_intent=true&custom_intent_mode=true&custom_topic=true&custom_topic_mode=true&deployment=hosted&detect_entities=true&detect_language=true&diarize=true&dictation=true&encoding=true&endpoint=listen&extra=true&filler_words=true&intents=true&keyterm=true&keywords=true&language=true&measurements=true&method=async&model=6f548761-c9c0-429a-9315-11a1d28499c8&multichannel=true&numerals=true¶graphs=true&profanity_filter=true&punctuate=true&redact=true&replace=true&search=true&sentiment=true&smart_format=true&summarize=true&tag=tag1&topics=true&utt_split=true&utterances=true&version=true';
const options = {method: 'GET', headers: {Authorization: 'Token <apiKey>'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.deepgram.com/v1/projects/123456-7890-1234-5678-901234/usage/breakdown?accessor=12345678-1234-1234-1234-123456789012&alternatives=true&callback=true&callback_method=true&channels=true&custom_intent=true&custom_intent_mode=true&custom_topic=true&custom_topic_mode=true&deployment=hosted&detect_entities=true&detect_language=true&diarize=true&dictation=true&encoding=true&endpoint=listen&extra=true&filler_words=true&intents=true&keyterm=true&keywords=true&language=true&measurements=true&method=async&model=6f548761-c9c0-429a-9315-11a1d28499c8&multichannel=true&numerals=true¶graphs=true&profanity_filter=true&punctuate=true&redact=true&replace=true&search=true&sentiment=true&smart_format=true&summarize=true&tag=tag1&topics=true&utt_split=true&utterances=true&version=true"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Token <apiKey>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}require 'uri'
require 'net/http'
url = URI("https://api.deepgram.com/v1/projects/123456-7890-1234-5678-901234/usage/breakdown?accessor=12345678-1234-1234-1234-123456789012&alternatives=true&callback=true&callback_method=true&channels=true&custom_intent=true&custom_intent_mode=true&custom_topic=true&custom_topic_mode=true&deployment=hosted&detect_entities=true&detect_language=true&diarize=true&dictation=true&encoding=true&endpoint=listen&extra=true&filler_words=true&intents=true&keyterm=true&keywords=true&language=true&measurements=true&method=async&model=6f548761-c9c0-429a-9315-11a1d28499c8&multichannel=true&numerals=true¶graphs=true&profanity_filter=true&punctuate=true&redact=true&replace=true&search=true&sentiment=true&smart_format=true&summarize=true&tag=tag1&topics=true&utt_split=true&utterances=true&version=true")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Token <apiKey>'
response = http.request(request)
puts response.read_bodyimport com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;
HttpResponse<String> response = Unirest.get("https://api.deepgram.com/v1/projects/123456-7890-1234-5678-901234/usage/breakdown?accessor=12345678-1234-1234-1234-123456789012&alternatives=true&callback=true&callback_method=true&channels=true&custom_intent=true&custom_intent_mode=true&custom_topic=true&custom_topic_mode=true&deployment=hosted&detect_entities=true&detect_language=true&diarize=true&dictation=true&encoding=true&endpoint=listen&extra=true&filler_words=true&intents=true&keyterm=true&keywords=true&language=true&measurements=true&method=async&model=6f548761-c9c0-429a-9315-11a1d28499c8&multichannel=true&numerals=true¶graphs=true&profanity_filter=true&punctuate=true&redact=true&replace=true&search=true&sentiment=true&smart_format=true&summarize=true&tag=tag1&topics=true&utt_split=true&utterances=true&version=true")
.header("Authorization", "Token <apiKey>")
.asString();<?php
require_once('vendor/autoload.php');
$client = new \GuzzleHttp\Client();
$response = $client->request('GET', 'https://api.deepgram.com/v1/projects/123456-7890-1234-5678-901234/usage/breakdown?accessor=12345678-1234-1234-1234-123456789012&alternatives=true&callback=true&callback_method=true&channels=true&custom_intent=true&custom_intent_mode=true&custom_topic=true&custom_topic_mode=true&deployment=hosted&detect_entities=true&detect_language=true&diarize=true&dictation=true&encoding=true&endpoint=listen&extra=true&filler_words=true&intents=true&keyterm=true&keywords=true&language=true&measurements=true&method=async&model=6f548761-c9c0-429a-9315-11a1d28499c8&multichannel=true&numerals=true¶graphs=true&profanity_filter=true&punctuate=true&redact=true&replace=true&search=true&sentiment=true&smart_format=true&summarize=true&tag=tag1&topics=true&utt_split=true&utterances=true&version=true', [
'headers' => [
'Authorization' => 'Token <apiKey>',
],
]);
echo $response->getBody();using RestSharp;
var client = new RestClient("https://api.deepgram.com/v1/projects/123456-7890-1234-5678-901234/usage/breakdown?accessor=12345678-1234-1234-1234-123456789012&alternatives=true&callback=true&callback_method=true&channels=true&custom_intent=true&custom_intent_mode=true&custom_topic=true&custom_topic_mode=true&deployment=hosted&detect_entities=true&detect_language=true&diarize=true&dictation=true&encoding=true&endpoint=listen&extra=true&filler_words=true&intents=true&keyterm=true&keywords=true&language=true&measurements=true&method=async&model=6f548761-c9c0-429a-9315-11a1d28499c8&multichannel=true&numerals=true¶graphs=true&profanity_filter=true&punctuate=true&redact=true&replace=true&search=true&sentiment=true&smart_format=true&summarize=true&tag=tag1&topics=true&utt_split=true&utterances=true&version=true");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Token <apiKey>");
IRestResponse response = client.Execute(request);import Foundation
let headers = ["Authorization": "Token <apiKey>"]
let request = NSMutableURLRequest(url: NSURL(string: "https://api.deepgram.com/v1/projects/123456-7890-1234-5678-901234/usage/breakdown?accessor=12345678-1234-1234-1234-123456789012&alternatives=true&callback=true&callback_method=true&channels=true&custom_intent=true&custom_intent_mode=true&custom_topic=true&custom_topic_mode=true&deployment=hosted&detect_entities=true&detect_language=true&diarize=true&dictation=true&encoding=true&endpoint=listen&extra=true&filler_words=true&intents=true&keyterm=true&keywords=true&language=true&measurements=true&method=async&model=6f548761-c9c0-429a-9315-11a1d28499c8&multichannel=true&numerals=true¶graphs=true&profanity_filter=true&punctuate=true&redact=true&replace=true&search=true&sentiment=true&smart_format=true&summarize=true&tag=tag1&topics=true&utt_split=true&utterances=true&version=true")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()