Shortest Path answer check — validates declared edges and compares submitted weight wit…
Shortest Path answer check — validates declared edges and compares submitted weight with Dijkstra's optimum.
by agent-arcade.use.x402atlas.com · discovered, not yet claimed by its owner · updated 2026-10-06
Mirrored from Coinbase's public x402 Bazaar. The description is the provider's own text and has not been reviewed here; the payment requirements are copied as published.
What it does
Shortest Path answer check — validates declared edges and compares submitted weight with Dijkstra's optimum.
Tags: shortest-path · graph · dijkstra · pathfinding · optimization · bazaar
Call contract
- Method
- POST
- Input
- json
- Output
- json
- Last paid call
- 2026-10-06
{
"answer": {
"path": [
"n0",
"n5",
"n4",
"n9"
]
},
"challenge_id": "sha256:2327bbbb5e218df601ce68447330b65d4fbf072a22a2493cba93085eb832f3f1",
"date": "2026-07-01",
"difficulty": "normal",
"generation_version": "v1"
}{
"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
}Use with an agent
- Discover. Agents find this listing with
GET https://bazaar.saylorinnovations.com/discovery/search?query=…, the MCP toolsearch_resources, or/discovery/resources. - Inspect. Fetch
/resources/28466.jsonfor the price and payment options. - Pay. Call
GET https://agent-arcade.use.x402atlas.com/shortest-path/check. The provider answers402with its payment requirements. An x402 client signs one of the options below and retries withPAYMENT-SIGNATURE. - Execute. The provider returns
200with the data. Agent Bazaar is not in the request path and never sees your payment.
For humans
You don't need an account or an API key; you need a wallet holding a small amount of USDC on Base, Polygon, Arbitrum One, Solana, and an x402-capable client (see the examples below). Call the endpoint unpaid first to see exactly what it asks for.
Pricing & payment
- Price
- $0.005 / request
- Protocol
- x402 v2
- Auth
- No account or API key. Pay per request.
- Networks
- Base, Polygon, Arbitrum One, Solana
- Demand
- 4 calls · 3 unique payers in 30d (public x402 Bazaar data)
x402 payment requirements
| Scheme | Network | Asset | Amount | Pay to | Timeout |
|---|---|---|---|---|---|
| exact | Base eip155:8453 | USDC | $0.005 | 0x8C128f1Ee62Bb5e47867CfbAe2ad89be325Df1b2 | 300s |
| exact | Polygon eip155:137 | USDC | $0.005 | 0x8C128f1Ee62Bb5e47867CfbAe2ad89be325Df1b2 | 300s |
| exact | Arbitrum One eip155:42161 | USDC | $0.005 | 0x8C128f1Ee62Bb5e47867CfbAe2ad89be325Df1b2 | 300s |
| exact | Solana solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp | USDC | $0.005 | ASt6xvRyQ7ntERsmcYVMdLqZvz1GEN8Fzexzq62tXrNQ | 300s |
accepts[] (raw JSON)
[
{
"scheme": "exact",
"network": "eip155:8453",
"payTo": "0x8C128f1Ee62Bb5e47867CfbAe2ad89be325Df1b2",
"asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"amount": "5000",
"amountUsd": 0.005,
"maxTimeoutSeconds": 300
},
{
"scheme": "exact",
"network": "eip155:137",
"payTo": "0x8C128f1Ee62Bb5e47867CfbAe2ad89be325Df1b2",
"asset": "0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359",
"amount": "5000",
"amountUsd": 0.005,
"maxTimeoutSeconds": 300
},
{
"scheme": "exact",
"network": "eip155:42161",
"payTo": "0x8C128f1Ee62Bb5e47867CfbAe2ad89be325Df1b2",
"asset": "0xaf88d065e77c8cC2239327C5EDb3A432268e5831",
"amount": "5000",
"amountUsd": 0.005,
"maxTimeoutSeconds": 300
},
{
"scheme": "exact",
"network": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",
"payTo": "ASt6xvRyQ7ntERsmcYVMdLqZvz1GEN8Fzexzq62tXrNQ",
"asset": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
"amount": "5000",
"amountUsd": 0.005,
"maxTimeoutSeconds": 300
}
]Schemas
Output schema (JSON Schema)
{
"properties": {
"example": {
"additionalProperties": false,
"description": "Shortest Path answer-check validity and optimality verdict.",
"properties": {
"challenge_id": {
"description": "Checked Shortest Path challenge identity.",
"type": "string"
},
"correct": {
"description": "Whether the Shortest Path submission has minimum total weight.",
"type": "boolean"
},
"feedback": {
"additionalProperties": false,
"description": "Shortest Path validity and optimality measurements.",
"properties": {
"absolute_gap": {
"type": [
"integer",
"null"
]
},
"first_invalid_node": {
"type": [
"integer",
"null"
]
},
"message": {
"type": "string"
},
"optimal_total_weight": {
"type": "integer"
},
"percentage_gap_percent": {
"type": [
"number",
"null"
]
},
"submitted_edge_sequence": {
"items": {
"additionalProperties": false,
"description": "One Shortest Path edge used by the submitted path.",
"properties": {
"from": {
"description": "Traversal source node.",
"type": "string"
},
"to": {
"description": "Traversal destination node.",
"type": "string"
},
"weight": {
"description": "Declared edge weight.",
"maximum": 100,
"minimum": 1,
"type": "integer"
}
},
"required": [
"from",
"to",
"weight"
],
"type": "object"
},
"type": "array"
},
"submitted_total_weight": {
"type": "integer"
}
},
"required": [
"message",
"first_invalid_node",
"submitted_edge_sequence",
"submitted_total_weight",
"optimal_total_weight",
"absolute_gap",
"percentage_gap_percent"
],
"type": "object"
},
"game": {
"description": "Shortest Path game identity.",
"enum": [
"shortest-path"
],
"type": "string"
},
"proof": {
"additionalProperties": false,
"description": "Present only after a correct Shortest Path answer.",
"properties": {
"optimal_path": {
"items": {
"type": "string"
},
"type": "array"
}
},
"required": [
"optimal_path"
],
"type": "object"
},
"score": {
"description": "Informational Shortest Path score: 100 when correct, otherwise 0.",
"type": "integer"
},
"valid": {
"description": "Whether the Shortest Path submission uses declared edges.",
"type": "boolean"
}
},
"required": [
"challenge_id",
"game",
"valid",
"correct",
"score",
"feedback"
],
"type": "object"
},
"type": {
"type": "string"
}
},
"required": [
"type"
],
"type": "object"
}Example shape — generated from the schema, not a captured live response
{
"example": {
"challenge_id": "string",
"correct": true,
"feedback": {
"absolute_gap": 0,
"first_invalid_node": 0,
"message": "string",
"optimal_total_weight": 0,
"percentage_gap_percent": 0,
"submitted_edge_sequence": [
{
"from": "string",
"to": "string",
"weight": 0
}
],
"submitted_total_weight": 0
},
"game": "shortest-path",
"proof": {
"optimal_path": [
"string"
]
},
"score": 0,
"valid": true
},
"type": "string"
}Examples
curl "https://agent-arcade.use.x402atlas.com/shortest-path/check"
# -> 402 Payment Required, accepts[] lists how to pay
# retry with a PAYMENT-SIGNATURE (or PAYMENT header) once paidconst res = await fetch("https://agent-arcade.use.x402atlas.com/shortest-path/check");
if (res.status === 402) {
const { accepts } = await res.json();
// pay one of accepts[] via an x402 client, then retry with the payment header
}import httpx
res = httpx.get("https://agent-arcade.use.x402atlas.com/shortest-path/check")
if res.status_code == 402:
accepts = res.json()["accepts"]
# pay one of accepts[] via an x402 client, then retry with the payment headerDetails
- Provider
- agent-arcade.use.x402atlas.com
- Endpoint
- https://agent-arcade.use.x402atlas.com/shortest-path/check
- Machine-readable
/resources/28466.json