URL Shortener
Shorten your long URLs with custom expiration times
API Documentation
Use the following API endpoints to interact with the URL shortener.
POST /shorten
Shortens a long URL and returns the shortened version.
{
"url": "https://example.com/very-long-url",
"expiry": "24h"
}
Response:
{
"original": "https://example.com/very-long-url",
"shortened": "https://hlai.in/abc123",
"expiresAt": "2025-07-12T14:00:00Z"
}
GET /{code}
Redirects to the original URL using the shortened code.
GET https://hlai.in/{code}
Note: Expiration times can be set as: 1h, 24h, 7d, 30d, or never.