Basic Validation
Validate a request using the user’s API key:API Route Integration
Integrate validation directly into your Next.js API routes:Validation Response
The validation method returns a detailed response:Using withRateLimit Helper
The SDK provides awithRateLimit
helper for easier integration:
Custom Error Handling
Customize error responses for rate limit exceeded:Validation Options
You can pass additional options to the validation:Error Types
The SDK handles various error scenarios:- Invalid API Key: Returns 401 Unauthorized
- Rate Limit Exceeded: Returns 429 Too Many Requests
- Network Errors: Returns 500 Internal Server Error
- Validation Errors: Returns 400 Bad Request
Next Steps
- Middleware - Use built-in middleware for API routes
- API Key Management - Manage API keys for your users
- Plans - Configure usage plans