API Tokens

How to generate and manage your CaosLabs API tokens

API Tokens

API tokens allow you to securely access all CaosLabs APIs from your code. All API requests require authentication using a Bearer token in the Authorization header.

How to Generate a Token

  1. Sign up for CaosLabs at caoslabs.com
  2. Navigate to your profile section at the top right of the dashboard
  3. In the token section, click "Generate Token"
  4. Copy the token and save it somewhere safe - this is the only time you'll be able to view it
Notes: You can revoke and create tokens as needed. If you lose your token, simply generate a new one.

Using Your Token

Include your token in the Authorization header of all API requests:

bash
curl -X POST "https://api.caoslabs.com/arcfont/embedding" \ -H "Authorization: Bearer YOUR_API_TOKEN" \ -F "file=@your_image.png"

Token Management

Security Best Practices

  • Never share your tokens or commit them to version control
  • Store tokens securely using environment variables or secure vaults
  • Rotate tokens regularly for enhanced security
  • Use different tokens for different environments (dev, staging, prod)

Revoking Tokens

You can revoke and create new tokens as needed:

  1. Go to your profile section
  2. Find the token you want to revoke
  3. Click "Revoke Token"
  4. Generate a new token if needed
If you lose your token, simply generate a new one - the old token will be automatically invalidated.