> ## Documentation Index
> Fetch the complete documentation index at: https://docs.plaud.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Getting Started

> [!TIP]
>
> This page is for Plaud Team Admins. Only an admin can setup Enterprise API credentials for their workspace.
>
> If you are a Plaud Team member, you can choose to allow your workspace admin to access your Plaud data. **An admin will not be able to see your data by default**.

**1. Create an RSA key pair**

Generate a public and private key that will be used to authenticate your requests to the Enterprise API.

```bash theme={"system"}
openssl genpkey -algorithm RSA -pkeyopt rsa_keygen_b its:2048 -out private_key.pem
openssl pkey -in private_key.pem -pubout -out public_key.pem # send this one
```

**2. Register your public key with Plaud**

Request access for Plaud Enterprise API. After getting access, you will register your `PUBLIC_KEY` and we will provide a `CLIENT_ID` and `API_HOST` for you to use.

Your `CLIENT_ID`, `API_HOST`, and the `PRIVATE_KEY` you generated (the `PUBLIC_KEY`'s pair) will be used to authenticate and generate access tokens for your Plaud Team workspace.

**3. Your Plaud Team members will be taken through a consent prompt**

After enabling the Enterprise API, **only Team files will be available at first**. Only Team files are viewable by default, whereas each members' private Plaud files are only readable after they have granted consent.

After you have enabled Enterprise API access, each of your Plaud Team members
will be asked if they consent to having their Plaud data accessible via the Enterprise API **the very next time they load the Plaud app**.

> [!WARNING]
>
> To protect our users' privacy, **the Enterprise API will NOT be able to read a member's data without their explicit consent**.

**4. Retrieve your Plaud Team workspace access token**

Use the `POST /team-oauth/oauth/token` to generate a workspace token used to authenticate subsequent requests.

Generating a token will require a JWT with your `CLIENT_ID`, API hostname (i.e. `https://api.plaud.ai`), and expiration datetime, \*\*signed with your `PRIVATE_KEY`

```typescript Getting a workspace access token with typescript icon="js" expandable theme={"system"}
import { createPrivateKey, randomUUID, sign } from "node:crypto";
import { readFileSync } from "node:fs";

const CLIENT_ID = process.env.PLAUD_CLIENT_ID!;
const API_HOST = "https://api.plaud.ai";
const PRIVATE_KEY = createPrivateKey(readFileSync("private_key.pem"));

const base64url = (input: string | Buffer) => Buffer.from(input).toString("base64url");

const now = Math.floor(Date.now() / 1000);
const header = { alg: "RS256", typ: "JWT" };
const payload = {
  iss: CLIENT_ID,
  sub: CLIENT_ID,
  aud: API_HOST,
  iat: now,
  exp: now + 4 * 60, // recommended lifetime: 4 minutes
  jti: randomUUID(), // must be unique per assertion
};

const signingInput = `${base64url(JSON.stringify(header))}.${base64url(JSON.stringify(payload))}`;
const signature = sign("RSA-SHA256", Buffer.from(signingInput), PRIVATE_KEY);
return `${signingInput}.${base64url(signature)}`;

const response = await fetch(`${API_HOST}/team-oauth/oauth/token`, {
  method: "POST",
  headers: { "Content-Type": "application/x-www-form-urlencoded" },
  body: new URLSearchParams({
    grant_type: "client_credentials",
    client_assertion_type: "urn:ietf:params:oauth:client-assertion-type:jwt-bearer",
    client_assertion: payload,
  }),
});

const { access_token } = await response.json(); 
```

> [!NOTE]
>
> Access tokens are valid for up to 1 hour.

**5. Begin using the Enterprise API**

The Enterprise API only exposes **READ operations**. With the Enterprise API, you will be able to:

1. List Plaud Team members
2. List available files
3. Pull transcripts from a file
4. Pull summaries from a file
5. Receive the raw audio from a file


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.