Authentication
Create a dashboard API key and connect your application or agent.
Create your API key
- Open API Keys and sign in.
- Click Create key, enter a name, and create it.
- 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:
read -r -s -p "Sawtak Arabi API key: " SAWTAK_API_KEY
export SAWTAK_API_KEY
printf '\n'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
Authorization: Bearer <API_KEY>Verify your key and balance without generating audio:
curl --fail --show-error https://api.sawtakarabi.ai/v1/me \
-H "Authorization: Bearer $SAWTAK_API_KEY"Add credit in 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.
The 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.