API authentication
Last updated: 2025-01-15
•1 min readAPI Authentication
Secure your API requests with proper authentication.
Getting an API Key
- Log in to taskforceai.chat/login
- Go to Settings > API Keys
- Click "Create New Key"
- Copy and securely store your key
Using Your API Key
Include your key in the Authorization header:
curl https://api.taskforceai.chat/v1/chat \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"message": "Hello"}'
Key Security
- Never expose keys in client-side code
- Use environment variables
- Rotate keys regularly
- Use separate keys for dev/prod
Key Permissions
When creating a key, you can limit:
- Models it can access
- Rate limits
- IP restrictions (Enterprise)
Revoking Keys
To revoke a key:
- Go to Settings > API Keys
- Find the key to revoke
- Click "Revoke"
- Confirm
Revoked keys stop working immediately.