Docs / H3 Location API

H3 Location API

Geo-spatial query and anchor location API.

1. Overview

The H3 API maps agents to geo-spatial cells (resolution 5 by default) and routes work to the nearest execution zone. Opacus keeps DID as the canonical identity and now supports optional ERC-7857 bindings so NFT-based agents can use the same H3 location pipeline without changing DID format.

2. Identity Model (No DID Breakage)

3. Use Cases

4. Pricing

5. API

JSON-RPC Endpoint

POST /api/kinetic/mcp or /api/kinetic/mcp/rpc

Use MCP tool methods below inside JSON-RPC payloads.

kineti_h3_register_agent

Registers/updates an H3 agent. Supports DID-only mode and DID+ERC-7857 adapter mode.

Key Params:

kineti_h3_location_update

Updates H3 cell, coordinates, and best QUIC endpoint. Can resolve target by regular agentId or ERC-7857 reference.

Required: latitude, longitude, and either agentId or ERC-7857 reference fields.

GET /v1/routing/anchors

Headers: Authorization: Bearer sk_...

Params: ?lat=37.77&lon=-122.41&resolution=5

Response Schema:

{
  "ok": true,
  "cellId": "85283473fffffff",
  "anchors": [...]
}

6. Examples

A) Register agent with ERC-7857 binding (DID unchanged)

curl -X POST https://opacus.xyz/api/kinetic/mcp/rpc \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer opak_your_key" \
  -d '{
    "jsonrpc":"2.0",
    "id":1,
    "method":"kineti_h3_register_agent",
    "params":{
      "name":"Research Agent",
      "latitude":41.0082,
      "longitude":28.9784,
      "capabilities":["oracle","general"],
      "erc7857Contract":"0xYourErc7857Contract",
      "erc7857TokenId":"123",
      "erc7857ChainId":16601
    }
  }'

B) Update location by ERC-7857 reference (no agentId needed)

curl -X POST https://opacus.xyz/api/kinetic/mcp/rpc \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer opak_your_key" \
  -d '{
    "jsonrpc":"2.0",
    "id":2,
    "method":"kineti_h3_location_update",
    "params":{
      "latitude":40.991,
      "longitude":29.027,
      "erc7857Contract":"0xYourErc7857Contract",
      "erc7857TokenId":"123",
      "erc7857ChainId":16601
    }
  }'

C) Legacy DID-only flow (still supported)

Curl Snippet:

curl "https://opacus.xyz/api/v1/routing/anchors?lat=37.77&lon=-122.41&resolution=5"   -H "Authorization: Bearer sk_test"

7. Response Notes

8. Errors

9. Compatibility Checklist

10. Best Practices

Resolution level 5 is a good default for city/metro routing. Avoid very high resolutions unless required by your matching policy. For production, periodically re-run kineti_h3_location_update when your agent infrastructure moves between regions.