{"openapi":"3.1.0","info":{"title":"LLM Token Price & Latency Router API","description":"Real-time, cost-optimized LLM routing intelligence for autonomous agents and multi-agent orchestrators: live per-token pricing, context lengths and best-value picks across OpenAI, Anthropic, Google, DeepSeek, Meta, Qwen and other providers via OpenRouter. Pay $0.01 USDC per call with Skyfire, x402 v2 or AgentCash.","version":"2.2.0","x-guidance":"Pay $0.01 USDC per call with x402 v2 (USDC on Base), Skyfire (kyapay-token) or AgentCash. GET /v1/router/recommendations returns the full routing report; GET /v1/router/task/{task_type} returns one category. Call without payment to receive the 402 challenge. Details: /llms.txt"},"paths":{"/":{"get":{"tags":["Public"],"summary":"Service information","operationId":"root__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Root  Get"}}}}}}},"/health":{"get":{"tags":["Public"],"summary":"Liveness and cache status","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/pricing":{"get":{"tags":["Public"],"summary":"API pricing and accepted payment methods","operationId":"pricing_v1_pricing_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Pricing V1 Pricing Get"}}}}}}},"/v1/router/recommendations":{"get":{"tags":["Router"],"summary":"Full cost-optimized routing report","operationId":"recommendations_v1_router_recommendations_get","responses":{"200":{"description":"Routing report served from Redis.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LlmRouterReport"}}}},"402":{"description":"Payment required. Pay with Skyfire, x402 v2 or an AgentCash receipt and retry.","headers":{"Payment-Required":{"description":"Base64-encoded x402 v2 PaymentRequired document (identical to the JSON body).","schema":{"type":"string"}}}},"403":{"description":"Invalid or expired Skyfire token."},"404":{"description":"Unknown task_type."},"503":{"description":"Routing feed not ready yet or cache unavailable."}},"security":[{"SkyfireToken":[]},{"X402Payment":[]},{"PaymentReceipt":[]},{}],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.01"},"protocols":[{"x402":{}}]},"x-x402":{"x402Version":2,"scheme":"exact","network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bda02913","amount":"10000","payTo":"0xA0f3bab8f298766610005F2BCcDef6964b40b5e6","priceUsd":"$0.01","headers":{"request":"PAYMENT-SIGNATURE","challenge":"Payment-Required","settlement":"PAYMENT-RESPONSE"},"receiptHeader":"X-402-Payment-Receipt","resource":"https://llm-router.rdxdata.xyz/v1/router/recommendations"},"x-skyfire-token-type":["kya","pay","kya-pay"],"extensions":{"bazaar":{"info":{"input":{"type":"http","method":"GET"},"output":{"type":"json","example":{"status":"ok","generated_at":"2026-11-21T08:00:00Z","model":"rdx-router-engine-v2","total_models_indexed":400,"models_analyzed":30,"latency_models":0,"best_value_picks":{"coding":{"recommended_model_id":"particle-ai/particle-1","provider":"Particle AI","input_cost_1m_usd":0.07,"output_cost_1m_usd":0.5,"estimated_savings_pct":99.2,"routing_rationale":"Agentic coding model priced far below frontier flagships with a 1M-token window."},"reasoning":{"recommended_model_id":"google/gemini-4-carbon","provider":"Google","input_cost_1m_usd":2.0,"output_cost_1m_usd":10.0,"estimated_savings_pct":69.6,"routing_rationale":"Frontier-tier reasoning at a fraction of the top flagship price."},"fast_summarization":{"recommended_model_id":"tencent/hy4-flash","provider":"Tencent","input_cost_1m_usd":0.035,"output_cost_1m_usd":0.1405,"estimated_savings_pct":99.8,"routing_rationale":"Lowest blended token cost in the index with a 1M-token window."},"long_context":{"recommended_model_id":"deepseek/deepseek-v4.1-flash-1017","provider":"DeepSeek","input_cost_1m_usd":0.036,"output_cost_1m_usd":0.5,"estimated_savings_pct":99.2,"routing_rationale":"Cheapest model offering a 1,048,576-token context window."}},"cheapest_models_leaderboard":[{"rank":1,"model_id":"tencent/hy4-flash","name":"Tencent: Hy4 flash","provider":"Tencent","context_length":1048576,"input_cost_1m_usd":0.035,"output_cost_1m_usd":0.1405}]}}},"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"input":{"type":"object","properties":{"type":{"type":"string","const":"http"},"method":{"type":"string","enum":["GET","HEAD","DELETE"]},"queryParams":{"type":"object","additionalProperties":{"type":"string"}},"headers":{"type":"object","additionalProperties":{"type":"string"}}},"required":["type","method"],"additionalProperties":false},"output":{"type":"object","properties":{"type":{"type":"string"},"example":{"type":"object"}},"required":["type"]}},"required":["input"]}}},"description":"Costs $0.01 USDC per call on Base. Pay with x402 v2 (PAYMENT-SIGNATURE), Skyfire (kyapay-token: kya sample, pay/kya-pay charged) or an AgentCash receipt (X-402-Payment-Receipt)."}},"/v1/router/task/{task_type}":{"get":{"tags":["Router"],"summary":"Best-value model for one task category","operationId":"task_recommendation_v1_router_task__task_type__get","parameters":[{"name":"task_type","in":"path","required":true,"schema":{"enum":["coding","reasoning","fast_summarization","long_context"],"type":"string","title":"Task Type"},"example":"coding"}],"responses":{"200":{"description":"Single recommendation served from Redis.","content":{"application/json":{"schema":{}}}},"402":{"description":"Payment required. Pay with Skyfire, x402 v2 or an AgentCash receipt and retry.","headers":{"Payment-Required":{"description":"Base64-encoded x402 v2 PaymentRequired document (identical to the JSON body).","schema":{"type":"string"}}}},"403":{"description":"Invalid or expired Skyfire token."},"404":{"description":"Unknown task_type."},"503":{"description":"Routing feed not ready yet or cache unavailable."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"SkyfireToken":[]},{"X402Payment":[]},{"PaymentReceipt":[]},{}],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.01"},"protocols":[{"x402":{}}]},"x-x402":{"x402Version":2,"scheme":"exact","network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bda02913","amount":"10000","payTo":"0xA0f3bab8f298766610005F2BCcDef6964b40b5e6","priceUsd":"$0.01","headers":{"request":"PAYMENT-SIGNATURE","challenge":"Payment-Required","settlement":"PAYMENT-RESPONSE"},"receiptHeader":"X-402-Payment-Receipt","resource":"https://llm-router.rdxdata.xyz/v1/router/task/{task_type}"},"x-skyfire-token-type":["kya","pay","kya-pay"],"extensions":{"bazaar":{"info":{"input":{"type":"http","method":"GET","pathParams":{"task_type":"coding"}},"output":{"type":"json","example":{"task_type":"coding","status":"ok","generated_at":"2026-11-21T08:00:00Z","model":"rdx-router-engine-v2","total_models_indexed":400,"recommendation":{"recommended_model_id":"particle-ai/particle-1","provider":"Particle AI","input_cost_1m_usd":0.07,"output_cost_1m_usd":0.5,"estimated_savings_pct":99.2,"routing_rationale":"Agentic coding model priced far below frontier flagships with a 1M-token window."}}}},"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"input":{"type":"object","properties":{"type":{"type":"string","const":"http"},"method":{"type":"string","enum":["GET","HEAD","DELETE"]},"queryParams":{"type":"object","additionalProperties":{"type":"string"}},"headers":{"type":"object","additionalProperties":{"type":"string"}},"pathParams":{"type":"object","properties":{"task_type":{"type":"string","enum":["coding","reasoning","fast_summarization","long_context"]}},"required":["task_type"],"additionalProperties":false}},"required":["type","method","pathParams"],"additionalProperties":false},"output":{"type":"object","properties":{"type":{"type":"string"},"example":{"type":"object"}},"required":["type"]}},"required":["input"]},"routeTemplate":"/v1/router/task/:task_type"}},"description":"Costs $0.01 USDC per call on Base. Pay with x402 v2 (PAYMENT-SIGNATURE), Skyfire (kyapay-token: kya sample, pay/kya-pay charged) or an AgentCash receipt (X-402-Payment-Receipt)."}}},"components":{"schemas":{"BestValuePick":{"properties":{"recommended_model_id":{"type":"string","minLength":3,"title":"Recommended Model Id"},"provider":{"type":"string","minLength":1,"title":"Provider"},"input_cost_1m_usd":{"type":"number","minimum":0.0,"title":"Input Cost 1M Usd"},"output_cost_1m_usd":{"type":"number","minimum":0.0,"title":"Output Cost 1M Usd"},"estimated_savings_pct":{"type":"number","maximum":100.0,"minimum":0.0,"title":"Estimated Savings Pct"},"routing_rationale":{"type":"string","maxLength":320,"minLength":10,"title":"Routing Rationale"},"context_length":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Context Length"},"intelligence_index":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Intelligence Index"},"coding_index":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Coding Index"},"code_elo":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Code Elo"},"latency_p50_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Latency P50 Seconds"},"throughput_p50_tps":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Throughput P50 Tps"},"uptime_30m_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Uptime 30M Pct"},"price_notes":{"items":{"type":"string"},"type":"array","title":"Price Notes"}},"type":"object","required":["recommended_model_id","provider","input_cost_1m_usd","output_cost_1m_usd","estimated_savings_pct","routing_rationale"],"title":"BestValuePick"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"LeaderboardEntry":{"properties":{"rank":{"type":"integer","minimum":1.0,"title":"Rank"},"model_id":{"type":"string","minLength":3,"title":"Model Id"},"name":{"type":"string","minLength":1,"title":"Name"},"provider":{"type":"string","minLength":1,"title":"Provider"},"context_length":{"type":"integer","minimum":0.0,"title":"Context Length"},"input_cost_1m_usd":{"type":"number","minimum":0.0,"title":"Input Cost 1M Usd"},"output_cost_1m_usd":{"type":"number","minimum":0.0,"title":"Output Cost 1M Usd"},"intelligence_index":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Intelligence Index"},"coding_index":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Coding Index"},"code_elo":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Code Elo"},"latency_p50_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Latency P50 Seconds"},"throughput_p50_tps":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Throughput P50 Tps"},"uptime_30m_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Uptime 30M Pct"},"price_notes":{"items":{"type":"string"},"type":"array","title":"Price Notes"}},"type":"object","required":["rank","model_id","name","provider","context_length","input_cost_1m_usd","output_cost_1m_usd"],"title":"LeaderboardEntry"},"LlmRouterReport":{"properties":{"status":{"type":"string","title":"Status"},"generated_at":{"type":"string","title":"Generated At"},"model":{"type":"string","title":"Model"},"analysis_model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Analysis Model"},"total_models_indexed":{"type":"integer","minimum":0.0,"title":"Total Models Indexed"},"models_analyzed":{"type":"integer","minimum":0.0,"title":"Models Analyzed","default":0},"latency_models":{"type":"integer","minimum":0.0,"title":"Latency Models","default":0},"status_detail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status Detail"},"best_value_picks":{"additionalProperties":{"$ref":"#/components/schemas/BestValuePick"},"propertyNames":{"enum":["coding","reasoning","fast_summarization","long_context"]},"type":"object","title":"Best Value Picks"},"cheapest_models_leaderboard":{"items":{"$ref":"#/components/schemas/LeaderboardEntry"},"type":"array","maxItems":10,"minItems":10,"title":"Cheapest Models Leaderboard"}},"type":"object","required":["status","generated_at","model","total_models_indexed","best_value_picks","cheapest_models_leaderboard"],"title":"LlmRouterReport","description":"The report served by the commercial endpoints and cached in Redis."},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}},"securitySchemes":{"SkyfireToken":{"type":"apiKey","in":"header","name":"kyapay-token","description":"Skyfire KYAPay JWT. `kya` tokens return a free 2-category sample; `pay` and `kya-pay` tokens are charged $0.01 per call and return live data.","x-skyfire-token-type":["kya","pay","kya-pay"]},"X402Payment":{"type":"apiKey","in":"header","name":"PAYMENT-SIGNATURE","description":"Base64-encoded x402 v2 payment payload (exact scheme, USDC on Base, EIP-3009 authorization). Call without it to receive the 402 challenge in the Payment-Required header."},"PaymentReceipt":{"type":"apiKey","in":"header","name":"X-402-Payment-Receipt","description":"AgentCash receipt: <base64url payload>.<hex HMAC-SHA256>. Single use."}}},"servers":[{"url":"https://llm-router.rdxdata.xyz"}],"x-skyfire-token-type":["kya","pay","kya-pay"],"x-x402":{"x402Version":2,"scheme":"exact","network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bda02913","amount":"10000","payTo":"0xA0f3bab8f298766610005F2BCcDef6964b40b5e6","priceUsd":"$0.01","headers":{"request":"PAYMENT-SIGNATURE","challenge":"Payment-Required","settlement":"PAYMENT-RESPONSE"},"receiptHeader":"X-402-Payment-Receipt"},"extensions":{"bazaar":{"info":{"input":{"type":"http","method":"GET"},"output":{"type":"json","example":{"status":"ok","generated_at":"2026-11-21T08:00:00Z","model":"rdx-router-engine-v2","total_models_indexed":400,"models_analyzed":30,"latency_models":0,"best_value_picks":{"coding":{"recommended_model_id":"particle-ai/particle-1","provider":"Particle AI","input_cost_1m_usd":0.07,"output_cost_1m_usd":0.5,"estimated_savings_pct":99.2,"routing_rationale":"Agentic coding model priced far below frontier flagships with a 1M-token window."},"reasoning":{"recommended_model_id":"google/gemini-4-carbon","provider":"Google","input_cost_1m_usd":2.0,"output_cost_1m_usd":10.0,"estimated_savings_pct":69.6,"routing_rationale":"Frontier-tier reasoning at a fraction of the top flagship price."},"fast_summarization":{"recommended_model_id":"tencent/hy4-flash","provider":"Tencent","input_cost_1m_usd":0.035,"output_cost_1m_usd":0.1405,"estimated_savings_pct":99.8,"routing_rationale":"Lowest blended token cost in the index with a 1M-token window."},"long_context":{"recommended_model_id":"deepseek/deepseek-v4.1-flash-1017","provider":"DeepSeek","input_cost_1m_usd":0.036,"output_cost_1m_usd":0.5,"estimated_savings_pct":99.2,"routing_rationale":"Cheapest model offering a 1,048,576-token context window."}},"cheapest_models_leaderboard":[{"rank":1,"model_id":"tencent/hy4-flash","name":"Tencent: Hy4 flash","provider":"Tencent","context_length":1048576,"input_cost_1m_usd":0.035,"output_cost_1m_usd":0.1405}]}}},"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"input":{"type":"object","properties":{"type":{"type":"string","const":"http"},"method":{"type":"string","enum":["GET","HEAD","DELETE"]},"queryParams":{"type":"object","additionalProperties":{"type":"string"}},"headers":{"type":"object","additionalProperties":{"type":"string"}}},"required":["type","method"],"additionalProperties":false},"output":{"type":"object","properties":{"type":{"type":"string"},"example":{"type":"object"}},"required":["type"]}},"required":["input"]}}},"x-agentcash-guidance":{"llmsTxtUrl":"https://llm-router.rdxdata.xyz/llms.txt"}}