🚀 Introducing Flux, the first conversational speech recognition model built for voice agents. (Learn more!)🚀

PlaygroundConsoleCommunitySupportFree 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
    • Custom Endpoints
    • Errors
    • API Rate Limits
  • API Reference
LogoLogo
PlaygroundConsoleCommunitySupportFree API Key
API ReferenceAuthV1Tokens

POST
/v1/auth/grant
POST
/v1/auth/grant
1import requests
2
3url = "https://api.deepgram.com/v1/auth/grant"
4
5payload = {}
6headers = {
7 "Authorization": "<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}
Was this page helpful?
Previous
Built with
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.

Headers

AuthorizationstringRequired

Request

Time to live settings
ttl_secondsintegerOptional>=1<=3600
Time to live in seconds for the token. Defaults to 30 seconds.

Response

Grant response
access_tokenstring
JSON Web Token (JWT)
expires_indouble or null
Time in seconds until the JWT expires

Errors

Token-based Authentication

JSON Web Token (JWT)

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.