# Mapbox Directions via gateway.apiosk.com

> Mapbox Directions via gateway.apiosk.com is a paid API for AI agents from gateway.apiosk.com, paid per call via x402, $0.17/call, status down (last checked 2026-09-15).

Returns turn-by-turn driving directions, route geometry, duration, and distance between two or more waypoints using the Mapbox Directions API

## Facts

- Endpoint: GET https://gateway.apiosk.com/mapbox/directions
- Price: $0.17/call
- Payment: x402
- Status: down
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/mapbox-directions-via-gateway-apiosk-com-7d5f2b18
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_0Cq2X3acIGpM73WXwSDRM

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 mapbox-directions-via-gateway-apiosk-com-7d5f2b18
```

Example prompt: What's the best driving route from San Francisco, CA to Washington, DC — give me the distance, travel time, and the route geometry so I can plot it on a map.

## When to prefer this

Use this endpoint when you need Mapbox-powered driving directions with encoded polyline geometry, step-by-step route legs, and precise distance/duration data — especially when integrating with Mapbox map rendering or when you need the x402 micropayment-compatible API gateway. Prefer over raw Mapbox API when you want a pre-authenticated pay-per-call model without managing Mapbox API keys.

## Known failure modes

- Invalid or missing coordinate parameters return an error response
- Unreachable routes between waypoints (e.g. across oceans without ferry routing) may return no routes
- Malformed request parameters cause API rejection
- Rate limiting or upstream Mapbox API errors may cause failures
- Payment of 0.12 USDC required per call; failed payment returns 402

## How this service works

API call to mapbox

## Output

Returns a JSON object with an 'Ok' status code, an array of routes each containing legs with steps, total weight, distance (in meters), duration (in seconds), and an encoded polyline geometry string, plus waypoint details including matched street names and precise coordinates.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "required": {
   "type": "string"
  },
  "properties": {
   "type": "string"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "code": "Ok",
 "routes": [
  {
   "legs": [
    {
     "steps": [],
     "weight": 155793.359,
     "summary": "I 80, I 80 East",
     "distance": 4538142,
     "duration": 155332.75
    }
   ],
   "weight": 155793.359,
   "distance": 4538142,
   "duration": 155332.75,
   "geometry": "s|qeFbdejV}hhG{jbHqa|A_enIsnrGsh{H`apAekuCqv`B{xzI",
   "weight_name": "auto"
  }
 ],
 "waypoints": [
  {
   "name": "McAllister Street",
   "distance": 11.321,
   "location": [
    -122.420019,
    37.780101
   ]
  },
  {
   "name": "Logan Circle Northwest",
   "distance": 11.763,
   "location": [
    -77.030091,
    38.910078
   ]
  }
 ]
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/mapbox-directions-via-gateway-apiosk-com-7d5f2b18/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from gateway.apiosk.com](https://www.zero.xyz/host/gateway.apiosk.com/llms.txt)
