{"uid":"cap_j-7GLEuHmMqzEbbpnaWRc","slug":"model-route-b47ab151","name":"model-route","description":"Pick the cheapest LLM that passes your task and constraints. Give a task class and optional constraints such as minimum context, required tool-use, vision or reasoning, maximum input and output price per million tokens, a minimum coding benchmark and a provider filter, and get a ranked cheapest-first list of models that pass, plus a recommended pick and a deterministic rationale. Fused from open keyless catalogs LiteLLM, models dev and Aider with a citation on every model.","url":"https://payai.agentstools.dev/model/route?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","required":["task"],"properties":{"task":{"enum":["coding","reasoning","vision","tool-use","long-context","cheap-chat","general"],"type":"string","description":"The workload class to route for. Each class implies required capabilities and a sensible context floor that your explicit constraints override."},"provider":{"type":"string","description":"Optional provider filter such as anthropic or openai."},"min_context":{"type":"integer","minimum":0,"description":"Minimum context window in tokens."},"needs_tools":{"type":"boolean","description":"Require function or tool calling support."},"needs_vision":{"type":"boolean","description":"Require image or vision input support."},"min_benchmark":{"type":"number","maximum":100,"minimum":0,"description":"Minimum Aider coding pass rate percent."},"max_input_price":{"type":"number","minimum":0,"description":"Maximum input price in USD per million tokens."},"needs_reasoning":{"type":"boolean","description":"Require extended reasoning support."},"max_output_price":{"type":"number","minimum":0,"description":"Maximum output price in USD per million tokens."}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.02","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.02/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_Bk69QkNCQ_Kib00Ugk-4E","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.02","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns a ranked cheapest-first list of LLMs that satisfy a given task class and optional capability/price constraints, with a recommended pick and deterministic rationale.","exampleAgentPrompt":"Find me the cheapest model that can handle coding tasks, supports tool-use and has at least 32000 tokens of context, with an input price under $2 per million tokens — give me the top picks ranked by cost.","exampleUseCases":[{"title":"Budget coding agent model selection","prompt":"I'm building a coding agent and need the cheapest model that scores at least 50% on the Aider benchmark, supports tool calling, and has at least 64000 tokens of context — what's the best pick?"},{"title":"Vision task on tight budget","prompt":"I need to process images in my pipeline but want to keep costs low — find me the cheapest model that supports vision input and costs no more than $3 per million output tokens."},{"title":"Long-context summarization model routing","prompt":"What's the most affordable LLM that can handle at least 200000 tokens of context for a long-document summarization task? I don't need vision or reasoning, just raw context length at the lowest price."}],"resultDescription":"A JSON object containing a ranked cheapest-first list of matching models (each with pricing, context window, capability flags, benchmark scores, and source citations), a recommended top pick, and a deterministic rationale explaining why that model was chosen.","failureModes":["No models match all constraints — returns empty list or error indicating constraints are too strict","Invalid task class enum value returns 400 validation error","min_benchmark set above 100 or below 0 returns schema validation error","Upstream catalog unavailable causes stale or partial results","Provider filter typo returns empty results silently"],"whenToPreferThis":"Choose this endpoint when you need to programmatically select or route to the cheapest LLM for a given workload class without manually comparing provider pricing pages. It is especially useful for agent orchestration systems that need to dynamically pick models based on cost budgets, capability requirements (tool-use, vision, reasoning), or benchmark thresholds. Prefer it over hardcoding model names when prices change frequently or when you want to avoid vendor lock-in.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-12T12:50:21.062Z","isFirstParty":false,"canonicalSlug":"model-route-b47ab151"}