跳转到主要内容
POST
Get Matrix

请求规范

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

费用与请求规则

按用量计费;默认请求预估费用:$0.0803 USD(不是固定价格)。 声明的单位费率:每 provider_credit $0.000001 USD。 最终费用以账户适用价格及实际结算为准。 公开参考值不是你的账户报价或最终扣费。对于支持 X-AISA-Cost-Mode: quote 的接口,执行前请针对完整请求获取免费报价;执行后通过响应费用元数据和 Usage Logs 核对结算费用。1 USD 等于 1,000,000 个整数 micro-USD。
  • 默认请求参考估价(USD): 0.0803
  • 声明的单位费率(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[]
必填

Specify multiple points in 'latitude,longitude' format for which the matrix should be calculated. The starts are identical to the destinations. If there are N points, then NxN entries will be calculated. Specify at least three points. Cannot be used together with from_point or to_point.

Required array length: 1 - 20 elements
profile
enum<string>
必填

The routing profile. It determines the network, speed and other physical attributes used when computing the route. Valid values include 'car', 'bike', 'foot', 'hike', 'mtb', 'racingbike', 'scooter', 'truck', and 'small_truck'.

可用选项:
car
curbside
enum<string>[]

Optional parameter. Specifies on which side a point should be relative to the driver when she leaves/arrives at a start/target/via point. Must be 'any', 'left', or 'right'. Specify for either none or all points.

可用选项:
any,
left,
right
to_point
string[]

The destination points for the routes in 'latitude,longitude' format. Use together with from_point for asymmetric matrices.

示例:
fail_fast
boolean
默认值:true

Specifies whether or not the matrix calculation should return with an error as soon as possible in case some points cannot be found or some points are not connected. If set to false, the matrix will be calculated for all valid points and contain null values for entries that could not be calculated.

out_array
enum<string>[]

Specifies which arrays should be included in the response. Specify one or more of 'weights', 'times', 'distances'. The units of distances are meters, times are seconds, and weights are arbitrary.

可用选项:
weights,
times,
distances
示例:
from_point
string[]

The origin points for the routes in 'latitude,longitude' format. Use together with to_point for asymmetric matrices.

示例:
point_hint
string[]

Optional parameter. Specifies a hint for each point parameter to prefer a certain street for the closest location lookup.

to_curbside
enum<string>[]

Curbside setting for the to_point parameter. Must be 'any', 'left', or 'right'.

可用选项:
any,
left,
right
from_curbside
enum<string>[]

Curbside setting for the from_point parameter. Must be 'any', 'left', or 'right'.

可用选项:
any,
left,
right
to_point_hint
string[]

For the to_point parameter. Specifies a hint to prefer a certain street for the closest location lookup.

from_point_hint
string[]

For the from_point parameter. Specifies a hint to prefer a certain street for the closest location lookup.

snap_prevention
enum<string>[]

Optional parameter to prevent snapping to specific types of roads. Supported values: 'motorway', 'trunk', 'ferry', 'tunnel', 'bridge', 'ford'.

可用选项:
motorway,
trunk,
ferry,
tunnel,
bridge,
ford

响应

Tool result data

info
object
必填
hints
object[]
times
((number | null)[])[]
weights
((number | null)[])[]
distances
((number | null)[])[]