Deepgram’s Tagging feature allows you to label your API requests for the purpose of identification during usage reporting. You can also apply tags to API Keys; if you do, any tags applied to the API Key running the API request will also be applied to the request itself.
Some examples of use cases for Tagging include:
- Customers who have multiple, related business projects and need to track separate usage.
- Customers who have projects managed by different business teams or under different cost centers.
- Customers who operate a business-to-business (B2B) model that focuses on selling products and services to other companies. Rather than creating separate projects to track usage data, you can create a separate API Key for each company and tag it with the their information. Any requests run using the API Key will also be tagged with that company's information.
To enable Tagging, when you call Deepgram’s API, add a
tag parameter in the query string and set it to the tag you would like to recognize:
To transcribe audio from a file on your computer, run the following cURL command in a terminal or your favorite API client.
curl \ --request POST \ --header 'Authorization: Token YOUR_DEEPGRAM_API_KEY' \ --data-binary @youraudio.wav \ --url 'https://api.deepgram.com/v1/listen?tag=VALUE'
Make sure you are certain about what you want your tag to be. Once you have set a tag, you cannot update it.
Apply a Single Tag
To apply just one tag, send one instance of the
tag parameter in the query string when calling the API:
If your tag includes spaces or special characters, be sure to URL encode your tag:
Apply Multiple Tags
To apply multiple tags, submit the
tag parameter multiple times in your API request:
Filter Requests by Tag
You can also directly query requests by tag at the Summarize Usage endpoint.
curl \ --request GET \ --header 'Authorization: Token YOUR_DEEPGRAM_API_KEY' \ --header 'content-type: application/json' --url 'https://api.deepgram.com/v1/projects/PROJECT_ID/usage?tag=VALUE'
Did you find what you were looking for?