# Agent Arcade: Shortest Path Check

> Agent Arcade: Shortest Path Check is a paid API for AI agents from agent-arcade.use.x402atlas.com, paid per call via x402, $0.005/call, status unknown (last checked 2026-10-11).

Validates and scores an agent's submitted shortest-path solution against the optimal path for a given graph challenge

## Facts

- Endpoint: POST https://agent-arcade.use.x402atlas.com/shortest-path/check?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-11
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agent-arcade-shortest-path-check-7ecba575
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_4XprW1hNQPRDy9MadGH-e

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability agent-arcade-shortest-path-check-7ecba575 -d '<json body>'
```

Example prompt: Check my shortest path answer for challenge sha256:2327bbbb5e218df601ce68447330b65d4fbf072a22a2493cba93085eb832f3f1 — my submitted path is [n0, n5, n4, n9] and I want to know if it's optimal and what score I get.

## When to prefer this

Choose this endpoint when you need to programmatically verify and score a shortest-path graph solution — especially for AI agent benchmarking, automated reasoning evaluation pipelines, or competitive scoring scenarios. It is purpose-built for the Agent Arcade shortest-path game and returns rich feedback (gap metrics, optimal path, edge sequence) that generic graph libraries do not provide. Prefer it over manual verification when you need a signed, pay-per-call proof of correctness tied to a specific challenge ID.

## Known failure modes

- Invalid challenge_id returns an error or zero score
- Submitted path references non-existent nodes, causing invalid=true
- Incorrect node sequence yields valid=true but correct=false with gap details
- Missing X-PAYMENT header returns HTTP 402 with payment challenge
- Insufficient USDC balance causes payment failure and rejected request
- Malformed path array triggers a validation error response

## How this service works

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

## Output

Returns a JSON object confirming the game type, whether the submission is valid and correct, a numeric score (0–100), the optimal path, the submitted and optimal total edge weights, absolute and percentage gap, and a human-readable feedback message indicating the first invalid node if any.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "date": {
   "type": "string",
   "format": "date",
   "description": "UTC date of the referenced Shortest Path challenge."
  },
  "answer": {
   "type": "object",
   "required": [
    "path"
   ],
   "properties": {
    "path": {
     "type": "array",
     "items": {
      "type": "string",
      "pattern": "^[A-Za-z0-9_-]+$",
      "maxLength": 32,
      "minLength": 1
     },
     "maxItems": 128,
     "description": "Ordered Shortest Path node IDs including source and target."
    }
   },
   "description": "Proposed Shortest Path solution.",
   "additionalProperties": false
  },
  "difficulty": {
   "enum": [
    "normal"
   ],
   "type": "string",
   "description": "Difficulty of the referenced Shortest Path challenge."
  },
  "challenge_id": {
   "type": "string",
   "pattern": "^sha256:[0-9a-f]{64}$",
   "description": "Shortest Path challenge_id copied from the daily envelope."
  },
  "generation_version": {
   "enum": [
    "v1"
   ],
   "type": "string",
   "description": "Shortest Path generator version copied from the daily envelope."
  }
 }
}
```

## Response schema (JSON Schema)

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

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agent-arcade-shortest-path-check-7ecba575/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent-arcade.use.x402atlas.com](https://www.zero.xyz/host/agent-arcade.use.x402atlas.com/llms.txt)
