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.
Tags are limited to 128 characters per tag.
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'
YOUR_DEEPGRAM_API_KEY with your Deepgram API Key.
Make sure you are certain about what you want your tag to be. Once you have set a tag, you cannot update it.
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:
To apply multiple tags, submit the
tag parameter multiple times in your API request:
You can also directly query requests by tag at the Summarize Usage endpoint.
Be sure to replace the placeholder
PROJECT_IDwith your Deepgram Console Project ID,
VALUEwith your tag, and
YOUR_DEEPGRAM_API_KEYwith your Deepgram API Key. You can create an API Key in the Deepgram Console
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'
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.
Updated 8 days ago