# LLM Cost & Capacity Calc – Batch Discount Savings

> LLM Cost & Capacity Calc – Batch Discount Savings 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).

Compares realtime vs. batch API cost for an LLM workload given token counts, prices, and a discount fraction, and returns how much money is saved by using batch mode.

## Facts

- Endpoint: GET https://llm-cost-calc.x402tookit.com/batch-discount?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-batch-discount-savings-0daf5a01
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_eKvyr_8rd7fldLGnwBR61

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-batch-discount-savings-0daf5a01
```

Example prompt: How much would I save using batch mode instead of realtime for a job of 50,000 requests, each with 800 input tokens and 200 output tokens, at $5 per million input tokens and $15 per million output tokens, with a 50% batch discount?

## When to prefer this

Use this endpoint when you need a quick, structured comparison of batch vs. realtime LLM API costs for a defined workload — especially when you have your own per-million-token prices and want to quantify savings from a specific discount fraction. Prefer it over manual spreadsheet math or generic cost calculators when building automated pipelines that need to decide whether to queue work for batch or process immediately.

## Known failure modes

- Missing required query parameters (inputTokens, outputTokens, requests, inputPricePerMTok, outputPricePerMTok) returns an error
- Non-numeric or out-of-range values (e.g. requests > 1e9 or batchDiscount > 1) may return validation errors
- Service degradation indicated by degraded=true flag in response with partial results
- Payment failure via x402 protocol blocks access if USDC balance is insufficient

## How this service works

Compare realtime and batch API cost for a workload with your discount fraction, and the money saved by waiting.

## Output

Returns realtime total cost, batch total cost, savings amount, discount percent applied, cost per request for both modes, a verdict on whether batch is worth it, a human-readable summary, and optional reasons or disclaimers. May also include degraded/source/asOf metadata fields.

## 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": [
      "inputTokens",
      "outputTokens",
      "requests",
      "inputPricePerMTok",
      "outputPricePerMTok"
     ],
     "properties": {
      "requests": {
       "type": "integer",
       "description": "Number of requests, 1 to 1e9"
      },
      "inputTokens": {
       "type": "number",
       "description": "Input tokens per request"
      },
      "outputTokens": {
       "type": "number",
       "description": "Output tokens per request"
      },
      "batchDiscount": {
       "type": "number",
       "description": "Batch discount as a fraction, 0 to 1 (default 0.5 = 50% off)"
      },
      "inputPricePerMTok": {
       "type": "number",
       "description": "Realtime price per million input tokens"
      },
      "outputPricePerMTok": {
       "type": "number",
       "description": "Realtime price per million output tokens"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "asOf": {
       "type": [
        "null",
        "string"
       ]
      },
      "source": {
       "type": [
        "null",
        "string"
       ]
      },
      "reasons": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "string"
       }
      },
      "savings": {
       "type": [
        "null",
        "number"
       ]
      },
      "summary": {
       "type": [
        "null",
        "string"
       ]
      },
      "verdict": {
       "type": [
        "null",
        "string"
       ]
      },
      "degraded": {
       "type": [
        "boolean",
        "null"
       ]
      },
      "requests": {
       "type": [
        "null",
        "number"
       ]
      },
      "batchCost": {
       "type": [
        "null",
        "number"
       ]
      },
      "disclaimer": {
       "type": [
        "null",
        "string"
       ]
      },
      "notChecked": {
  
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/llm-cost-capacity-calc-batch-discount-savings-0daf5a01/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)
