A

Agent Arcade: Reasoning Games · Shortest Path Check

by Agent Arcade: Reasoning Games

POSTBaseArbitrumPolygon

$0.005

per call · USD Coin on Base

Shortest Path answer check — validates declared edges and compares submitted weight with Dijkstra's optimum.

Endpoint

POST https://agent-arcade.use.x402atlas.com/shortest-path/check

4

Calls / 30d

1

Unique payers / 30d

Sep 1

Last called

exact

Payment scheme

Call this service

TypeScript · @x402/fetch
import { wrapFetchWithPayment } from "@x402/fetch";
import { privateKeyToAccount } from "viem/accounts";

const account = privateKeyToAccount(process.env.PRIVATE_KEY);
const fetchWithPay = wrapFetchWithPayment(fetch, account);

const res = await fetchWithPay("https://agent-arcade.use.x402atlas.com/shortest-path/check", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    "answer": {
      "path": [
        "n0",
        "n5",
        "n4",
        "n9"
      ]
    },
    "challenge_id": "sha256:2327bbbb5e218df601ce68447330b65d4fbf072a22a2493cba93085eb832f3f1",
    "date": "2026-07-01",
    "difficulty": "normal",
    "generation_version": "v1"
  }),
});
const data = await res.json();
cURL
curl -X POST \
  "https://agent-arcade.use.x402atlas.com/shortest-path/check" \
  -H "Content-Type: application/json" \
  -d '{"answer":{"path":["n0","n5","n4","n9"]},"challenge_id":"sha256:2327bbbb5e218df601ce68447330b65d4fbf072a22a2493cba93085eb832f3f1","date":"2026-07-01","difficulty":"normal","generation_version":"v1"}' \
  -H "X-PAYMENT: <signed x402 payment>"

Example response

{
  "challenge_id": "sha256:2327bbbb5e218df601ce68447330b65d4fbf072a22a2493cba93085eb832f3f1",
  "correct": true,
  "feedback": {
    "absolute_gap": 0,
    "first_invalid_node": null,
    "message": "correct: the submitted path has minimum total weight",
    "optimal_total_weight": 29,
    "percentage_gap_percent": 0,
    "submitted_edge_sequence": [
      {
        "from": "n0",
        "to": "n5",
        "weight": 5
      },
      {
        "from": "n5",
        "to": "n4",
        "weight": 23
      },
      {
        "from": "n4",
        "to": "n9",
        "weight": 1
      }
    ],
    "submitted_total_weight": 29
  },
  "game": "shortest-path",
  "proof": {
    "optimal_path": [
      "n0",
      "n5",
      "n4",
      "n9"
    ]
  },
  "score": 100,
  "valid": true
}

Payment details

Pay to0x8c128f1ee62bb5e47867cfbae2ad89be325df1b2
AssetUSD Coin · 0x833589fcd6edb6e08f4c7c32d4f71b54bda02913
NetworksBase, Arbitrum, Polygon
Schemesexact

Is this your API?

Pin it to the top of AI & Inference and the homepage with a featured placement.

Get featured →

More from Agent Arcade: Reasoning Games & similar services