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
          • GETList Project Keys
          • POSTCreate a Project Key
          • GETGet a Project Key
          • DELDelete a Project Key
LogoLogo
Ask AIPlaygroundLoginFree API Key
API ReferenceManageKeys

Create a Project Key

POST
https://api.deepgram.com/v1/projects/:project_id/keys
POST
/v1/projects/:project_id/keys
1import requests
2
3url = "https://api.deepgram.com/v1/projects/project_id/keys"
4
5payload = { "expiration_date": "2026-01-01T00:00:00Z" }
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 "api_key_id": "1234567890abcdef1234567890abcdef",
3 "key": "1234567890abcdef1234567890abcdef",
4 "comment": "a comment",
5 "scopes": [
6 "member"
7 ],
8 "tags": [
9 "tag-1"
10 ],
11 "expiration_date": "2024-05-01T00:00:00.000000Z"
12}
Creates a new API key with specified settings for the project
Was this page helpful?
Previous

Get a Project Key

Next
Built with

Authentication

AuthorizationToken

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

Path parameters

project_idstringRequired

Request

API key settings
anyRequired
OR
anyRequired

Response

API key created successfully
api_key_idstring
The unique identifier of the API key
keystring
The API key
commentstring
A comment for the API key
scopeslist of strings
The scopes for the API key
tagslist of strings
The tags for the API key
expiration_datestringformat: "date-time"
The expiration date of the API key

Errors

400
Bad Request Error