Galon Cloud
Galon API v1

/geo/route

Base URL https://api.galon.ai/v1 · export GALON_API_BASE="https://api.galon.ai/v1"

POST /geo/route

Compute a route

A route between 2 to 25 places, in travel order; the answer lists the resolved places. Scope `geo:route`. Billed per request from the prepaid balance; the answer carries a `receipt`. Auth: a secret key (`Authorization: Bearer gln_…`) from a server, or a browser key (`gln_pk_…`, in `?key=` or the Bearer header) from a page whose origin is declared on the key. A secret key sent with an `Origin` header, or in the URL, is refused (403 `secret_key_in_browser`, `secret_key_in_url`).

API key (Bearer), on the public API endpoint.

Request body

application/json · schema GeoRouteRequest

FieldTypeDescription
profile"driving" | "walking" | "cycling" | "two_wheeler"Travel mode (default driving).
language"en" | "fr" | "es" | "de" | "pt" | "it" | "ar" | "zh"Language of the steps.
waypointsarray<GeoPlace> · required2 to 25 places, in travel order.

Responses

StatusDescriptionBody
200FeatureCollection with the LineString, distance_m, duration_s, steps, waypoints, attribution and receiptGeoFeatureCollection
422geo_query_invalid, geo_route_not_found, geo_coordinates_out_of_range, geo_coordinates_invalid, geo_address_not_foundError
401api_key_missing, api_key_invalid, api_key_revoked, api_key_ambiguousError
402geo_balance_exhausted: the prepaid balance is used upError
403scope_missing, secret_key_in_browser, secret_key_in_url, browser_key_origin_required, browser_key_origin_not_allowed, geo_test_adapter_live_refusedError
404not_found: Geo, or this operation, is not served to this accountError
429geo_rate_limited, geo_monthly_cap_reached, browser_key_daily_cap_reached (Retry-After)Error
503geo_unavailable, geo_operation_unavailable, platform_unavailableError
504geo_upstream_timeout: retryError

Examples

curl

curl -X POST "$GALON_API_BASE/geo/route" \
  -H "Authorization: Bearer $GALON_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"waypoints": [[1]]}'