For the complete documentation index, see llms.txt. This page is also available as Markdown.

API Keys

Create, manage, and secure your API keys.


Creating an API Key

  1. Go to Dashboard → API Keys

  2. Click Generate New Key

  3. Enter a descriptive name (3-50 characters)

  4. Click Create

Key Format

Your API key looks like this:

sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

In your dashboard, keys are displayed as: sk-a1b2...wxyz (first 8 + last 4 characters)


Naming Your Keys

Use descriptive names to track usage and organize your keys:

Good Names
Purpose

Production API

Live application

Development

Local testing

CI/CD Pipeline

Automated builds

Mobile App v2

Specific project

Analytics Service

Internal tool

Key names appear in your usage logs, making it easy to track which key generated which costs.


Managing Keys

Enable / Disable

You can temporarily disable a key without deleting it:

  1. Go to API Keys in your dashboard

  2. Click the toggle next to the key

  3. Disabled keys reject all API requests immediately

This is useful for:

  • Pausing a project temporarily

  • Testing what happens when a key is invalid

  • Security incidents (disable first, investigate later)

Regenerate

If you suspect a key has been compromised:

  1. Click Regenerate next to the key

  2. Confirm the action

  3. Copy the new key immediately

Delete

Deleting a key is permanent:

  • The key stops working immediately

  • Usage history is preserved for your records

  • This action cannot be undone


Per-Key Usage Tracking

Every API request is logged with the key that made it. View usage by key in your dashboard:

  • Total cost per key

  • Request count

  • Tokens used (input/output)

  • Last used timestamp

  • Models accessed

This helps you:

  • Track costs per project or environment

  • Identify unused keys to clean up

  • Spot unexpected usage patterns


Rate Limits

Limit
Value

Key operations (create/regenerate)

15 per hour

API requests

60 per minute

Tokens

2,000,000 per minute

These limits apply per API key. Each key has its own independent rate limit.


Security Best Practices

Do ✅

  • Use environment variables - Never hardcode keys in source code

  • Different keys per environment - Separate dev, staging, and production

  • Name keys descriptively - Makes auditing easier

  • Rotate regularly - Use the regenerate feature periodically

  • Delete unused keys - Reduce your attack surface

  • Monitor usage - Check logs for unexpected activity

Don't ❌

  • Never commit keys to git - Use .env files (add to .gitignore)

  • Never share keys publicly - Treat them like passwords

  • Never expose in client-side code - Keys belong on the server only

Environment Variables Example


Team API Keys

When you're part of a team:

  • Team owners and admins can create keys for the team

  • All team members can use team API keys

  • Usage is billed to the team balance

  • Your personal keys are archived while on a team

See Team Account for more details.


Troubleshooting

"Invalid API Key"

  • Verify you copied the complete key (including sk- prefix)

  • Check the key isn't disabled in your dashboard

  • Confirm you're using the correct base URL: https://api.tensorx.ai/v1

"Insufficient Balance"

  • Keys require a wallet balance > $0 to create

  • Keys are auto-disabled when balance drops to $0.05

  • Add funds to re-enable your keys

Lost Your Key?

API keys cannot be recovered once lost. You'll need to:

  1. Delete the old key (if you remember which one)

  2. Create a new key

  3. Update your applications with the new key


Need Help?

Last updated

Was this helpful?