# Token Budget Optimizer

> Token Budget Optimizer is a paid API for AI agents from token-budget-optimizer.johntaylor1online.workers.dev, paid per call via x402, $0.1/call, status unknown (last checked 2026-10-11).

Optimizes token budget allocation for AI/LLM tasks via a POST endpoint

## Facts

- Endpoint: POST https://token-budget-optimizer.johntaylor1online.workers.dev/optimize?utm_source=zero.xyz
- Price: $0.1/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-11
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/token-budget-optimizer-13ce7f54
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_GIFOOBS2A_CTqJcImm7L1

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 token-budget-optimizer-13ce7f54 -d '<json body>'
```

Example prompt: Can you optimize my token budget for this AI pipeline? I need the most efficient token allocation to keep quality high while cutting costs.

## When to prefer this

Choose this endpoint when you need to programmatically compute or recommend token budget allocations for LLM tasks, agents, or pipelines, and want a dedicated optimization service rather than manually tuning limits. Particularly useful for cost-sensitive AI workflows where token efficiency matters.

## Known failure modes

- Missing required 'input' or 'output' fields returns a validation error
- Invalid HTTP method (non-POST) returns 405
- Malformed JSON body returns 400
- Payment not provided or insufficient USDC balance returns 402
- Ambiguous or under-specified optimization constraints may return a low-confidence or generic recommendation

## How this service works

Token Budget Optimizer

## Output

Returns an optimized token budget recommendation or allocation, likely including suggested token limits, distribution breakdowns, or cost-efficiency metrics for the given AI task or pipeline configuration.

## Request schema (JSON Schema)

```json
{
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input",
  "output"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "body": {},
     "enum": [
      "POST"
     ],
     "type": "string",
     "bodyType": "json"
    }
   },
   "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/token-budget-optimizer-13ce7f54/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from token-budget-optimizer.johntaylor1online.workers.dev](https://www.zero.xyz/host/token-budget-optimizer.johntaylor1online.workers.dev/llms.txt)
