> ## Documentation Index
> Fetch the complete documentation index at: https://aisa.one/docs/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> - Base URLs: models `https://api.aisa.one/v1` (Gemini GenerateContent: `https://api.aisa.one/v1beta`); data APIs `https://api.aisa.one/apis/v1`. The `servers` of each operation in https://aisa.one/openapi.yaml is authoritative.
> - Auth: `Authorization: Bearer $AISA_API_KEY`. Never print, log, or commit the key.
> - MCP (preferred for agents): `https://mcp.aisa.one/mcp`, signed in with OAuth, so there is no key to paste.
> - Agent Skill: `npx skills add AIsa-team/agent-skills --skill aisa`. Fallback with the AIsa CLI: `aisa skills install aisa`.
> - Spending: docs, https://aisa.one/models, https://aisa.one/api, `/v1/models`, and MCP `search`, `list_categories`, `get_details`, `batch_quote`, and the `account` operation are free. Quote the exact calls before running them (MCP `batch_quote`, CLI `aisa quote --json`). If the quote reports `auto_execute_eligible: true`, run it unless the user set a tighter limit or asked only for a quote. Otherwise, tell the user in one message the planned calls, the quoted price, and a total USD budget for the task, then wait for approval. Direct HTTP calls follow the stricter rule at https://aisa.one/docs/get-started/cli.md#direct-http-fallback. Do not make paid calls to test availability. Full rule: https://aisa.one/llms.txt

# Get Matrix

> <!-- aisa-pricing:start -->
按用量计费；默认请求预估费用：$0.0803 USD（不是固定价格）。 声明的单位费率：每 provider_credit $0.000001 USD。 最终费用以账户适用价格及实际结算为准。
<!-- aisa-pricing:end -->

## 请求规范

* **方法与路径:** POST /apis/v1/graphhopper/get-matrix
* **可用状态:** enabled
* **请求 URL 模板:** `https://api.aisa.one/apis/v1/graphhopper/get-matrix`
* **Runtime 事实版本:** 6a72f8e2fa7fb1c29379e3b24b3a247c8428a3b6ed621b3f84f84e75cb0de2bc

[完整 OpenAPI 定义](https://aisa.one/docs/reference-contracts/zh/graphhopper.json)

有效请求与价格声明（包括认证和引用的 schema）：

```json theme={null}
{
  "operationId": "graphhopper.get-matrix",
  "method": "POST",
  "path": "/apis/v1/graphhopper/get-matrix",
  "servers": [
    {
      "url": "https://api.aisa.one"
    }
  ],
  "parameters": [],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "type": "object",
          "properties": {
            "point": {
              "items": {
                "type": "string"
              },
              "maxItems": 20,
              "minItems": 1,
              "type": "array",
              "description": "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."
            },
            "profile": {
              "enum": [
                "car"
              ],
              "type": "string",
              "description": "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'."
            },
            "curbside": {
              "type": "array",
              "items": {
                "enum": [
                  "any",
                  "left",
                  "right"
                ],
                "type": "string"
              },
              "description": "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."
            },
            "to_point": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "examples": [
                [
                  "48.1351,11.5820",
                  "53.5511,9.9937"
                ]
              ],
              "description": "The destination points for the routes in 'latitude,longitude' format. Use together with from_point for asymmetric matrices."
            },
            "fail_fast": {
              "type": "boolean",
              "default": true,
              "description": "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": {
              "type": "array",
              "items": {
                "enum": [
                  "weights",
                  "times",
                  "distances"
                ],
                "type": "string"
              },
              "examples": [
                [
                  "times",
                  "distances"
                ]
              ],
              "description": "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."
            },
            "from_point": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "examples": [
                [
                  "52.5200,13.4050"
                ]
              ],
              "description": "The origin points for the routes in 'latitude,longitude' format. Use together with to_point for asymmetric matrices."
            },
            "point_hint": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "Optional parameter. Specifies a hint for each point parameter to prefer a certain street for the closest location lookup."
            },
            "to_curbside": {
              "type": "array",
              "items": {
                "enum": [
                  "any",
                  "left",
                  "right"
                ],
                "type": "string"
              },
              "description": "Curbside setting for the to_point parameter. Must be 'any', 'left', or 'right'."
            },
            "from_curbside": {
              "type": "array",
              "items": {
                "enum": [
                  "any",
                  "left",
                  "right"
                ],
                "type": "string"
              },
              "description": "Curbside setting for the from_point parameter. Must be 'any', 'left', or 'right'."
            },
            "to_point_hint": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "For the to_point parameter. Specifies a hint to prefer a certain street for the closest location lookup."
            },
            "from_point_hint": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "For the from_point parameter. Specifies a hint to prefer a certain street for the closest location lookup."
            },
            "snap_prevention": {
              "type": "array",
              "items": {
                "enum": [
                  "motorway",
                  "trunk",
                  "ferry",
                  "tunnel",
                  "bridge",
                  "ford"
                ],
                "type": "string"
              },
              "description": "Optional parameter to prevent snapping to specific types of roads. Supported values: 'motorway', 'trunk', 'ferry', 'tunnel', 'bridge', 'ford'."
            }
          },
          "required": [
            "point",
            "profile"
          ]
        }
      }
    }
  },
  "x-aisa-status": "enabled",
  "x-aisa-pricing": {
    "cost_contract": "response_units",
    "customer_multiplier": 1.0,
    "customer_pricing": "provider_cost_multiplier",
    "default_request_estimate_usd": 0.0803,
    "estimate_source": "profile_seed",
    "evidence_source": "response_body",
    "maximum_units": 10000000,
    "unit": "provider_credit",
    "unit_rate_usd": 1e-06
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "scheme": "bearer",
        "type": "http"
      }
    }
  }
}
```

## 费用与请求规则

按用量计费；默认请求预估费用：\$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


## OpenAPI

````yaml reference-contracts/zh/graphhopper.json POST /apis/v1/graphhopper/get-matrix
openapi: 3.1.0
info:
  description: ''
  title: GraphHopper
  version: '1'
  x-aisa-capabilities:
    idempotency: Idempotency-Key
    max_price: X-AISA-Max-Price-USD
    quote:
      header: X-AISA-Cost-Mode
      value: quote
  x-aisa-configured-paths:
    - /apis/v1/graphhopper/geocode-get
    - /apis/v1/graphhopper/get-matrix
    - /apis/v1/graphhopper/get-route
    - /apis/v1/graphhopper/isochrone-get
    - /apis/v1/graphhopper/matrix-post
    - /apis/v1/graphhopper/route-post
  x-aisa-document:
    facts_hash: 6a72f8e2fa7fb1c29379e3b24b3a247c8428a3b6ed621b3f84f84e75cb0de2bc
    generator_version: '3'
    protocol_version: '1'
    schema_version: '1'
    composer_version: '28'
    response_pending: []
    document_hash: sha256:d9dd70cdbeb543115e630c23fe89116520ef370e8db5c5a9cc923630f4fca8ab
  x-aisa-plans:
    builder: 1
    display_plan: payg
    payg: 1
    similarweb_payg: 1
    team: 1
    version: e70a0959cd1b93b84ae16dffd7a538273ddb9c1d46277b82823c37ff1b6bc0fb
  x-aisa-provider: graphhopper
  x-aisa-catalogs:
    graphhopper:
      title: GraphHopper
      description: ''
      x-aisa-document:
        facts_hash: 6a72f8e2fa7fb1c29379e3b24b3a247c8428a3b6ed621b3f84f84e75cb0de2bc
        generator_version: '3'
        protocol_version: '1'
        schema_version: '1'
      x-aisa-plans:
        builder: 1
        display_plan: payg
        payg: 1
        similarweb_payg: 1
        team: 1
        version: e70a0959cd1b93b84ae16dffd7a538273ddb9c1d46277b82823c37ff1b6bc0fb
      x-aisa-capabilities:
        idempotency: Idempotency-Key
        max_price: X-AISA-Max-Price-USD
        quote:
          header: X-AISA-Cost-Mode
          value: quote
servers:
  - url: https://api.aisa.one
security:
  - bearerAuth: []
paths:
  /apis/v1/graphhopper/get-matrix:
    post:
      tags:
        - GraphHopper
      summary: Get Matrix
      description: >-
        <!-- aisa-pricing:start -->

        按用量计费；默认请求预估费用：$0.0803 USD（不是固定价格）。 声明的单位费率：每 provider_credit $0.000001
        USD。 最终费用以账户适用价格及实际结算为准。

        <!-- aisa-pricing:end -->
      operationId: graphhopper.get-matrix
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                point:
                  items:
                    type: string
                  maxItems: 20
                  minItems: 1
                  type: array
                  description: >-
                    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.
                profile:
                  enum:
                    - car
                  type: string
                  description: >-
                    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'.
                curbside:
                  type: array
                  items:
                    enum:
                      - any
                      - left
                      - right
                    type: string
                  description: >-
                    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.
                to_point:
                  type: array
                  items:
                    type: string
                  examples:
                    - - 48.1351,11.5820
                      - 53.5511,9.9937
                  description: >-
                    The destination points for the routes in
                    'latitude,longitude' format. Use together with from_point
                    for asymmetric matrices.
                fail_fast:
                  type: boolean
                  default: true
                  description: >-
                    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:
                  type: array
                  items:
                    enum:
                      - weights
                      - times
                      - distances
                    type: string
                  examples:
                    - - times
                      - distances
                  description: >-
                    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.
                from_point:
                  type: array
                  items:
                    type: string
                  examples:
                    - - 52.5200,13.4050
                  description: >-
                    The origin points for the routes in 'latitude,longitude'
                    format. Use together with to_point for asymmetric matrices.
                point_hint:
                  type: array
                  items:
                    type: string
                  description: >-
                    Optional parameter. Specifies a hint for each point
                    parameter to prefer a certain street for the closest
                    location lookup.
                to_curbside:
                  type: array
                  items:
                    enum:
                      - any
                      - left
                      - right
                    type: string
                  description: >-
                    Curbside setting for the to_point parameter. Must be 'any',
                    'left', or 'right'.
                from_curbside:
                  type: array
                  items:
                    enum:
                      - any
                      - left
                      - right
                    type: string
                  description: >-
                    Curbside setting for the from_point parameter. Must be
                    'any', 'left', or 'right'.
                to_point_hint:
                  type: array
                  items:
                    type: string
                  description: >-
                    For the to_point parameter. Specifies a hint to prefer a
                    certain street for the closest location lookup.
                from_point_hint:
                  type: array
                  items:
                    type: string
                  description: >-
                    For the from_point parameter. Specifies a hint to prefer a
                    certain street for the closest location lookup.
                snap_prevention:
                  type: array
                  items:
                    enum:
                      - motorway
                      - trunk
                      - ferry
                      - tunnel
                      - bridge
                      - ford
                    type: string
                  description: >-
                    Optional parameter to prevent snapping to specific types of
                    roads. Supported values: 'motorway', 'trunk', 'ferry',
                    'tunnel', 'bridge', 'ford'.
              required:
                - point
                - profile
      responses:
        '200':
          description: Tool result data
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/Response576A0Ea506F3_connect_GRAPHHOPPER_GET_MATRIX__output__public_data
        default:
          content:
            application/json:
              schema: {}
          description: >-
            Error response; upstream passthrough responses may use provider
            formats
components:
  schemas:
    Response576A0Ea506F3_connect_GRAPHHOPPER_GET_MATRIX__output__public_data:
      $ref: >-
        #/components/schemas/Response576A0Ea506F3_connect_GRAPHHOPPER_GET_MATRIX__output__fafd51a78430c324
    Response576A0Ea506F3_connect_GRAPHHOPPER_GET_MATRIX__output__fafd51a78430c324:
      type: object
      required:
        - info
      properties:
        info:
          $ref: >-
            #/components/schemas/Response576A0Ea506F3_connect_GRAPHHOPPER_GET_MATRIX__output__3dcbe9a1c56f2a1c
        hints:
          type: array
          items:
            $ref: >-
              #/components/schemas/Response576A0Ea506F3_connect_GRAPHHOPPER_GET_MATRIX__output__3999ec953f73543f
        times:
          type: array
          items:
            type: array
            items:
              anyOf:
                - type: number
                - type: 'null'
        weights:
          type: array
          items:
            type: array
            items:
              anyOf:
                - type: number
                - type: 'null'
        distances:
          type: array
          items:
            type: array
            items:
              anyOf:
                - type: number
                - type: 'null'
    Response576A0Ea506F3_connect_GRAPHHOPPER_GET_MATRIX__output__3dcbe9a1c56f2a1c:
      type: object
      required:
        - copyrights
      properties:
        took:
          type: number
        copyrights:
          type: array
          items:
            type: string
    Response576A0Ea506F3_connect_GRAPHHOPPER_GET_MATRIX__output__3999ec953f73543f:
      type: object
      required:
        - message
      properties:
        details:
          type: string
        message:
          type: string
        point_pairs:
          type: array
          items:
            type: array
            items:
              type: integer
        invalid_to_points:
          type: array
          items:
            type: integer
        invalid_from_points:
          type: array
          items:
            type: integer
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.