{"name":"model-selection-brief","description":"Model selection / route and cost brief / which model / prompt cost in one call: describe a task and get a recommended model tier, candidate models, and, when you pass a sample prompt, its token count, a projected cost across those candidates, and a compressed version of the prompt. Composite: one call runs model-route-recommend + llm-cost-estimate + token-count + prompt-compress, merged into {route, token_count, cost_estimate, compressed_prompt}. model-route-recommend picks a tier and named models from the task and optional latency/budget/context constraints; token-count and llm-cost-estimate price that exact prompt against the recommended models; prompt-compress shortens the same prompt. Without a sample prompt, only routing runs. Use it as a model selection API, an LLM routing advisor, or a which-model-should-I-call tool.","price":"$0.05","method":"POST","input_schema":{"properties":{"task":{"type":"string","description":"Description of the task the model needs to do, e.g. 'summarize customer support tickets'. Required, max 2000 chars."},"text":{"type":"string","description":"Optional representative prompt or sample input. When provided, it is token-counted, compressed, and priced across the recommended (or supplied) models. Max 60,000 chars."},"constraints":{"type":"object","description":"Optional routing constraints: any of latency, budget, context_length, modality (all strings), e.g. { \"budget\": \"cheap\", \"latency\": \"under 1s\" }."},"models":{"type":"array","items":{"type":"string"},"description":"Optional model names to price instead of the routed candidates, e.g. ['deepseek-v3']. Only used when 'text' is also provided."}},"required":["task"]},"input_example":{"task":"Summarize customer support tickets into a one-line status","text":"Ticket #4821: customer reports checkout button unresponsive on Safari..."},"output_example":{"task":"Summarize customer support tickets into a one-line status","route":{"recommended_tier":"small","candidate_models":["gpt-4o-mini","claude-haiku-4.5"],"reasoning":"Simple summarization does not need a frontier model."},"token_count":{"estimated_tokens":500},"cost_estimate":{"input_tokens":500,"estimates":[{"model":"gpt-4o-mini","total_cost_usd":0.000075}],"cheapest_known":"gpt-4o-mini"},"compressed_prompt":{"compressed":"Ticket #4821: checkout button unresponsive, Safari.","actual_ratio":0.4},"composed_of":["model-route-recommend","llm-cost-estimate","token-count","prompt-compress"],"components":[{"name":"model-route-recommend","ok":true,"ms":1100}],"degraded":false},"x402_payment_required":true,"x402_facilitator":"https://api.cdp.coinbase.com/platform/v2/x402"}