{"slug":"denk-halowerk-com-v1-token-budget-trim-d52dbf","title":"Cut a document down to a token budget by dropping the lowest-priority sections f","host":"denk.halowerk.com","method":"POST","resource":"https://denk.halowerk.com/v1/token-budget-trim","category":"market","description":"Cut a document down to a token budget by dropping the lowest-priority sections first and truncating the last one at a sentence boundary; exact count of the result. Accepts explicit sections with priorities (or Markdown that is split at headings, with optional priorities by heading text). Required se","price_listed":0.002,"price_asked":0.002,"state":"answering","state_label":"Answering","checks_7d":7,"answered_7d":7,"latency_ms_median":894,"reported_calls_30d":1,"reported_payers_30d":1,"networks":["eip155:8453"],"badge":"unverified","paid_checks_7d":0,"paid_ok_7d":0,"example_input":{"body":{"budget_tokens":12,"sections":[{"id":"a","priority":90,"text":"Keep this sentence."},{"id":"b","priority":10,"text":"Drop this one first. It is less important."}]},"bodyType":"json","method":"POST","type":"http"},"output_schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"input":{"additionalProperties":false,"properties":{"body":{"additionalProperties":false,"properties":{"budget_tokens":{"maximum":2000000,"minimum":1,"type":"integer"},"markdown":{"maxLength":400000,"minLength":1,"type":"string"},"priorities":{"additionalProperties":{"maximum":100,"minimum":0,"type":"integer"},"type":"object"},"required_headings":{"items":{"type":"string"},"maxItems":100,"type":"array"},"sections":{"items":{"additionalProperties":false,"properties":{"id":{"maxLength":64,"type":"string"},"priority":{"default":50,"maximum":100,"minimum":0,"type":"integer"},"required":{"default":false,"type":"boolean"},"text":{"maxLength":200000,"minLength":1,"type":"string"},"title":{"maxLength":300,"type":"string"}},"required":["text"],"type":"object"},"maxItems":200,"minItems":1,"type":"array"},"separator":{"default":"\n\n","maxLength":20,"type":"string"},"tokenizer":{"default":"o200k_base","enum":["o200k_base","cl100k_base","p50k_base","r50k_base","qwen2.5","deepseek-v3","mistral-tekken","falcon","gpt-neox","yi-1.5","granite-3.3","glm-4.5"],"type":"string"},"truncate":{"default":"sentence","enum":["sentence","none"],"type":"string"}},"required":["budget_tokens"],"type":"object"},"bodyType":{"enum":["json","form-data","text"],"type":"string"},"method":{"enum":["POST","PUT","PATCH"],"type":"string"},"type":{"const":"http","type":"string"}},"required":["type","method","bodyType","body"],"type":"object"},"output":{"properties":{"example":{"type":"object"},"type":{"type":"string"}},"required":["type"],"type":"object"}},"required":["input"],"type":"object"},"history":[{"day":"2026-11-27","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.002,"price_match":true,"latency_ms":927,"error":null},{"day":"2026-11-26","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.002,"price_match":true,"latency_ms":887,"error":null},{"day":"2026-11-25","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.002,"price_match":true,"latency_ms":901,"error":null},{"day":"2026-11-24","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.002,"price_match":true,"latency_ms":906,"error":null},{"day":"2026-11-23","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.002,"price_match":true,"latency_ms":869,"error":null},{"day":"2026-11-22","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.002,"price_match":true,"latency_ms":894,"error":null},{"day":"2026-11-21","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.002,"price_match":true,"latency_ms":882,"error":null},{"day":"2026-11-20","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.002,"price_match":true,"latency_ms":878,"error":null}],"description_full":"Cut a document down to a token budget by dropping the lowest-priority sections first and truncating the last one at a sentence boundary; exact count of the result. Accepts explicit sections with priorities (or Markdown that is split at headings, with optional priorities by heading text). Required sections are never dropped.","last_updated":"2026-11-20T15:07:11.947Z","schemes":["exact"]}