Skip to content

Commit

Permalink
Update README.md (#171)
Browse files Browse the repository at this point in the history
Adding a few things that were available at the docs site but not here
  • Loading branch information
SandraRodgers committed Oct 11, 2023
1 parent 1ef58b8 commit 42a1141
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ Official Node.js SDK for [Deepgram](https://www.deepgram.com/). Power your apps
* [Deepgram Node.js SDK](#deepgram-nodejs-sdk)
* [Getting an API Key](#getting-an-api-key)
* [Installation](#installation)
* [Constructor](#constructor)
* [Configuration](#configuration)
* [Custom API Endpoint](#custom-api-endpoint)
* [Transcription](#transcription)
* [Remote Files](#remote-files)
* [Local Files](#local-files)
Expand Down Expand Up @@ -56,13 +57,17 @@ Official Node.js SDK for [Deepgram](https://www.deepgram.com/). Power your apps

# Installation

You can install the Deepgram Node.js SDK as a dependency in your application using NPM or yarn:

```bash
npm install @deepgram/sdk
# - or -
# yarn add @deepgram/sdk
```

# Constructor
# Configuration

Once the SDK is installed, import the Deepgram object. Then create a new instance specifying your API key so that your application will be authorized to connect to Deepgram.

```js
const { Deepgram } = require("@deepgram/sdk");
Expand All @@ -71,6 +76,16 @@ const { Deepgram } = require("@deepgram/sdk");

const deepgram = new Deepgram(DEEPGRAM_API_KEY);
```
With the Deepgram client initialized, you can now send requests to the Deepgram API to transcribe audio, manage projects & keys, and retrieve usage information.

## Custom API Endpoint

In order to point the SDK at a different API endpoint (e.g., for on-prem deployments), you can pass in an object setting the `API_URL` when initializing the Deepgram client.

```js
const REQUIRE_SSL = false; // defaults to true - set depending on server configuration
const API_URL = "localhost:8080"; // defaults to api.deepgram.com
const deepgram = new Deepgram(DEEPGRAM_API_KEY, API_URL, REQUIRE_SSL);

# Transcription

Expand Down Expand Up @@ -115,6 +130,8 @@ See an example, here: [https://github.com/deepgram-devs/node-live-example](https

# Projects

The `Deepgram.projects` object provides access to manage projects associated with the API key you provided when instantiating the Deepgram client.

## Get Projects

Returns all projects accessible by the API key.
Expand Down

0 comments on commit 42a1141

Please sign in to comment.