Overview
Struct APIs use API key authentication for most endpoints. Some endpoints also support token-based authentication for user-specific operations.API Key Authentication
Getting Your API Key
- Register an Account: Visit https://api.vects.ai/auth/register to create your account
- Generate API Key: Once logged in, navigate to the API Keys section in your dashboard
- Copy Your Key: Save your API key securely - it won’t be shown again
Using API Keys
Include your API key in the request headers:Token Authentication
For user-specific operations, you can use token authentication:Getting a Token
Using Tokens
Include the token in your request headers:Rate Limits
API requests are subject to rate limits based on your subscription plan:- Free Tier: 100 requests per hour
- Pro Tier: 1,000 requests per hour
- Enterprise: Custom limits
Error Responses
Authentication errors return standard HTTP status codes:
Example Error Response:
Best Practices
- Rotate Keys Regularly: Generate new API keys periodically
- Use Environment Variables: Never hardcode keys in your source code
- Monitor Usage: Track your API usage in the dashboard
- Implement Retry Logic: Handle rate limits gracefully with exponential backoff