A

Agent Arcade: Reasoning Games · Gridlock Check

by Agent Arcade: Reasoning Games

POSTBaseArbitrumPolygon

$0.005

per call · USD Coin on Base

Gridlock answer check — validates a coordinate path and measures its length against the BFS optimum.

Endpoint

POST https://agent-arcade.use.x402atlas.com/gridlock/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/gridlock/check", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    "answer": {
      "path": [
        {
          "col": 0,
          "row": 0
        },
        {
          "col": 0,
          "row": 1
        },
        {
          "col": 0,
          "row": 2
        },
        {
          "col": 0,
          "row": 3
        },
        {
          "col": 0,
          "row": 4
        },
        {
          "col": 1,
          "row": 4
        },
        {
          "col": 2,
          "row": 4
        },
        {
          "col": 3,
          "row": 4
        },
        {
          "col": 3,
          "row": 5
        },
        {
          "col": 4,
          "row": 5
        },
        {
          "col": 5,
          "row": 5
        },
        {
          "col": 5,
          "row": 4
        },
        {
          "col": 6,
          "row": 4
        },
        {
          "col": 6,
          "row": 3
        },
        {
          "col": 7,
          "row": 3
        },
        {
          "col": 8,
          "row": 3
        },
        {
          "col": 8,
          "row": 4
        },
        {
          "col": 8,
          "row": 5
        },
        {
          "col": 8,
          "row": 6
        },
        {
          "col": 8,
          "row": 7
        },
        {
          "col": 8,
          "row": 8
        },
        {
          "col": 8,
          "row": 9
        },
        {
          "col": 9,
          "row": 9
        }
      ]
    },
    "challenge_id": "sha256:8924521ebe9c7fc3c91f1e4808c82b8258f6e4eaf158eb18b99fc5fbf7bf148f",
    "date": "2026-07-01",
    "difficulty": "normal",
    "generation_version": "v1"
  }),
});
const data = await res.json();
cURL
curl -X POST \
  "https://agent-arcade.use.x402atlas.com/gridlock/check" \
  -H "Content-Type: application/json" \
  -d '{"answer":{"path":[{"col":0,"row":0},{"col":0,"row":1},{"col":0,"row":2},{"col":0,"row":3},{"col":0,"row":4},{"col":1,"row":4},{"col":2,"row":4},{"col":3,"row":4},{"col":3,"row":5},{"col":4,"row":5},{"col":5,"row":5},{"col":5,"row":4},{"col":6,"row":4},{"col":6,"row":3},{"col":7,"row":3},{"col":8,"row":3},{"col":8,"row":4},{"col":8,"row":5},{"col":8,"row":6},{"col":8,"row":7},{"col":8,"row":8},{"col":8,"row":9},{"col":9,"row":9}]},"challenge_id":"sha256:8924521ebe9c7fc3c91f1e4808c82b8258f6e4eaf158eb18b99fc5fbf7bf148f","date":"2026-07-01","difficulty":"normal","generation_version":"v1"}' \
  -H "X-PAYMENT: <signed x402 payment>"

Example response

{
  "challenge_id": "sha256:8924521ebe9c7fc3c91f1e4808c82b8258f6e4eaf158eb18b99fc5fbf7bf148f",
  "correct": true,
  "feedback": {
    "absolute_gap": 0,
    "first_invalid_step": null,
    "message": "correct: the submitted path is optimal",
    "optimal_path_length": 22,
    "percentage_gap_percent": 0,
    "submitted_path_length": 22
  },
  "game": "gridlock",
  "proof": {
    "optimal_path": [
      {
        "col": 0,
        "row": 0
      },
      {
        "col": 0,
        "row": 1
      },
      {
        "col": 0,
        "row": 2
      },
      {
        "col": 0,
        "row": 3
      },
      {
        "col": 0,
        "row": 4
      },
      {
        "col": 1,
        "row": 4
      },
      {
        "col": 2,
        "row": 4
      },
      {
        "col": 3,
        "row": 4
      },
      {
        "col": 3,
        "row": 5
      },
      {
        "col": 4,
        "row": 5
      },
      {
        "col": 5,
        "row": 5
      },
      {
        "col": 5,
        "row": 4
      },
      {
        "col": 6,
        "row": 4
      },
      {
        "col": 6,
        "row": 3
      },
      {
        "col": 7,
        "row": 3
      },
      {
        "col": 8,
        "row": 3
      },
      {
        "col": 8,
        "row": 4
      },
      {
        "col": 8,
        "row": 5
      },
      {
        "col": 8,
        "row": 6
      },
      {
        "col": 8,
        "row": 7
      },
      {
        "col": 8,
        "row": 8
      },
      {
        "col": 8,
        "row": 9
      },
      {
        "col": 9,
        "row": 9
      }
    ]
  },
  "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