# LLM Cost & Capacity Calc – Model Ranker

> LLM Cost & Capacity Calc – Model Ranker is a paid API for AI agents from llm-cost-calc.x402tookit.com, paid per call via x402, $0.02/call, status unknown (last checked 2026-10-29).

Ranks 2–20 LLM models by total cost for a given workload using caller-supplied prices, and flags models whose context window is too small.

## Facts

- Endpoint: GET https://llm-cost-calc.x402tookit.com/model-compare?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-29
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/llm-cost-capacity-calc-model-ranker-a1893ebc
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_WAl6J5xuaHosycfFLW-zl

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-capacity-calc-model-ranker-a1893ebc
```

Example prompt: Compare these three models for a workload of 1000 requests with 800 input tokens and 300 output tokens each — GPT-4o at $5/$15 per million tokens with a 128k context window, Claude 3.5 Sonnet at $3/$15 with a 200k context window, and Gemini 1.5 Pro at $1.25/$5 with a 1M context window — and tell me which is cheapest and which ones fit the context window.

## When to prefer this

Use this endpoint when you need to compare multiple LLM models side-by-side on cost using your own negotiated or published prices, especially when context window fit is also a concern. Prefer this over single-model cost calculators when the goal is to select the best model from a candidate list rather than just compute spend for a known model.

## Known failure modes

- Missing required parameters (models, inputTokens, outputTokens) returns an error
- Malformed JSON in the models array causes a parse error
- Models array with fewer than 2 entries may return an incomplete ranking
- Invalid or negative token counts may produce unexpected results
- Context window field omitted from a model entry means no context fit check is performed for that model

## How this service works

Rank 2 to 20 models by cost for a workload from your own prices; flags models whose context window is too small.

## Output

Returns a ranked array of models sorted by total cost, each with total cost, cost per request, context window size, and a boolean flag indicating whether the model's context window fits the workload. Also includes a summary verdict, the name of the cheapest model, reasons for the ranking, and optional disclaimers.

## 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": [
      "models",
      "inputTokens",
      "outputTokens"
     ],
     "properties": {
      "models": {
       "type": "string",
       "description": "JSON array of {name, inputPricePerMTok, outputPricePerMTok, contextWindow?}"
      },
      "requests": {
       "type": "integer",
       "description": "Number of requests (default 1000)"
      },
      "inputTokens": {
       "type": "number",
       "description": "Input tokens per request"
      },
      "outputTokens": {
       "type": "number",
       "description": "Output tokens per request"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "asOf": {
       "type": [
        "null",
        "string"
       ]
      },
      "ranked": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "object",
        "properties": {
         "name": {
          "type": [
           "null",
           "string"
          ]
         },
         "totalCost": {
          "type": [
           "null",
           "number"
          ]
         },
         "fitsContext": {
          "type": [
           "boolean",
           "null"
          ]
         },
         "contextWindow": {
          "type": [
           "null",
           "number"
          ]
         },
         "costPerRequest": {
          "type": [
           "null",
           "number"
          ]
         }
        }
       }
      },
      "source": {
       "type": [
        "null",
        "string"
       ]
      },
      "reasons": {
       "type": [
        "array",
        "null"
       ]
      },
      "summary": {
       "type": [
        "null",
        "string"
       ]
      },
      "verdict": {
       "type": [
        "null",
        "string"
       ]
      },
      "cheapest": {
       "type": [
        "null",
        "string"
       ]
      },
      "degraded": 
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/llm-cost-capacity-calc-model-ranker-a1893ebc/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from llm-cost-calc.x402tookit.com](https://www.zero.xyz/host/llm-cost-calc.x402tookit.com/llms.txt)
