Token Overview
API Token (API Key) is your credential for calling Laozhang API. Like a password, it’s used to verify your identity and record usage.Create Token
Standard Token
Log in to Console
Enter Token Management

Create New Token

Configure Token
- Token Name: For identifying token purpose (e.g., “Production Environment”, “Testing”)
- Billing Method: Choose billing method
- Usage-based billing (pay per token)
- Pay-per-use (pay per request)
- Permissions: Set API permissions (optional)
- Expiration Time: Set token validity period (optional)
Save Token
Special Purpose Tokens
- Usage-based Billing Token
- Pay-per-use Token
- Read-only Token
- Temporary Token
- High-frequency API calls
- Chat applications
- Text processing
- Code generation
- Billed by tokens consumed
- More economical for high usage
- Support all text models
Manage Tokens
View Token List
View all your tokens in console:Edit Token
Can modify token configuration:Click Edit
Modify Configuration
- Token name
- Permissions
- Expiration time
- Usage limits
Save Changes
Revoke Token
When need to invalidate a Token:Select Token
Click Revoke
Confirm Operation
Rotate Tokens
Regularly rotating Tokens enhances security:Create New Token
Update Application
Test Verification
Revoke Old Token
Security Best Practices
1. Token Storage
2. Version Control
3. Permission Control
Set minimum necessary permissions:4. IP Whitelist
Limit Token to specific IP addresses:Enable IP Restrictions
Add Allowed IPs
- Single IP:
192.168.1.100 - IP Range:
192.168.1.0/24 - Multiple IPs: Add multiple rules
Test Verification
5. Usage Monitoring
Regularly check Token usage:Token Leakage Handling
If Token Leaked
Immediately Revoke
Check Usage Records

Assess Impact
- Unusual API calls?
- Abnormal cost increases?
- Sensitive data leaks?
Create New Token
Update Applications
Contact Support
- Email: hi@laozhang.ai
- Request balance freeze or refund
- Report security incident
Prevent Leakage
Programmatic Management
Create Token via API
List Tokens
Revoke Token
Common Issues
Error: "Invalid API Key"
Error: "Invalid API Key"
-
Token Incorrect
- Check for extra spaces or newlines when copying
- Ensure complete Token copied
- Check for character confusion (0/O, 1/l, etc.)
-
Token Revoked
- Check Token status in console
- May have been manually revoked
- May have reached expiration time
-
Token Expired
- Check Token expiration time
- Recreate if expired
Can one account create multiple Tokens?
Can one account create multiple Tokens?
- Different environments (development/testing/production)
- Different projects
- Different billing methods
- Different permission levels
- Standard users: Up to 10 Tokens
- Professional users: Up to 50 Tokens
- Enterprise users: Unlimited
Can billing method be changed after Token creation?
Can billing method be changed after Token creation?
- Create new Token with desired billing method
- Update applications to use new Token
- Revoke old Token
- Usage records remain independent
- Balance is shared (same account)
How to set usage limits for Token?
How to set usage limits for Token?
Edit Token
Set Limits
- Daily limit (calls or amount)
- Monthly limit
- Single request maximum tokens
- Allowed models
Save Settings
What to do after forgetting Token?
What to do after forgetting Token?
- Create new Token as replacement
- Update all applications to use new Token
- Revoke old Token (optional)
- Immediately save Token after creation
- Use password manager to store
- Save to secure configuration management system
Best Practices
1. Environment Isolation
Use different Tokens for different environments:2. Token Naming
Use clear naming conventions:3. Regular Audits
Establish regular audit mechanisms:Related Resources
- Insufficient Balance - Handle balance issues
- Usage Logs - View API usage records
- Data Security - Understand data protection
- API Reference - View API documentation