# Personal access tokens

A **personal access token** (PAT) authenticates API and SDK requests.

## Create a token

Sign in at [renai.build](https://renai.build), open **Settings → Personal access tokens**, create and copy the token (shown once).

## Use with SDK

```ts
const client = createRenClient({
  baseUrl: "https://api.renai.build",
  auth: pat(process.env.REN_PAT_TOKEN!),
})
```

## Manage via API

```ts
const { data: tokens } = await client.pat.list()

const { data: token } = await client.pat.create({
  body: { name: "ci-deploy", scopes: ["agents.write"] },
})

await client.pat.revoke({ path: { id: token.id } })
```

## Related

- **[Authentication](/authentication)** — auth setup.
- **API reference:** [PATs](/api-reference#tag/pat)