API Key Authentication
Byul REST API uses API key authentication. All requests must include a valid API key in the request headers.Getting Your API Key
- Sign up at byul.ai
- Login to your API Dashboard
- Copy your API key (starts with
byul_v2)
Your API key starts with the
byul_ prefix and is immediately available after account creation.Authentication Methods
Include your API key using theX-API-Key header:
Example Requests
- curl
- JavaScript
- Python
- PHP
Security Best Practices
Environment Variables
Secure (Recommended)Client-Side Security
Don’t expose in browserKey Management
- Rotate Keys Regularly: Generate new API keys periodically
- Monitor Usage: Check your dashboard for unusual activity
- Restrict Access: Use separate keys for different environments
- Secure Storage: Store keys in secure environment variables or key management systems
Development Environments
Use different API keys for different environments:Authentication Errors
401 Unauthorized
- Missing
X-API-Keyheader - Invalid API key format
- Expired or revoked API key
403 Forbidden
- Plan doesn’t support the requested feature
- Account suspended or payment overdue
402 Payment Required
- Plan expired
- Payment method failed
- Usage exceeded plan limits
Testing Authentication
Use the health check endpoint to test your authentication:Plan-Based Access
Different plans have different capabilities:| Plan | Rate Limit | Features |
|---|---|---|
| Test (Free) | 30 req/min | Basic news access |
| Starter ($19) | 60 req/min | Basic news access |
| Pro ($99) | 120 req/min | News + WebSocket access |
| Enterprise | Custom | All features + custom development |
Check your current plan and usage in the API Dashboard.