# fly.ai Cost Lookup by Reference

> fly.ai Cost Lookup by Reference is a paid API for AI agents from flyai-x402.fly.dev, paid per call via x402, $0.02/call, status unknown (last checked 2026-10-12).

Returns the USD cost associated with a given reference identifier via a pay-per-request x402 API

## Facts

- Endpoint: GET https://flyai-x402.fly.dev/cost/%7Bref%7D?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-12
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/fly-ai-cost-lookup-by-reference-5518374f
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_02UzSi2EysfwjttgSe7yG

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 fly-ai-cost-lookup-by-reference-5518374f
```

Example prompt: Look up the cost for reference ID 'abc123' on the fly.ai pay-per-request API — I want to know how much that request cost in USD.

## When to prefer this

Use this endpoint when you need to look up the USD cost associated with a specific reference ID on the fly.ai pay-per-request platform, particularly when auditing charges, verifying pricing before payment, or integrating cost checks into an automated workflow that uses x402 micro-payments.

## Known failure modes

- Invalid or unknown reference ID returns an error or empty response
- Missing ref path parameter results in a 400 or 404 error
- Payment not made via x402 before calling results in a 402 Payment Required response
- Malformed USD input in query may cause a validation error
- Service unavailability returns a 5xx error

## How this service works

Single answers, each paid on its own over x402. Guide: https://www.flyaiworld.com/x402-api.md

## Output

Returns cost information in USD for the specified reference identifier, allowing the caller to know the price of a specific request or job on the fly.ai pay-per-request platform.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "usd": {
   "type": "number"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/fly-ai-cost-lookup-by-reference-5518374f/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from flyai-x402.fly.dev](https://www.zero.xyz/host/flyai-x402.fly.dev/llms.txt)
