{
  "x402Version": 2,
  "id": 29201,
  "slug": "29201",
  "resource": "https://api.agentstools.dev/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.",
  "type": "http",
  "serviceName": "model-route",
  "resourceType": "AI Inference",
  "accepts": [
    {
      "scheme": "exact",
      "network": "eip155:8453",
      "payTo": "0xF22e558a00D91Ee12A1F50C52186FecB8dDFf493",
      "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
      "amount": "20000",
      "amountUsd": 0.02,
      "maxTimeoutSeconds": 300
    }
  ],
  "outputSchema": {
    "properties": {
      "example": {
        "type": "object"
      },
      "type": {
        "type": "string"
      }
    },
    "required": [
      "type"
    ],
    "type": "object"
  },
  "extensions": {
    "bazaar": {
      "info": {
        "input": {
          "method": "GET",
          "queryParams": {
            "max_output_price": 10,
            "min_context": 200000,
            "needs_tools": true,
            "task": "coding"
          },
          "type": "http"
        },
        "output": {
          "example": {
            "attribution": [
              "LiteLLM (BerriAI) — MIT",
              "models.dev — MIT",
              "Aider — Apache-2.0"
            ],
            "candidate_count": 41,
            "rationale": "Cheapest of 41 models passing [context >= 200,000; tool-use] for task 'coding'.",
            "recommended": {
              "benchmark": {
                "pass_rate": 32.4,
                "source": "aider_polyglot"
              },
              "blended": 1.3,
              "caps": [
                "tools",
                "vision"
              ],
              "citations": [
                {
                  "license": "MIT",
                  "source": "litellm",
                  "source_url": "https://raw.githubusercontent.com/BerriAI/litellm/main/model_prices_and_context_window.json"
                }
              ],
              "context": 1047576,
              "id": "gpt-4.1-mini",
              "price_in": 0.4,
              "price_out": 1.6,
              "provider": "openai"
            },
            "sources_used": [
              "litellm",
              "modelsdev",
              "aider_polyglot",
              "aider_edit"
            ],
            "task": "coding"
          },
          "type": "json"
        }
      },
      "schema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "properties": {
          "input": {
            "additionalProperties": false,
            "properties": {
              "method": {
                "enum": [
                  "GET",
                  "HEAD",
                  "DELETE"
                ],
                "type": "string"
              },
              "queryParams": {
                "properties": {
                  "max_input_price": {
                    "description": "Maximum input price in USD per million tokens.",
                    "minimum": 0,
                    "type": "number"
                  },
                  "max_output_price": {
                    "description": "Maximum output price in USD per million tokens.",
                    "minimum": 0,
                    "type": "number"
                  },
                  "min_benchmark": {
                    "description": "Minimum Aider coding pass rate percent.",
                    "maximum": 100,
                    "minimum": 0,
                    "type": "number"
                  },
                  "min_context": {
                    "description": "Minimum context window in tokens.",
                    "minimum": 0,
                    "type": "integer"
                  },
                  "needs_reasoning": {
                    "description": "Require extended reasoning support.",
                    "type": "boolean"
                  },
                  "needs_tools": {
                    "description": "Require function or tool calling support.",
                    "type": "boolean"
                  },
                  "needs_vision": {
                    "description": "Require image or vision input support.",
                    "type": "boolean"
                  },
                  "provider": {
                    "description": "Optional provider filter such as anthropic or openai.",
                    "type": "string"
                  },
                  "task": {
                    "description": "The workload class to route for. Each class implies required capabilities and a sensible context floor that your explicit constraints override.",
                    "enum": [
                      "coding",
                      "reasoning",
                      "vision",
                      "tool-use",
                      "long-context",
                      "cheap-chat",
                      "general"
                    ],
                    "type": "string"
                  }
                },
                "required": [
                  "task"
                ],
                "type": "object"
              },
              "type": {
                "const": "http",
                "type": "string"
              }
            },
            "required": [
              "type",
              "method"
            ],
            "type": "object"
          },
          "output": {
            "properties": {
              "example": {
                "type": "object"
              },
              "type": {
                "type": "string"
              }
            },
            "required": [
              "type"
            ],
            "type": "object"
          }
        },
        "required": [
          "input"
        ],
        "type": "object"
      }
    }
  },
  "tags": [
    "llm",
    "model-routing",
    "model-selection",
    "pricing",
    "benchmark",
    "bazaar"
  ],
  "sourceHost": "api.agentstools.dev",
  "lastUpdated": "2026-10-13T07:58:58.089Z",
  "quality": {
    "calls30d": 3,
    "uniquePayers30d": 3,
    "lastCalledAt": "2026-10-13T07:58:57.594Z"
  },
  "metadata": {
    "serviceName": "model-route",
    "extensions": {
      "bazaar": {
        "info": {
          "input": {
            "method": "GET",
            "queryParams": {
              "max_output_price": 10,
              "min_context": 200000,
              "needs_tools": true,
              "task": "coding"
            },
            "type": "http"
          },
          "output": {
            "example": {
              "attribution": [
                "LiteLLM (BerriAI) — MIT",
                "models.dev — MIT",
                "Aider — Apache-2.0"
              ],
              "candidate_count": 41,
              "rationale": "Cheapest of 41 models passing [context >= 200,000; tool-use] for task 'coding'.",
              "recommended": {
                "benchmark": {
                  "pass_rate": 32.4,
                  "source": "aider_polyglot"
                },
                "blended": 1.3,
                "caps": [
                  "tools",
                  "vision"
                ],
                "citations": [
                  {
                    "license": "MIT",
                    "source": "litellm",
                    "source_url": "https://raw.githubusercontent.com/BerriAI/litellm/main/model_prices_and_context_window.json"
                  }
                ],
                "context": 1047576,
                "id": "gpt-4.1-mini",
                "price_in": 0.4,
                "price_out": 1.6,
                "provider": "openai"
              },
              "sources_used": [
                "litellm",
                "modelsdev",
                "aider_polyglot",
                "aider_edit"
              ],
              "task": "coding"
            },
            "type": "json"
          }
        },
        "schema": {
          "$schema": "https://json-schema.org/draft/2020-12/schema",
          "properties": {
            "input": {
              "additionalProperties": false,
              "properties": {
                "method": {
                  "enum": [
                    "GET",
                    "HEAD",
                    "DELETE"
                  ],
                  "type": "string"
                },
                "queryParams": {
                  "properties": {
                    "max_input_price": {
                      "description": "Maximum input price in USD per million tokens.",
                      "minimum": 0,
                      "type": "number"
                    },
                    "max_output_price": {
                      "description": "Maximum output price in USD per million tokens.",
                      "minimum": 0,
                      "type": "number"
                    },
                    "min_benchmark": {
                      "description": "Minimum Aider coding pass rate percent.",
                      "maximum": 100,
                      "minimum": 0,
                      "type": "number"
                    },
                    "min_context": {
                      "description": "Minimum context window in tokens.",
                      "minimum": 0,
                      "type": "integer"
                    },
                    "needs_reasoning": {
                      "description": "Require extended reasoning support.",
                      "type": "boolean"
                    },
                    "needs_tools": {
                      "description": "Require function or tool calling support.",
                      "type": "boolean"
                    },
                    "needs_vision": {
                      "description": "Require image or vision input support.",
                      "type": "boolean"
                    },
                    "provider": {
                      "description": "Optional provider filter such as anthropic or openai.",
                      "type": "string"
                    },
                    "task": {
                      "description": "The workload class to route for. Each class implies required capabilities and a sensible context floor that your explicit constraints override.",
                      "enum": [
                        "coding",
                        "reasoning",
                        "vision",
                        "tool-use",
                        "long-context",
                        "cheap-chat",
                        "general"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "task"
                  ],
                  "type": "object"
                },
                "type": {
                  "const": "http",
                  "type": "string"
                }
              },
              "required": [
                "type",
                "method"
              ],
              "type": "object"
            },
            "output": {
              "properties": {
                "example": {
                  "type": "object"
                },
                "type": {
                  "type": "string"
                }
              },
              "required": [
                "type"
              ],
              "type": "object"
            }
          },
          "required": [
            "input"
          ],
          "type": "object"
        }
      }
    }
  },
  "liveness": {
    "reliability": null
  },
  "verified": false,
  "featured": false,
  "provider": {
    "host": "api.agentstools.dev",
    "manifest_name": "api.agentstools.dev",
    "source": "cdp-mirror",
    "source_manifest_url": "https://api.cdp.coinbase.com/platform/v2/x402/discovery/resources",
    "submitted_at": "2026-10-14T01:15:01.050Z"
  },
  "exampleResponse": {
    "example": {},
    "type": "string"
  }
}