Complete reference for the LessToken API. Learn about authentication, endpoints, request/response formats, and error handling.
Base URL: https://lesstokens.hive-hub.ai
Authentication: X-API-Key header
Content-Type: application/json
Rate Limit: 1000 requests/hour (Free tier)
All API requests must include your API key using the X-API-Key header:
curl https://lesstokens.hive-hub.ai/api/compress \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json"Keep your API key secure
Never expose your API key in client-side code, public repositories, or version control systems. Use environment variables instead.
/api/compressPrimaryCompress text using advanced algorithms to reduce token count
/api/statusComing SoonCheck API status and current rate limit information
All successful API responses return JSON with the following structure:
{
"data": {
// Response data specific to the endpoint
},
"meta": {
"requestId": "req_abc123xyz",
"timestamp": "2025-01-18T12:00:00Z"
}
}Errors return appropriate HTTP status codes with detailed error messages:
Invalid request parameters or malformed JSON
Missing or invalid API key
Rate limit exceeded
Server error occurred
Rate limits are applied per API key. Response headers include current limit information:
X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 847
X-RateLimit-Reset: 17055792001,000
requests/hour
10,000
requests/hour
Custom
requests/hour