# Initial Bearing Calculator

> Initial Bearing Calculator is a paid API for AI agents from x402-agent.kariguetoazul.workers.dev, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-13).

Computes the initial compass bearing (in degrees) from one geographic coordinate to another using geodesic geometry.

## Facts

- Endpoint: POST https://x402-agent.kariguetoazul.workers.dev/api/geometry/initial-bearing?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/initial-bearing-calculator-1ae50056
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_t7RuDvpCJJQ4YO-xdVZOa

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 initial-bearing-calculator-1ae50056 -d '<json body>'
```

Example prompt: What's the initial bearing from coordinates 40.7128° N, 74.0060° W (New York) to 51.5074° N, 0.1278° W (London)?

## When to prefer this

Choose this endpoint when you need a fast, cheap ($0.001 USDC) programmatic computation of the initial geodesic bearing between two decimal-degree coordinates and don't want to implement the haversine/bearing formula yourself. Ideal for navigation apps, drone routing, logistics, or any agent workflow requiring directional heading as part of a larger geospatial pipeline.

## Known failure modes

- Missing or out-of-range latitude/longitude values (lat outside -90 to 90, lon outside -180 to 180) will likely result in a validation error
- Identical start and end coordinates may return undefined or 0 bearing
- Payment failure or insufficient USDC balance may block the request via x402 protocol
- Server-side Cloudflare Worker cold start or quota exhaustion may cause timeout or 402/503 responses

## How this service works

Evidence-backed autonomous AI jobs and paid data tools. Queue/D1/cron run outside the chat; free quotas and bounded execution apply.

## Output

Returns a JSON object with a single 'degrees' field containing the initial bearing as a numeric value between 0 and 360, representing the compass angle from the first coordinate to the second (e.g. {"degrees": 90}).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "lat1": {
   "type": "number",
   "maximum": 90,
   "minimum": -90,
   "description": "Latitude in decimal degrees."
  },
  "lat2": {
   "type": "number",
   "maximum": 90,
   "minimum": -90,
   "description": "Latitude in decimal degrees."
  },
  "lon1": {
   "type": "number",
   "maximum": 180,
   "minimum": -180,
   "description": "Longitude in decimal degrees."
  },
  "lon2": {
   "type": "number",
   "maximum": 180,
   "minimum": -180,
   "description": "Longitude in decimal degrees."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "degrees": 90
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/initial-bearing-calculator-1ae50056/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-agent.kariguetoazul.workers.dev](https://www.zero.xyz/host/x402-agent.kariguetoazul.workers.dev/llms.txt)
