Skip to content

Commit 42a1141

Browse files
Update README.md (#171)
Adding a few things that were available at the docs site but not here
1 parent 1ef58b8 commit 42a1141

File tree

1 file changed

+19
-2
lines changed

1 file changed

+19
-2
lines changed

README.md

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ Official Node.js SDK for [Deepgram](https://www.deepgram.com/). Power your apps
1313
* [Deepgram Node.js SDK](#deepgram-nodejs-sdk)
1414
* [Getting an API Key](#getting-an-api-key)
1515
* [Installation](#installation)
16-
* [Constructor](#constructor)
16+
* [Configuration](#configuration)
17+
* [Custom API Endpoint](#custom-api-endpoint)
1718
* [Transcription](#transcription)
1819
* [Remote Files](#remote-files)
1920
* [Local Files](#local-files)
@@ -56,13 +57,17 @@ Official Node.js SDK for [Deepgram](https://www.deepgram.com/). Power your apps
5657

5758
# Installation
5859

60+
You can install the Deepgram Node.js SDK as a dependency in your application using NPM or yarn:
61+
5962
```bash
6063
npm install @deepgram/sdk
6164
# - or -
6265
# yarn add @deepgram/sdk
6366
```
6467

65-
# Constructor
68+
# Configuration
69+
70+
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.
6671

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

7277
const deepgram = new Deepgram(DEEPGRAM_API_KEY);
7378
```
79+
With the Deepgram client initialized, you can now send requests to the Deepgram API to transcribe audio, manage projects & keys, and retrieve usage information.
80+
81+
## Custom API Endpoint
82+
83+
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.
84+
85+
```js
86+
const REQUIRE_SSL = false; // defaults to true - set depending on server configuration
87+
const API_URL = "localhost:8080"; // defaults to api.deepgram.com
88+
const deepgram = new Deepgram(DEEPGRAM_API_KEY, API_URL, REQUIRE_SSL);
7489

7590
# Transcription
7691

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

116131
# Projects
117132

133+
The `Deepgram.projects` object provides access to manage projects associated with the API key you provided when instantiating the Deepgram client.
134+
118135
## Get Projects
119136

120137
Returns all projects accessible by the API key.

0 commit comments

Comments
 (0)