# tokenplans.dev Cost Rules

> tokenplans.dev Cost Rules is a paid API for AI agents from api.tokenplans.dev, paid per call via x402, $0.1/call, status unknown (last checked 2026-09-13).

Returns per-provider JSON cost rules (per-token USD rates, credit budgets, per-model rates, weekly/monthly caps, and confidence levels) for computing requests-per-dollar across AI coding subscription plans.

## Facts

- Endpoint: GET https://api.tokenplans.dev/cost-rules
- Price: $0.1/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/tokenplans-dev-cost-rules-e90f5103
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_3_s8WoMc1k8EBDlfJUe2z

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 tokenplans-dev-cost-rules-e90f5103
```

Example prompt: Pull the cost rules for all AI coding providers so I can see per-token USD rates, credit budgets, and weekly limits — I want to figure out which plan gives the most requests per dollar.

## When to prefer this

Use this endpoint when you need structured, machine-readable pricing rules specifically for computing cost efficiency (requests-per-dollar) across AI coding subscription plans. It is purpose-built as a calculator input dataset, unlike the sibling changelog endpoint (which tracks value changes over time) or the full catalog endpoint (which provides broader plan metadata). Prefer this when you need confidence-level annotations and normalized rate structures ready for programmatic cost computation.

## Known failure modes

- Payment not received or insufficient USDC — returns 402 Payment Required
- API unavailable or maintenance — returns 5xx server error
- Stale data if cost rules haven't been updated to reflect recent provider price changes
- Empty or partial response if provider data is incomplete in the catalog

## How this service works

Per-provider JSON cost rules for computing requests-per-dollar on AI coding plans: per-token USD rates or credit budgets with per-model rates, 5h/weekly credit limits, monthly per-model caps, and confidence levels (exact/proxy). The input dataset for a subscription cost calculator.

## Output

A JSON object containing per-provider cost rules for AI coding plans, including per-token USD rates or credit budgets with per-model breakdowns, 5-hour/weekly credit limits, monthly per-model caps, and confidence levels (exact or proxy) indicating data accuracy. This serves as the authoritative input dataset for building a subscription cost calculator.

## 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",
     "properties": {}
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/tokenplans-dev-cost-rules-e90f5103/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.tokenplans.dev](https://www.zero.xyz/host/api.tokenplans.dev/llms.txt)
