跳转到主要内容
POST
GET Route

请求规范

  • 方法与路径: POST /apis/v1/graphhopper/get-route
  • 可用状态: enabled
  • 请求 URL 模板: https://api.aisa.one/apis/v1/graphhopper/get-route
  • Runtime 事实版本: 6a72f8e2fa7fb1c29379e3b24b3a247c8428a3b6ed621b3f84f84e75cb0de2bc
完整 OpenAPI 定义 有效请求与价格声明(包括认证和引用的 schema):

费用与请求规则

按用量计费;默认请求预估费用:$0.0007 USD(不是固定价格)。 声明的单位费率:每 provider_credit $0.000001 USD。 最终费用以账户适用价格及实际结算为准。 公开参考值不是你的账户报价或最终扣费。对于支持 X-AISA-Cost-Mode: quote 的接口,执行前请针对完整请求获取免费报价;执行后通过响应费用元数据和 Usage Logs 核对结算费用。1 USD 等于 1,000,000 个整数 micro-USD。
  • 默认请求参考估价(USD): 0.0007
  • 声明的单位费率(USD): 1e-06
  • 计费单位: provider_credit
  • 计费依据: response_units
  • 公开参考倍率: 1.0
  • 声明的最大计数或单位数: 10000000
  • 结算证据来源: response_body

授权

Authorization
string
header
必填

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

请求体

application/json
point
string[]
必填

Route waypoints as 'latitude,longitude' strings. Specify at least origin and destination. Via points are possible. Example: ['51.131,12.414', '48.224,3.867']

Required array length: 2 - 10 elements
profile
enum<string>
必填

The routing profile determining network, speed, and physical attributes. Common values: 'car', 'bike', 'foot', 'motorcycle', 'mtb', 'racingbike', 'hike'. Default: 'car'

可用选项:
car
optimize
enum<string>
必填

If 'true', reorders points to minimize total travel time. Applies route optimization limits and increases the price.

可用选项:
false
debug
boolean
默认值:false

Enable formatted output for debugging.

locale
string
默认值:en

Locale for turn instructions. Examples: 'en', 'de', 'fr', 'pt_PT'

示例:

"en"

"de"

"fr"

details
string[]

Path detail types to include. Available: 'street_name', 'street_ref', 'street_destination', 'leg_time', 'leg_distance', 'roundabout', 'country', 'time', 'distance', 'max_speed', 'max_weight', 'max_width', 'toll', 'road_class', 'road_class_link', 'road_access', 'road_environment', 'hazmat', 'hazmat_tunnel', 'hazmat_water', 'lanes', 'surface', 'smoothness', 'hike_rating', 'mtb_rating', 'foot_network', 'bike_network'

heading
integer[]

Preferred heading direction for each point in degrees (0-360, north-based clockwise). Specify one for start or one per point. Requires ch.disable=true.

curbside
enum<string>[]

Side of the road for leaving/arriving at each point. Specify for all points or none. Only for motor vehicles.

可用选项:
any,
left,
right
algorithm
enum<string>

Special routing algorithm. 'round_trip': returns to start with randomness. 'alternative_route': provides multiple route options.

可用选项:
round_trip,
alternative_route
elevation
boolean
默认值:false

Include altitude as third coordinate in response. Changes format of points and snapped_waypoints fields.

ch.disable
boolean
默认值:false

Enable flexible mode to use custom_model or advanced options below. Set to true for heading, algorithm, etc.

point_hint
string[]

Optional road name hints for snapping each point. Specify none or the same number as points.

calc_points
boolean
默认值:true

Whether to calculate route geometry points.

instructions
boolean
默认值:true

Whether to calculate and return turn-by-turn instructions.

pass_through
boolean
默认值:false

Avoid u-turns at via-points with regard to heading_penalty. Requires ch.disable=true.

points_encoded
boolean
默认值:true

Use polyline encoding for geometry (true) or simple coordinate pairs (false).

heading_penalty
integer
默认值:300

Time penalty in seconds for not obeying specified heading. Requires ch.disable=true.

必填范围: x >= 0
round_trip.seed
integer

Random seed for deterministic round trip results. Requires algorithm='round_trip'.

snap_prevention
enum<string>[]

Prevent snapping to specific road types. Values: 'motorway', 'trunk', 'ferry', 'tunnel', 'bridge', 'ford'

可用选项:
motorway,
trunk,
ferry,
tunnel,
bridge,
ford
round_trip.distance
integer
默认值:10000

Approximate round trip length in meters. Requires algorithm='round_trip'.

必填范围: x >= 0
alternative_route.max_paths
integer
默认值:2

Maximum number of alternative paths. Requires algorithm='alternative_route'.

必填范围: x >= 1
alternative_route.max_share_factor
number
默认值:0.6

Maximum similarity factor between alternative and optimal route. Requires algorithm='alternative_route'.

必填范围: 0 <= x <= 1
alternative_route.max_weight_factor
number
默认值:1.4

Maximum factor by which alternatives can be longer than optimal route. Requires algorithm='alternative_route'.

必填范围: x >= 0

响应

Tool result data

info
object
必填
paths
object[]
必填
hints
object