# LLM Cost Quote via OpenRouter

> LLM Cost Quote via OpenRouter is a paid API for AI agents from x402-v2-mint-llm-cost-quote.vercel.app, paid per call via x402, $0.003/call, status unknown (last checked 2026-12-03).

Returns a ranked list of LLM model costs (cheapest first) for a given prompt size, sourced from OpenRouter's public model catalog without requiring an API key.

## Facts

- Endpoint: POST https://x402-v2-mint-llm-cost-quote.vercel.app/v1/llm-cost-quote?utm_source=zero.xyz
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-12-03
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/llm-cost-quote-via-openrouter-2bdad04c
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_IAyY1wcihJSWBKJYKxD_j

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-cost-quote-via-openrouter-2bdad04c -d '<json body>'
```

Example prompt: Show me the top 10 cheapest LLM models on OpenRouter for a prompt with 1000 input tokens and 500 output tokens, excluding free models — ranked cheapest first.

## When to prefer this

Use this endpoint when you need a quick, keyless cost comparison of LLM models from OpenRouter sorted by price. It is ideal for cost-optimization workflows, agent routing decisions (pick cheapest capable model), or budgeting LLM usage without needing your own OpenRouter API key. Prefer this over querying OpenRouter directly when you want pre-sorted, cost-ranked results without API key management.

## Known failure modes

- Invalid token counts (negative integers) return validation error
- top parameter exceeds maximum of 50 returns error
- OpenRouter public model data temporarily unavailable causes upstream failure
- Malformed model names in models array may return no matches
- Payment not completed (x402 protocol) causes request to be rejected before processing

## How this service works

Cost quote per model from OpenRouter public /models (keyless), cheapest first.

## Output

A JSON response containing an ordered list of LLM models ranked cheapest first, with estimated costs based on the specified input/output token counts. Includes model names, per-token pricing, and total estimated cost for the given parameters. The response also confirms whether the call was charged and the skill name.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "top": {
   "type": "integer",
   "default": 10,
   "maximum": 50,
   "minimum": 1
  },
  "text": {
   "type": "string"
  },
  "models": {
   "type": "array",
   "items": {
    "type": "string"
   }
  },
  "request_id": {
   "type": "string"
  },
  "include_free": {
   "type": "boolean",
   "default": false
  },
  "input_tokens": {
   "type": "integer",
   "minimum": 0
  },
  "output_tokens": {
   "type": "integer",
   "default": 500,
   "minimum": 0
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "skill": "llm-cost-quote",
  "charged": true,
  "summary": "ok"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/llm-cost-quote-via-openrouter-2bdad04c/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-v2-mint-llm-cost-quote.vercel.app](https://www.zero.xyz/host/x402-v2-mint-llm-cost-quote.vercel.app/llms.txt)
