| title | Authentication | ||||
|---|---|---|---|---|---|
| sidebarTitle | Authentication | ||||
| icon | key | ||||
| description | How to authenticate with the Tuteliq API | ||||
| keywords |
|
Every request to the Tuteliq API must include a valid API key. You can create and manage keys from the Tuteliq Dashboard.
Tuteliq supports two ways to pass your API key. Both are equivalent; use whichever fits your stack.
Pass the key in the Authorization header:
curl https://api.tuteliq.ai/v1/safety/detect-unsafe \
-H "Authorization: Bearer YOUR_API_KEY"Pass the key in a dedicated header:
curl https://api.tuteliq.ai/v1/safety/detect-unsafe \
-H "x-api-key: YOUR_API_KEY"If both headers are present, Authorization: Bearer takes precedence.
const tuteliq = new Tuteliq({ apiKey: process.env.TUTELIQ_API_KEY, });
```python Python
from tuteliq import Tuteliq
client = Tuteliq(api_key=os.environ["TUTELIQ_API_KEY"])
import Tuteliq
let client = Tuteliq(apiKey: ProcessInfo.processInfo.environment["TUTELIQ_API_KEY"]!)Never hard-code API keys in source code. Use environment variables or a secrets manager.
Each API key is scoped to an environment. The environment determines which rate-limit tier applies:
| Environment | Tier | Rate limit |
|---|---|---|
production |
Premium | 1,000 req/min |
staging |
Basic | 300 req/min |
development |
Free | 60 req/min |
You select the environment when creating a key in the dashboard. Keys cannot be moved between environments after creation.
- API keys are hashed with SHA-256 before being stored. Tuteliq never retains your plaintext key.
- Keys are shown only once at creation time. If you lose a key, revoke it and create a new one.
- Each request updates the key's
last_used_attimestamp and increments itsrequests_count, both visible in the dashboard.