# LLM API Pricing Lookup

> LLM API Pricing Lookup is a paid API for AI agents from fx-reference-rates.regnotes.workers.dev, paid per call via x402, $0.005/call, status unknown (last checked 2026-10-30).

Returns USD pricing per 1M input, output, and cached-input tokens plus context window size for ~3,300 LLM models across providers like OpenAI, Anthropic, Google, Azure, Bedrock, and more.

## Facts

- Endpoint: GET https://fx-reference-rates.regnotes.workers.dev/v1/ai/llm-prices?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-30
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/llm-api-pricing-lookup-5c22287f
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_MOFOtVsoaRbVfcWzd95CR

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 llm-api-pricing-lookup-5c22287f
```

Example prompt: What are the input, output, and cached-input prices per million tokens for claude-sonnet-4-5 on Anthropic direct, and what's its context window size?

## When to prefer this

Choose this endpoint when you need structured, up-to-date LLM token pricing across a wide range of models and hosting providers (OpenAI, Anthropic, Azure, Bedrock, Vertex, Together, Fireworks, etc.) in a single call. It covers ~3,300 models and is ideal for cost estimation, provider comparison, or budget optimization workflows. Prefer it over manual web scraping or provider-specific pricing pages when you need machine-readable, filterable data in an agent pipeline.

## Known failure modes

- Model name not found — returns empty models array with matched: 0
- Invalid limit format (non-numeric or >3 digits) — schema validation error
- Unknown provider string — returns empty results rather than an error
- No query parameters provided — may return unfiltered or error response
- Rate limiting or payment failure via x402 protocol — request blocked

## How this service works

LLM API pricing lookup: USD per 1M input, output and cached-input tokens plus context window for ~3,300 models (OpenAI GPT, Anthropic Claude, Google Gemini, DeepSeek, Llama, Mistral, Qwen, xAI ...) across providers (direct, Azure, Bedrock, Vertex, Together, Fireworks ...). Filter by model and provider; sorted by input price.

## Output

A JSON object containing a 'models' array where each entry includes the model name, provider, mode (e.g. chat), max_input_tokens (context window), input_usd_per_mtok, output_usd_per_mtok, and cache_read_usd_per_mtok. Also includes a 'matched' count of results returned.

## 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"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "model"
     ],
     "properties": {
      "limit": {
       "type": "string",
       "pattern": "^\\d{1,3}$"
      },
      "model": {
       "type": "string",
       "minLength": 2
      },
      "provider": {
       "type": "string"
      }
     },
     "additionalProperties": false
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "models": [
   {
    "mode": "chat",
    "model": "claude-sonnet-4-5",
    "provider": "anthropic",
    "max_input_tokens": 200000,
    "input_usd_per_mtok": 3,
    "output_usd_per_mtok": 15,
    "cache_read_usd_per_mtok": 0.3
   }
  ],
  "matched": 1
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/llm-api-pricing-lookup-5c22287f/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from fx-reference-rates.regnotes.workers.dev](https://www.zero.xyz/host/fx-reference-rates.regnotes.workers.dev/llms.txt)
