API authentication

Last updated: 2025-01-15
1 min read

API Authentication

Secure your API requests with proper authentication.

Getting an API Key

  1. Log in to taskforceai.chat/login
  2. Go to Settings > API Keys
  3. Click "Create New Key"
  4. 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:

  1. Go to Settings > API Keys
  2. Find the key to revoke
  3. Click "Revoke"
  4. Confirm

Revoked keys stop working immediately.

Still need help?

Our support team is available to assist you.

Contact Support