Article·Tutorials·May 7, 2023

Build With the Official Deepgram SDKs

Share this guide
Michael Jolley
By Michael Jolley
PublishedMay 7, 2023
UpdatedJun 13, 2024

We love empowering our developer communities to take full advantage of voice in their applications. So, we're announcing two new official SDKs for Node.js and Python. Both of these SDKs make it easier than ever to add automated speech-to-text recognition to your applications.

How Easy Is It?

To get started, make sure you have a Deepgram account by signing up at After signing up, log in and get an API key. Then, in your terminal, run the appropriate command below to install the SDK.


npm install @deepgram/sdk


pip install deepgram-sdk

Once the SDK has been installed, the following snippets will allow you to transcribe a prerecorded audio file. Be sure to replace YOUR_DEEPGRAM_API_KEY with the API key, you created earlier.


const { Deepgram } = require("@deepgram/sdk");

const deepgramApiKey = "YOUR_DEEPGRAM_API_KEY";

function main() {
  return new Promise((resolve, reject) => {
    (async () => {
      try {
        const deepgram = new Deepgram(deepgramApiKey);
        const transcription = await newDeepgram.transcription.preRecorded(
            url: "",
            punctuate: true,
        console.dir(transcription, { depth: null });
      } catch (err) {
        console.log(`Err: ${err}`);


from deepgram import Deepgramimport asyncio, json


async def main():
    # Initializes the Deepgram SDK
  dg_client = Deepgram(DEEPGRAM_API_KEY)
  source = {'url': ''}
  response = await dg_client.transcription.prerecorded(source)
  print(json.dumps(response, indent=4))

Contributions Welcome

Our SDKs are still in their infancy, but we're building them in public. We welcome all issues and pull requests to our Node.js and Python repositories. Of course, we'd also love to hear what you're building, so tweet at @DeepgramDevs and let us know!

If you have any feedback about this post, or anything else around Deepgram, we'd love to hear from you. Please let us know in our GitHub discussions .

Unlock language AI at scale with an API call.

Get conversational intelligence with transcription and understanding on the world's best speech AI platform.