# Delx Token Budget Split

> Delx Token Budget Split is a paid API for AI agents from api.delx.ai, paid per call via x402, $0.003/call, status unknown (last checked 2026-09-13).

Splits a model's total context window token budget into system-reserved, output-reserved, and available input token counts

## Facts

- Endpoint: POST https://api.delx.ai/api/v1/x402/token-budget-split
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/delx-token-budget-split-40437360
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_oTh4T6DoQbm4oi2faKghe

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 delx-token-budget-split-40437360 -d '<json body>'
```

Example prompt: Split a 128,000-token context window for me — I've reserved 2,000 tokens for the system prompt and 4,096 tokens for model output; how many tokens are left for user input?

## When to prefer this

Use this endpoint when you need a fast, deterministic, zero-dependency computation to partition a model's context window into its three standard buckets (system, output reserve, available input). Prefer it over manual math in agent code when you want a machine-readable JSON result that can be passed directly to downstream prompt-construction logic. It is especially useful in SRE/ops agents and prompt-engineering pipelines where consistent token budget accounting is needed across many calls at near-zero cost.

## Known failure modes

- Missing required fields (total_tokens, system_tokens, or reserved_output_tokens) result in a validation error
- If system_tokens plus reserved_output_tokens exceeds total_tokens, the available input tokens will be zero or negative — the API may return an error or a zero/negative value
- Payment failure or insufficient USDC balance via x402 protocol results in a 402 response before computation
- Non-numeric or malformed token values result in schema validation errors

## How this service works

Split a model token budget into system, output reserve, and available input — call when reserving system and output tokens from a context window. Use for SRE/ops math agents buy from broad utility catalogs: SLA, error budget, success rate, and health scores with zero upstream cost. Returns deterministic machine-readable JSON for $0.003 USDC via x402 on Base. Execution is first-party, local-only, stateless, and memory-only with no paid upstream, no input retention, and no claim of live chain tip…

## Output

A deterministic JSON object showing the breakdown of the token budget: the system token allocation, the reserved output token count, and the remaining available input tokens calculated as total minus system minus reserved output.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "total_tokens": {
   "type": "number",
   "description": "Model context window size in tokens."
  },
  "system_tokens": {
   "type": "number",
   "description": "Tokens already reserved for system/instructions."
  },
  "reserved_output_tokens": {
   "type": "number",
   "description": "Tokens reserved for model output."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "schema": "delx/util-token-budget-split/v1",
  "feasible": true,
  "total_tokens": 8000,
  "system_tokens": 500,
  "available_input_tokens": 6500,
  "reserved_output_tokens": 1000
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/delx-token-budget-split-40437360/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.delx.ai](https://www.zero.xyz/host/api.delx.ai/llms.txt)
