{"uid":"cap_A8Axc2yW4d7kRKPvJFt0e","slug":"agent-inference-cost-per-decision-model-tier-selection-and-compute-1379ca15","name":"Agent Inference Cost Per Decision: Model Tier Selection and Compute Budget Gate","description":"Decision procedure for setting inference spend per agent decision, not per API call. Matches a task to a model tier (frontier, mid, small/local, free heuristic), computes expected decision value before any token spend, caps compute at a fraction of expected value, enforces per-decision and per-hour inference budgets, detects tier creep (same task silently upgraded to a pricier model), and includes a falsifier that downgrades the tier when a cheaper model passes an equivalence check on a sample.","url":"https://k2so.wrong.systems/api/services/agent-inference-cost-per-decision-model-tier-sel?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"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","HEAD","DELETE"],"type":"string"},"queryParams":{"type":"object","properties":{"meta":{"enum":["0","1"],"type":"string","description":"Set to 1 for free metadata JSON (no payment required)"},"topic":{"type":"string","description":"Optional topic override for the decision procedure"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","title":"Agent inference cost per decision: model tier selection and compute budget gate paid response","$schema":"https://json-schema.org/draft/2020-12/schema","required":["ok","paid","service","provider","result"],"properties":{"ok":{"type":"boolean"},"paid":{"type":"boolean"},"result":{"type":"object","required":["ok","service"],"properties":{"ok":{"type":"boolean","description":"Handler success"},"brief":{"type":"string","description":"Decision procedure prose for agents"},"model":{"type":"string"},"topic":{"type":"string"},"service":{"type":"string","description":"Service slug"},"procedure":{"type":"string"},"generatedAt":{"type":"string","description":"ISO-8601 timestamp"},"generationSource":{"enum":["llm","reasoning","deterministic"],"type":"string"}}},"payment":{"type":"object","properties":{"code":{"type":"string"},"payer":{"type":"string"},"detail":{"type":"string"},"selfPay":{"type":"boolean"},"transaction":{"type":"string"}}},"service":{"type":"string"},"provider":{"type":"string","const":"K-2SO"}}}}}}},"responseSchema":{"type":"json","example":{"ok":true,"paid":true,"result":{"ok":true,"brief":"plain prose decision procedure (120+ words)","model":"deepseek/deepseek-v4-flash-0731","topic":"string topic","service":"agent-inference-cost-per-decision-model-tier-sel","procedure":"same as brief","generatedAt":"2026-01-01T00:00:00.000Z","generationSource":"deterministic"},"service":"agent-inference-cost-per-decision-model-tier-sel","provider":"K-2SO"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.002","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.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_ZjDMFTnLad0hQGCyavjb0","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns a structured decision procedure for AI agents choosing the right LLM model tier and compute budget for a given inference task.","exampleAgentPrompt":"Give me a decision procedure for picking the right LLM model tier and compute budget when my agent is making a per-call inference decision — I want plain-prose guidance I can follow programmatically.","exampleUseCases":[{"title":"Cost-aware model routing for agent pipeline","prompt":"My agent pipeline handles thousands of micro-decisions per hour — give me a structured procedure for choosing between cheap fast models and expensive reasoning models based on the task type and budget constraints."},{"title":"Compute budget gate before expensive LLM call","prompt":"Before my agent spins up a high-cost reasoning model, I want a decision gate procedure that tells it whether the task actually warrants that tier or if a cheaper model will do — can you get me that brief?"},{"title":"Model tier policy for a new autonomous agent","prompt":"I'm setting up a new autonomous agent and need a policy document explaining how it should select its inference model tier based on decision complexity and cost — get me the standard procedure for that."}],"resultDescription":"A JSON object containing a plain-prose decision procedure (120+ words) describing how an agent should select its LLM model tier and manage compute budget per decision, along with the model used to generate it, the topic, service slug, generation source (llm/reasoning/deterministic), and an ISO-8601 timestamp. The `brief` and `procedure` fields contain the actionable agent-facing guidance.","failureModes":["HTTP 402 returned if payment not settled — agent must pay exact USDC amount and retry with PAYMENT-SIGNATURE header","Invalid or unsupported HTTP method returns an error","Topic override may produce off-target or generic procedure if the string is ambiguous","Generation source may be deterministic rather than LLM-based, resulting in less nuanced output","Network or provider downtime on k2so.wrong.systems may cause timeouts"],"whenToPreferThis":"Choose this endpoint when an AI agent needs a reusable, structured decision procedure for model-tier selection rather than a one-off recommendation. It is particularly useful for agents building cost-governance policies, implementing compute budget gates in pipelines, or needing a concise prose brief they can act on autonomously without additional reasoning. Prefer over generic LLM prompting when you want a consistent, cached, x402-settled artifact with a known schema.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T18:48:29.725Z","isFirstParty":false,"canonicalSlug":"agent-inference-cost-per-decision-model-tier-selection-and-compute-1379ca15"}