For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Ask AIPlaygroundLoginFree API Key
HomeAPI ReferenceVoice AgentSpeech-to-TextText-to-SpeechIntelligenceSelf-Hosted Deployments
HomeAPI ReferenceVoice AgentSpeech-to-TextText-to-SpeechIntelligenceSelf-Hosted Deployments
  • General
    • Deepgram API Overview
    • Authentication
    • Regional Endpoints
    • Custom Endpoints
    • Errors
    • API Rate Limits
  • API Reference
        • POSTToken-Based Authentication
LogoLogo
Ask AIPlaygroundLoginFree API Key
API ReferenceAuth

Token-Based Authentication

POST
https://api.deepgram.com/v1/auth/grant
POST
/v1/auth/grant
1import requests
2
3url = "https://api.deepgram.com/v1/auth/grant"
4
5payload = {}
6headers = {
7 "Authorization": "Token <apiKey>",
8 "Content-Type": "application/json"
9}
10
11response = requests.post(url, json=payload, headers=headers)
12
13print(response.json())
Try it
1{
2 "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIn0.dozjgNryP4J3jVmNHl0w5N_XgL0n3I9PlFUP0THsR8U",
3 "expires_in": 30
4}

Generates a temporary JSON Web Token (JWT) with a 30-second (by default) TTL and usage::write permission for core voice APIs, requiring an API key with Member or higher authorization. Tokens created with this endpoint will not work with the Manage APIs.

Was this page helpful?
Previous
Built with

Authentication

AuthorizationToken

Use Authorization: Token <API_KEY> Example: Authorization: Token 12345abcdef

Request

Time to live settings
ttl_secondsdoubleOptional1-3600
Time to live in seconds for the token. Defaults to 30 seconds.

Response

Grant response
access_tokenstring

JSON Web Token (JWT)

expires_indouble
Time in seconds until the JWT expires

Errors

400
Bad Request Error