{"slug":"1gateway-dev-v1-ai-llm-prices-3d13cc","title":"Use when an agent must price an LLM call or pick the cheapest model","host":"1gateway.dev","method":"GET","resource":"https://1gateway.dev/v1/ai/llm-prices","category":"market","description":"Use when an agent must price an LLM call or pick the cheapest model. Input: model (up to 5, comma list) plus optional input_tokens, output_tokens, requests; or no model plus mode, provider, min_context, capabilities (vision, function_calling...). Output: JSON USD per 1M input/output tokens, cached/b","price_listed":0.004,"price_asked":0.004,"state":"answering","state_label":"Answering","checks_7d":1,"answered_7d":1,"latency_ms_median":479,"reported_calls_30d":2,"reported_payers_30d":2,"networks":["eip155:8453"],"badge":"unverified","paid_checks_7d":0,"paid_ok_7d":0,"example_input":{"method":"GET","queryParams":{"capabilities":"vision","include_deprecated":"false","input_tokens":12000,"limit":5,"min_context":100000,"mode":"chat","model":"gpt-4o","output_tokens":800,"provider":"openai","requests":1000},"type":"http"},"output_schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"input":{"additionalProperties":false,"properties":{"method":{"enum":["GET"],"type":"string"},"queryParams":{"additionalProperties":false,"properties":{"capabilities":{"description":"Comma-separated required capabilities: vision, function_calling, reasoning, prompt_caching, response_schema, pdf_input, audio_input, audio_output, web_search, computer_use, video_input","examples":["vision"],"maxLength":200,"type":"string"},"include_deprecated":{"description":"Include models past their deprecation date in the cheapest search (default false)","enum":["true","false"],"examples":["false"],"type":"string"},"input_tokens":{"description":"Input (prompt) tokens per request, for the cost estimate and ranking","examples":[12000],"maximum":100000000,"minimum":0,"type":"integer"},"limit":{"description":"Max rows per model or in the ranking (default 10)","examples":[5],"maximum":25,"minimum":1,"type":"integer"},"min_context":{"description":"Minimum context window (max input tokens)","examples":[100000],"maximum":100000000,"minimum":1,"type":"integer"},"mode":{"description":"Model type for the cheapest search (default chat; chat includes responses-API models). Ignored when model is given","enum":["chat","embedding","completion","rerank","image_generation","audio_transcription","audio_speech","realtime","moderation"],"examples":["chat"],"type":"string"},"model":{"description":"Model name(s), up to 5 comma-separated (gpt-4o, claude-sonnet-4-5, gemini/gemini-2.5-flash). Also lists the same model at other providers. Omit to rank the cheapest models. Unknown → 400 with suggestions (not charged)","examples":["gpt-4o"],"maxLength":400,"type":"string"},"output_tokens":{"description":"Output (completion) tokens per request","examples":[800],"maximum":100000000,"minimum":0,"type":"integer"},"provider":{"description":"LiteLLM provider id filter: openai, anthropic, gemini, vertex_ai, bedrock, azure, groq, deepseek, mistral...","examples":["openai"],"pattern":"^[A-Za-z0-9_.-]{1,40}$","type":"string"},"requests":{"description":"Number of requests to multiply the estimate by (default 1)","examples":[1000],"maximum":1000000000,"minimum":1,"type":"integer"}},"required":[],"type":"object"},"type":{"const":"http","type":"string"}},"required":["type","method"],"type":"object"},"output":{"properties":{"example":{"properties":{"as_of":{"type":"string"},"attribution":{"type":"string"},"kind":{"type":"string"},"matched_total":{"type":"integer"},"models":{"items":{"properties":{"batch_input_per_1m_usd":{"type":["number","null"]},"batch_output_per_1m_usd":{"type":["number","null"]},"cached_input_per_1m_usd":{"type":["number","null"]},"capabilities":{"items":{"type":"string"},"type":"array"},"context_window":{"type":["integer","null"]},"deprecated":{"type":"boolean"},"deprecation_date":{"type":["string","null"]},"estimate":{"properties":{"cost_per_request_usd":{"type":"number"},"input_cost_usd":{"type":"number"},"input_tokens":{"type":"integer"},"long_context_tier_applied":{"type":"boolean"},"output_cost_usd":{"type":"number"},"output_tokens":{"type":"integer"},"requests":{"type":"integer"},"total_cost_usd":{"type":"number"}},"type":["object","null"]},"input_per_1m_usd":{"type":["number","null"]},"long_context_tier":{"properties":{"above_input_tokens":{"type":"integer"},"input_per_1m_usd":{"type":["number","null"]},"output_per_1m_usd":{"type":["number","null"]}},"type":["object","null"]},"max_output_tokens":{"type":["integer","null"]},"mode":{"type":"string"},"model":{"type":"string"},"output_per_1m_usd":{"type":["number","null"]},"provider":{"type":"string"}},"type":"object"},"type":"array"},"query":{"properties":{"capabilities":{"items":{"type":"string"},"type":"array"},"include_deprecated":{"type":"boolean"},"input_tokens":{"type":["integer","null"]},"limit":{"type":"integer"},"min_context":{"type":["integer","null"]},"mode":{"type":"string"},"model":{"items":{"type":"string"},"type":["array","null"]},"output_tokens":{"type":["integer","null"]},"provider":{"type":["string","null"]},"requests":{"type":"integer"}},"type":"object"},"ranking":{"type":"string"},"results":{"items":{"properties":{"exact_match":{"type":"boolean"},"listings":{"items":{"properties":{"batch_input_per_1m_usd":{"type":["number","null"]},"batch_output_per_1m_usd":{"type":["number","null"]},"cached_input_per_1m_usd":{"type":["number","null"]},"capabilities":{"items":{"type":"string"},"type":"array"},"context_window":{"type":["integer","null"]},"deprecated":{"type":"boolean"},"deprecation_date":{"type":["string","null"]},"estimate":{"properties":{"cost_per_request_usd":{"type":"number"},"input_cost_usd":{"type":"number"},"input_tokens":{"type":"integer"},"long_context_tier_applied":{"type":"boolean"},"output_cost_usd":{"type":"number"},"output_tokens":{"type":"integer"},"requests":{"type":"integer"},"total_cost_usd":{"type":"number"}},"type":["object","null"]},"input_per_1m_usd":{"type":["number","null"]},"long_context_tier":{"properties":{"above_input_tokens":{"type":"integer"},"input_per_1m_usd":{"type":["number","null"]},"output_per_1m_usd":{"type":["number","null"]}},"type":["object","null"]},"max_output_tokens":{"type":["integer","null"]},"mode":{"type":"string"},"model":{"type":"string"},"output_per_1m_usd":{"type":["number","null"]},"provider":{"type":"string"}},"type":"object"},"type":"array"},"listings_total":{"type":"integer"},"query":{"type":"string"}},"type":"object"},"type":"array"},"source":{"properties":{"commit":{"type":"string"},"committed_at":{"type":"string"},"license":{"type":"string"},"models_in_table":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"}},"required":["as_of","source","kind","query","attribution"],"type":"object"},"type":{"type":"string"}},"required":["type"],"type":"object"}},"required":["input"],"type":"object"},"history":[{"day":"2026-10-18","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.004,"price_match":true,"latency_ms":479,"error":null}],"description_full":"Use when an agent must price an LLM call or pick the cheapest model. Input: model (up to 5, comma list) plus optional input_tokens, output_tokens, requests; or no model plus mode, provider, min_context, capabilities (vision, function_calling...). Output: JSON USD per 1M input/output tokens, cached/batch prices, context window, provider, capabilities, cost estimate or cheapest ranking, as_of + source commit. Example: ?model=gpt-4o&input_tokens=12000&output_tokens=800","last_updated":"2026-10-18T09:12:30.822Z","schemes":["exact"]}