{"uid":"cap_lt83eV0pbiXtbvR31qP6_","slug":"mapbox-matrix-routing-via-locus-x402-e3e98ba9","name":"Mapbox Matrix Routing via Locus x402","description":"Location and mapping APIs — geocoding, directions, isochrones, matrix routing, map matching, static maps, and spatial queries.","url":"https://mapbox.x402.paywithlocus.com/mapbox/matrix?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"profile":{"type":"string"},"sources":{"type":"string"},"approaches":{"type":"string"},"annotations":{"type":"string"},"coordinates":{"type":"string"},"destinations":{"type":"string"}}},"responseSchema":{"type":"json","example":{"data":{},"payment":{"scheme":"exact","settledUsdc":"0.001000","authorizedMaxUsdc":"0.001000"},"request":{"id":"00000000-0000-4000-8000-000000000000","statusUrl":"/requests/00000000-0000-4000-8000-000000000000"},"success":true}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_iEYjrqJ0fFxbQ-7t74UO7","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Computes travel duration and/or distance matrices between multiple origin and destination coordinates using Mapbox routing profiles, billed per-call via x402 micropayment.","exampleAgentPrompt":"Compute a driving travel time and distance matrix for these 5 locations — warehouse at -122.4194,37.7749, and delivery stops at -122.4089,37.7869, -122.3988,37.7831, -122.4312,37.7654, and -122.4001,37.7701 — using the mapbox/driving profile with duration and distance annotations.","exampleUseCases":[{"title":"Last-mile delivery fleet assignment","prompt":"I have a depot at -87.6298,41.8781 and 4 delivery addresses at -87.6151,41.8827, -87.6421,41.8699, -87.6073,41.8912, and -87.6334,41.8755 — can you build a driving travel time matrix so I can figure out the most efficient driver assignments?"},{"title":"Rideshare driver-to-rider matching","prompt":"I need walking travel times from 3 driver positions (-73.9857,40.7484, -73.9923,40.7512, -73.9801,40.7463) to 3 passenger pickup points (-73.9876,40.7495, -73.9934,40.7501, -73.9812,40.7479) — give me the full 3x3 matrix using mapbox/walking."},{"title":"Cycling logistics time estimation","prompt":"Can you get me a cycling duration and distance matrix between these 6 bike courier stops: -0.1276,51.5074, -0.1189,51.5155, -0.1354,51.5033, -0.1221,51.5098, -0.1302,51.5121, and -0.1168,51.5062 using the mapbox/cycling profile?"}],"resultDescription":"A JSON object containing a matrix of travel durations (in seconds) and/or distances (in meters) for each source-to-destination pair, plus payment confirmation details (settled USDC amount, request ID, and status URL).","failureModes":["More than 25 coordinates provided (or more than 10 for traffic profile) — API rejects with validation error","Invalid routing profile string — returns error indicating unsupported profile","Malformed coordinate format (wrong separator or order) — parse error","Coordinates in ocean or unsupported region — no route found for certain pairs","Payment failure or insufficient USDC balance — transaction not settled, no result returned"],"whenToPreferThis":"Use this endpoint when you need to compute travel times or distances between multiple origins and multiple destinations simultaneously (O×D matrix), rather than a single point-to-point route. Ideal for logistics optimization, fleet dispatch, and clustering problems where pairwise travel costs are needed. Prefer over single-directions endpoints when you have 2–25 locations and need all pairwise combinations efficiently in one call.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-13T18:41:38.588Z","isFirstParty":false,"canonicalSlug":"mapbox-matrix-routing-via-locus-x402-e3e98ba9"}