# x402 AI Gateway — Currency Conversion

> x402 AI Gateway — Currency Conversion is a paid API for AI agents from api.fastapi.online, paid per call via x402, $0.0002/call, status unknown (last checked 2026-10-10).

Converts a specified amount from one currency to another, gated behind an x402 USDC micropayment on Base.

## Facts

- Endpoint: POST https://api.fastapi.online/f/fx/ang/htg?utm_source=zero.xyz
- Price: $0.0002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-10
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-ai-gateway-currency-conversion-7321f9c1
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_zxojB0vmmJM8TrHTRyR9L

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 x402-ai-gateway-currency-conversion-7321f9c1 -d '<json body>'
```

Example prompt: Convert 250 US dollars to Japanese yen for me — charge the micropayment automatically.

## When to prefer this

Choose this endpoint when you need a pay-per-call currency conversion with no subscription required, settling in USDC on Base via the x402 protocol. Suitable for agents that perform occasional conversions and want to avoid API key management, or when operating in a micropayment-native environment.

## Known failure modes

- Payment not received — 402 response if micropayment is not provided or fails
- Invalid or unsupported currency code — may return an error or empty result
- Amount field missing or non-numeric — validation error
- Upstream exchange rate provider unavailable — service may return 503 or stale data
- Malformed request body — 422 Unprocessable Entity

## How this service works

Self-hosted AI API gateway. Expensive endpoints require an x402 micropayment (USDC on Base) before executing.

## Output

Returns a JSON object containing the converted currency amount and likely the exchange rate or pair metadata used for the calculation.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "amount": {
   "type": "number",
   "description": "Amount of the source currency to convert (default 1)"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object"
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-ai-gateway-currency-conversion-7321f9c1/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.fastapi.online](https://www.zero.xyz/host/api.fastapi.online/llms.txt)
