{"uid":"cap_P7x4yXFEV1yT8dNzm3vrC","slug":"delx-commerce-token-budget-split-fa348a5d","name":"Delx Commerce Token Budget Split","description":"Pay-per-result APIs for agents. No signup. Exact price. Verifiable delivery. USDC on Base + Solana via x402.","url":"https://commerce.delx.ai/api/v1/x402/token-budget-split?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"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."}}},"responseSchema":{"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}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.003","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.003/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_KBos1vd2YAKKtElcdFDW3","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.003","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Computes how to split a model's context window into system, input, and output token budgets given total and reserved token counts","exampleAgentPrompt":"I have an 8000-token context window, 500 tokens reserved for the system prompt, and 1000 tokens reserved for output — can you calculate how many tokens I have left for user input and whether that allocation is feasible?","exampleUseCases":[{"title":"LLM pipeline token planning","prompt":"My model has a 16,000-token context window, I'm using 1,200 tokens for the system prompt and need 2,000 reserved for the response — how many tokens do I have left for the user's input?"},{"title":"Feasibility check before inference","prompt":"Before I run this agent, I want to make sure my token reservations are actually feasible: total window is 4096 tokens, system takes 800, and I need 512 for output. Is that going to work and what's left for input?"},{"title":"Dynamic budget allocation in agentic loop","prompt":"In my agentic loop the context window is 32,768 tokens, system instructions are 3,000 tokens, and I always reserve 4,096 tokens for the model's reply — tell me the exact input budget I can pass to the user turn."}],"resultDescription":"Returns a JSON object indicating whether the requested token split is feasible, along with the calculated available_input_tokens, and echoes back total_tokens, system_tokens, and reserved_output_tokens for confirmation. Schema version is included as 'delx/util-token-budget-split/v1'.","failureModes":["Infeasible split (available_input_tokens would be zero or negative): feasible returns false","Missing required fields (total_tokens, system_tokens, reserved_output_tokens): likely 400 or validation error","Payment failure via x402 protocol: 402 Payment Required if USDC payment not attached","Non-numeric token values: schema validation error"],"whenToPreferThis":"Choose this endpoint when an AI agent or pipeline needs a lightweight, deterministic utility to compute safe token budgets before calling an LLM — especially useful in agentic loops where context management is dynamic. Prefer it over manual arithmetic when you need a verifiable, pay-per-use microservice with no signup overhead, paid via USDC on Base or Solana.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-01T00:53:57.911Z","isFirstParty":false,"canonicalSlug":"delx-commerce-token-budget-split-fa348a5d"}