API Keys
Create, manage, and revoke SALZ API keys from your dashboard. Learn about key permissions and lifecycle management.
API keys are the credentials your application uses to authenticate with the SALZ API. You create and manage them from the SALZ dashboard.
Creating an API Key
- Log in to your SALZ dashboard at add-salz.io.
- Navigate to the API Keys page in the sidebar.
- Click Create API Key.
- Give the key a descriptive name (e.g., "Production", "Staging", "Local Dev").
- Copy the key immediately -- it will only be shown once.
The key will look something like this:
salz_k_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6...
Using Your Key
Include the key in the Authorization header of every request:
curl -X POST https://add-salz.io/api/v1/optimize \
-H "Authorization: Bearer salz_k_a1b2c3d4e5f6g7h8i9j0..." \
-H "Content-Type: application/json" \
-d '{"text": "Your text here"}'
Managing Keys
The API Keys page in your dashboard shows all your active keys with:
- Name -- The label you assigned when creating the key
- Created -- When the key was generated
- Last used -- The most recent time the key was used in an API request
- Key prefix -- The first few characters of the key for identification
You can create multiple keys for different environments or applications. This makes it easy to rotate or revoke a single key without affecting your other integrations.
Revoking a Key
If a key is compromised or no longer needed, revoke it immediately:
- Go to the API Keys page.
- Find the key you want to revoke.
- Click the Revoke button.
Revoked keys stop working immediately. Any requests using a revoked key will receive a 401 Unauthorized response. This action cannot be undone -- you will need to create a new key if you revoke one by mistake.
Key Limits
Each account can have up to 10 active API keys at a time. If you need more, revoke unused keys or contact support.
Best Practices
- Use separate keys for each environment. Create distinct keys for development, staging, and production so you can revoke one without disrupting others.
- Name keys descriptively. "Production - Backend" is more useful than "Key 1" when you need to find the right one to revoke.
- Rotate keys periodically. Create a new key, update your application to use it, then revoke the old one.
- Never share keys. Each developer or service should use its own key.