---
title: Authentication
description: Create a dashboard API key and connect your application or agent.
---

## Create your API key

1. Open [API Keys](/dashboard/api-keys) and sign in.
2. Click **Create key**, enter a name, and create it.
3. Copy the key. It is shown only once; replace it if lost.

Keep keys on your server or in your agent's secret settings, outside source code, browser bundles, and chat.

## Configure the key locally

Bash:

```bash
read -r -s -p "Sawtak Arabi API key: " SAWTAK_API_KEY
export SAWTAK_API_KEY
printf '\n'
```

Zsh:

```zsh
read -r -s 'SAWTAK_API_KEY?Sawtak Arabi API key: '
export SAWTAK_API_KEY
printf '\n'
```

Launch your application or agent from that terminal so it inherits the variable. For hosted applications, use your platform's secret settings.

## Authenticate a request

```http
Authorization: Bearer <API_KEY>
```

Verify your key and balance without generating audio:

```bash
curl --fail --show-error https://api.sawtakarabi.ai/v1/me \
  -H "Authorization: Bearer $SAWTAK_API_KEY"
```

Add credit in [Billing](/dashboard/billing) when needed.

## Permissions

Dashboard-created keys cover the standard API. Restricted keys require `tts` for speech, `voices` for voice management, and `usage` for account and usage reporting. Missing permissions return `403 insufficient_scope`; missing or invalid keys return `401`. See [Errors](/docs/errors).

The [saved-recording API](/docs/generation-history#saved-recording-api) additionally uses `voiceovers:read` for private history, script retrieval and audio downloads. Dashboard-created keys include this access; existing restricted keys do not gain it automatically.
