Logs & Usage Data

Learn how to use Deepgram's Log and Usage features.

๐Ÿ“˜

You can obtain up to 90 days of log usage data from Deepgram. If you need log usage data for a longer period of time you can use our Usage API to programmatically fetch usage data on an interval and store it for retrieval as needed.

Using Console Logs & Usage

Within the Deepgram Console you can view your API usage and API log activity of all your requests.

To view your Summarized Usage

Not limited to 90 days.

  1. Login to the Deepgram Console
  2. Click on the Usage Tab in the left navigation panel.
  3. On the Overview Tab, select your filter options.
  4. View the results.

To view your Logs

Limited to 90 days.

  1. Login to the Deepgram Console
  2. Click on the Usage Tab in the left navigation panel.
  3. On the Logs Tab, select your filter options.
  4. View the results.

Obtaining Usage via the API

You can use the Deepgram API to programmatically fetch usage data. Please refer to our API documentation for more details.

โš ๏ธ

Be sure to replace the placeholder YOUR_DEEPGRAM_API_KEY with your actual Deepgram API Key.

Get All Requests

Replace YOUR_PROJECT_IDwith your Deepgram project id.

curl --request GET \
     --url 'https://api.deepgram.com/v1/projects/YOUR_PROJECT_ID/requests?start=2023-10-01&end=2023-10-05&status=succeeded' \
     --header 'Authorization: Token YOUR_DEEPGRAM_API_KEY' \
     --header 'accept: application/json'

A response will be returned as such:

{   
    "page": 0,
    "limit": 1,
    "requests": [
        {
            "request_id": "a758d58d-e3ec-xxx",
            "created": "2023-10-05T22:49:03.509654Z",
            "path": "/v1/listen?-xxx",
            "api_key_id": "f54158f4-71ee-xxx",
            "response": null,
            "callback": null
        }
    ]
}

Summarize Usage

๐Ÿ“˜

Summarized usage data is not limited to 90 days.

Replace YOUR_PROJECT_IDwith your Deepgram project id.

curl --request GET \
     --url 'https://api.deepgram.com/v1/projects/YOUR_PROJECT_ID/usage?start=2023-10-01&end=2023-10-05' \
     --header 'Authorization: Token YOUR_DEEPGRAM_API_KEY' \
     --header 'accept: application/json'

A response will be returned:

{
    "start": "2023-10-01",
    "end": "2023-10-05",
    "resolution": {
        "units": "day",
        "amount": 1
    },
    "results": [
        {
            "start": "2023-10-01",
            "end": "2023-10-01",
            "hours": 865.7331186111111,
            "total_hours": 867.6975186111111,
            "requests": 54105
        },
        {
            "start": "2023-10-02",
            "end": "2023-10-02",
            "hours": 1188.9926763888889,
            "total_hours": 1191.5563763888888,
            "requests": 56081
        },
        {
            "start": "2023-10-03",
            "end": "2023-10-03",
            "hours": 1473.9747994444444,
            "total_hours": 1477.5771794444445,
            "requests": 56456
        },
        {
            "start": "2023-10-04",
            "end": "2023-10-04",
            "hours": 999.2419933333333,
            "total_hours": 1001.2063933333334,
            "requests": 54548
        },
        {
            "start": "2023-10-05",
            "end": "2023-10-05",
            "hours": 11447.164485833333,
            "total_hours": 11449.0443075,
            "requests": 196209
        }
    ]
}