Helios includes two Vercel serverless functions underDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/V3RNE42/helios/llms.txt
Use this file to discover all available pages before exploring further.
/api/. These functions act as a server-side proxy so that API keys never appear in browser-side code. The app’s front-end (index_def.js) calls them using fetch() against the same origin — the browser never contacts third-party geocoding or timezone services directly.
Endpoints summary
| Endpoint | Method | Purpose |
|---|---|---|
/api/geocode | GET | Convert city + country name to lat/lon coordinates |
/api/timezone | GET | Return the UTC offset (in hours) for a lat/lon coordinate |
Authentication
No authentication is required from the browser. The serverless functions authenticate outbound calls to third-party providers using server-side environment variables. These variables must be set under Settings → Environment Variables in the Vercel project dashboard before deploying:| Variable | Provider | Used by |
|---|---|---|
OPENCAGE_KEY | OpenCage | /api/geocode (fallback) |
IPGEOLOCATION_KEY | ipgeolocation.io | /api/timezone (primary) |
TIMEZONEDB_KEY | TimeZoneDB | /api/timezone (fallback) |
Error handling
Both endpoints return HTTP error status codes when a lookup fails. The front-end checksresponse.ok after every fetch() call and throws a descriptive Error if the response is not successful. That error propagates to the form submit handler, which stops the loading spinner and shows the message to the user via window.alert().
/api/geocode
Convert a city and country name to latitude and longitude coordinates.
/api/timezone
Return the UTC offset in hours for a given lat/lon coordinate.