# GoCreative Distance Calculator (Haversine)

> GoCreative Distance Calculator (Haversine) is a paid API for AI agents from api.gocreativeai.com, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-16).

Calculates the great-circle distance between two geographic coordinates using the Haversine formula, returning results in both kilometers and miles.

## Facts

- Endpoint: GET https://api.gocreativeai.com/v1/calc/distance/%7Barg%7D
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-16
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/gocreative-distance-calculator-haversine-63b88c65
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_usPCS3Hdrx1cMNLPiK22m

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 gocreative-distance-calculator-haversine-63b88c65
```

Example prompt: What's the straight-line distance between New York City (40.7128, -74.0060) and London (51.5074, -0.1278) in both kilometers and miles?

## When to prefer this

Use this endpoint when you need a quick, accurate great-circle (as-the-crow-flies) distance between two lat/lon coordinate pairs and want a simple numeric result in both km and miles without needing routing or road-based distance. Ideal for geospatial calculations in agent workflows where no API key setup is desired and pay-per-call USDC micropayment via x402 is acceptable.

## Known failure modes

- Invalid coordinate format — coordinates must be provided as 'lat1,lon1,lat2,lon2' in the path argument
- Out-of-range coordinate values (latitude outside -90 to 90, longitude outside -180 to 180)
- Missing or malformed input query parameter resulting in 400 error
- Payment failure via x402 if USDC balance insufficient

## How this service works

Keyless, pay-per-call compliance &amp; regulated-data API for AI agents — OFAC wallet + sanctions/PEP + KYB screening, SEC filings, FRED economics, FDA recalls, federal awards, plus continuous monitoring. USDC on Base/Solana via x402, native MCP. No API key, no signup.

## Output

Returns a JSON object with the great-circle distance in kilometers and miles, the origin and destination coordinate arrays, and the calculation method used (haversine). Example: {km: 5570.23, miles: 3461.179, from: [40.7128, -74.006], to: [51.5074, -0.1278], source: 'haversine'}.

## Example request

```json
{
 "arg": "40.7128,-74.0060,51.5074,-0.1278"
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "pathParams": {
     "type": "object"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "input"
     ],
     "properties": {
      "input": {
       "type": "string",
       "description": "endpoint argument"
      }
     }
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/gocreative-distance-calculator-haversine-63b88c65/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.gocreativeai.com](https://www.zero.xyz/host/api.gocreativeai.com/llms.txt)
