{"uid":"cap_CGMOm85hMpEvrZzE6uTpQ","slug":"agent-weather-cheapest-model-selector-2cc676bb","name":"Agent Weather Cheapest Model Selector","description":"Use when an agent needs the lowest listed price among models meeting hard needs (context, price cap, capability), plus a fallback reading. Pre-flight reading: the AI model with the lowest listed price on OpenRouter among those meeting your needs (min_context, max_input_per_1m, max_output_per_1m, ma…","url":"https://api.agentweather.io/v1/decide/cheapest-model?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","queryParams"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","required":[],"properties":{"vendor":{"type":"string","description":"comma list of allowed vendors"},"capability":{"type":"string","description":"comma list: reasoning, coding, vision-input, image-output, audio, free-tier, tools, structured-output"},"min_context":{"type":"string","description":"minimum context length in tokens"},"include_free":{"type":"string","description":"true to allow free tiers"},"exclude_vendor":{"type":"string","description":"comma list of vendors to skip"},"allow_disturbed":{"type":"string","description":"true to allow disturbed vendors"},"max_input_per_1m":{"type":"string","description":"max input USD per 1M tokens"},"max_job_cost_usd":{"type":"string","description":"max USD for 10k in + 1k out tokens"},"max_output_per_1m":{"type":"string","description":"max output USD per 1M tokens"},"exclude_retiring_days":{"type":"string","description":"skip models retiring within N days (default 30)"}},"additionalProperties":false}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","required":["decision","action","summary","pick","fallback","rules"],"properties":{"pick":{},"rules":{},"action":{},"summary":{},"decision":{},"fallback":{}},"additionalProperties":true}}}}},"responseSchema":{"type":"json","example":{"kind":"pre-flight reading: lowest listed price among models meeting your needs","pick":{"id":"openai/gpt-oss-20b","name":"OpenAI: gpt-oss-20b","role":"pick","report":"https://api.agentweather.io/v1/models/report?id=openai/gpt-oss-20b","vendor":"openai","reasons":["lowest standard_job_cost_usd (0.00027) among 185 model(s) that met every filter"],"vendor_status":"operational","context_length":131072,"expiration_date":null,"price_in_usd_per_1m":0.018,"capabilities_matched":["tools"],"price_out_usd_per_1m":0.09,"standard_job_cost_usd":0.00027},"rules":{"selection":"pick = minimum standard_job_cost_usd among models passing every filter (ties: i…","standard_job_cost_usd":"10,000 × pricing.prompt + 1,000 × pricing.completion (USD per token). A fixed r…"},"terms":"https://api.agentweather.io/v1/terms","action":"use_pick_keep_fallback","summary":"openai/gpt-oss-20b at $0.00027 per standard job (10k in + 1k out); fallback inc…","decision":"go","fallback":{"id":"inclusionai/ling-3.0-flash-vl","name":"inclusionAI: Ling 3.0 Flash VL","role":"fallback","report":"https://api.agentweather.io/v1/models/report?id=inclusionai/ling-3.0-flash-vl","vendor":"inclusionai","reasons":["lowest-cost candidate from a different vendor than the pick (inclusionai vs ope…"],"vendor_status":"unknown","context_length":262144,"expiration_date":null,"price_in_usd_per_1m":0.021,"capabilities_matched":["tools"],"price_out_usd_per_1m":0.0616,"vendor_status_reason":"no free JSON status endpoint is mapped for this vendor","standard_job_cost_usd":0.0002716},"issued_at":"2026-10-13T06:36:10.433Z","disclaimer":"Recorded measurements as of issued_at; may be late, incomplete or wrong; not fi…","schema_version":"decide-0.1.0-draft"}},"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_bHE9y3jLsP7og1a2ApF0q","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":"Returns the lowest-priced OpenRouter AI model meeting specified constraints (context length, price caps, capabilities), plus a fallback model recommendation.","exampleAgentPrompt":"Find me the cheapest OpenRouter model that supports at least 32k context, vision input, and tool use, with a max input cost of $2 per 1M tokens and max output cost of $6 per 1M tokens — and give me a fallback option too.","exampleUseCases":[{"title":"Budget-constrained coding agent model selection","prompt":"I need the cheapest model on OpenRouter that supports coding and structured output, has at least 16k context, and won't cost more than $0.50 per 1M input tokens — also skip any models retiring in the next 60 days."},{"title":"Vision pipeline cost optimization","prompt":"What's the lowest-priced vision-capable model on OpenRouter right now that also supports tool calls and has at least 64k context? Show me a fallback too in case the top pick isn't available."},{"title":"Job cost ceiling for batch processing","prompt":"I'm running a batch job that sends about 10k input tokens and 1k output tokens per request — find me the cheapest model where the total job cost stays under $0.05, and give me a fallback model as well."}],"resultDescription":"Returns a structured response containing: the selected cheapest model (pick) meeting all constraints, a fallback model recommendation, a decision summary, the action to take, and the rules applied during filtering. All fields reflect current OpenRouter listed prices.","failureModes":["No models match the combined constraints — returns empty pick with explanation","Invalid capability enum values cause parameter rejection","Vendor name typos result in empty vendor filter matches","Free-tier models excluded by default if include_free not set to true","Model retiring within exclusion window filtered out silently"],"whenToPreferThis":"Use this endpoint when you need to programmatically select the cheapest viable AI model from OpenRouter before making an LLM call, especially when cost is a primary constraint and you need a reliable fallback. Prefer this over manual price-checking when filtering by multiple hard constraints (context window, capabilities, vendor allowlists/blocklists, per-job cost caps) simultaneously.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T18:41:28.525Z","isFirstParty":false,"canonicalSlug":"agent-weather-cheapest-model-selector-2cc676bb"}