Get Project Usage
GET https://api.deepgram.com/v1/projects//usage
Retrieves the usage for a specific project. Use Get Project Usage Breakdown for a more comprehensive usage summary.
Reference: https://developers.deepgram.com/reference/manage/usage/get
Authentication
Section titled “Authentication”Authorizationheader (required) (prefixed withToken) — UseAuthorization: Token <API_KEY>Example:Authorization: Token 12345abcdef
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-DDaccessor(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”200
A specific request for a specific project
start(string, optional)end(string, optional)resolution(UsageV1ResponseResolution, optional)
Errors
Section titled “Errors”400 Bad Request Error
Section titled “400 Bad Request Error”Invalid Request
ErrorResponse
Types
UsageV1ResponseResolution
units(string, optional)amount(double, optional)
ErrorResponseLegacyError
err_code(string, optional) — The error codeerr_msg(string, optional) — The error messagerequest_id(string, optional) — The request ID
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
Examples
Response
{
"start": "2024-10-16",
"end": "2024-10-23",
"resolution": {
"units": "day",
"amount": 1
}
}SDK Code
import requests
url = "https://api.deepgram.com/v1/projects/123456-7890-1234-5678-901234/usage"
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?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?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?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?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?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?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?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()