{
  "openapi": "3.1.0",
  "info": {
    "title": "Metered API",
    "version": "1.0.0",
    "summary": "Input, output, cached and batch prices per million tokens for about 250 language models on every route that sells them, with dated price history, plus fees for 22 gateways and platforms",
    "description": "Input, output, cached and batch prices per million tokens for about 250 language models on every route that sells them, with dated price history, plus fees for 22 gateways and platforms. Refreshed every morning at 05:00 UTC. Free to read; please cite \"Metered (metered.fru.dev)\" with a link. Responses are cached at the edge; keep to about 60 requests a minute. Guide: https://metered.fru.dev/agents",
    "contact": {
      "name": "fru.dev",
      "url": "https://fru.dev",
      "email": "fru.dev3@gmail.com"
    }
  },
  "externalDocs": {
    "description": "For AI agents",
    "url": "https://metered.fru.dev/agents"
  },
  "servers": [
    {
      "url": "https://metered.fru.dev"
    }
  ],
  "paths": {
    "/api/models": {
      "get": {
        "operationId": "list_models",
        "summary": "Every tracked model with its headline price",
        "description": "Every tracked model with its headline price. Returns models with input, output, cached and batch prices per 1M tokens (USD), context, release date and the route the price comes from.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page, 1 to 200",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 200
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "description": "Items to skip, for the next page",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "models with input, output, cached and batch prices per 1M tokens (USD), context, release date and the route the price comes from",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "note": "List prices from providers' pages on the date shown; your contract may differ. USD per million tokens.",
                  "models": [
                    {
                      "id": "glm-5-3-prime",
                      "name": "GLM 5.3 Prime",
                      "creator": "z-ai",
                      "released": "2026-09-23",
                      "context": 1000000,
                      "input": 2.8,
                      "output": 8.8,
                      "cached_input": 0.56,
                      "batch_input": null,
                      "batch_output": null,
                      "blended_3_to_1": 4.3,
                      "price_route": "list",
                      "routes": 2,
                      "url": "https://metered.fru.dev/models/glm-5-3-prime"
                    },
                    {
                      "id": "qwen3-8-max-prime",
                      "name": "Qwen3.8 Max Prime",
                      "creator": "qwen",
                      "released": "2026-09-23",
                      "context": 1000000,
                      "input": 4,
                      "output": 12,
                      "cached_input": 0.5,
                      "batch_input": null,
                      "batch_output": null,
                      "blended_3_to_1": 6,
                      "price_route": "list",
                      "routes": 1,
                      "url": "https://metered.fru.dev/models/qwen3-8-max-prime"
                    }
                  ],
                  "total": 253,
                  "limit": 3,
                  "offset": 0,
                  "next": "/api/models?limit=3&offset=3"
                }
              }
            }
          }
        }
      }
    },
    "/api/models/{id}": {
      "get": {
        "operationId": "get_model",
        "summary": "One model with the price on every route and its price changes",
        "description": "One model with the price on every route and its price changes. Returns the model, every route (lab, clouds, hosts) with its prices, and dated changes.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Model id, as in /models/<id>",
            "schema": {
              "type": "string"
            },
            "example": "claude-sonnet-5"
          }
        ],
        "responses": {
          "200": {
            "description": "the model, every route (lab, clouds, hosts) with its prices, and dated changes",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "model": {
                    "id": "claude-sonnet-5",
                    "orId": "anthropic/claude-sonnet-5",
                    "name": "Claude Sonnet 5",
                    "creator": "anthropic",
                    "creatorName": "Anthropic",
                    "creatorDomain": "anthropic.com",
                    "releaseDate": "2026-06-30",
                    "context": 1000000,
                    "maxOutput": 128000,
                    "inputMods": [
                      "text",
                      "image"
                    ],
                    "outputMods": [
                      "text"
                    ],
                    "openWeights": false,
                    "reasoning": true,
                    "description": "Sonnet 5 is Anthropic's most capable Sonnet-class model, with frontier performance across coding, agents, and professional work."
                  },
                  "offers": [
                    {
                      "modelId": "claude-sonnet-5",
                      "route": "aws-bedrock/eu-west-1",
                      "providerSlug": "aws-bedrock",
                      "providerName": "AWS Bedrock",
                      "providerDomain": "aws.amazon.com",
                      "input": 2.2,
                      "output": 11,
                      "cacheRead": 0.22,
                      "cacheWrite": 2.75,
                      "batchInput": null,
                      "batchOutput": null,
                      "context": 1000000,
                      "quantization": "",
                      "source": "openrouter"
                    },
                    {
                      "modelId": "claude-sonnet-5",
                      "route": "aws-bedrock/global",
                      "providerSlug": "aws-bedrock",
                      "providerName": "AWS Bedrock",
                      "providerDomain": "aws.amazon.com",
                      "input": 2,
                      "output": 10,
                      "cacheRead": 0.2,
                      "cacheWrite": 2.5,
                      "batchInput": null,
                      "batchOutput": null,
                      "context": 1000000,
                      "quantization": "",
                      "source": "openrouter"
                    }
                  ],
                  "changes": []
                }
              }
            }
          },
          "404": {
            "description": "Not found"
          }
        }
      }
    },
    "/api/gateways": {
      "get": {
        "operationId": "list_gateways",
        "summary": "Gateways, cloud and data platforms and developer hubs that sell model access",
        "description": "Gateways, cloud and data platforms and developer hubs that sell model access. Returns each way to buy with its markup on tokens, bring-your-own-key fee, free tier, entry plan and features.",
        "parameters": [],
        "responses": {
          "200": {
            "description": "each way to buy with its markup on tokens, bring-your-own-key fee, free tier, entry plan and features",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "gateways": [
                    {
                      "slug": "helicone",
                      "group": "independent",
                      "pricingModel": "0% markup on credits; plans by requests and seats (Pro $79 a month)",
                      "conversionNote": "",
                      "routeSlug": "",
                      "name": "Helicone",
                      "company": "helicone",
                      "domain": "helicone.ai",
                      "oneLine": "Open source LLM observability platform with an OpenAI-compatible AI gateway that logs, caches and fails over requests across providers.",
                      "markupPct": 0,
                      "markupNote": "Gateway docs state 0% markup on credits.",
                      "byok": true,
                      "byokFeePct": 0,
                      "byokFreeUsd": null
                    },
                    {
                      "slug": "kong-ai-gateway",
                      "group": "independent",
                      "pricingModel": "$100 a month per model proxied (Konnect Plus); no token fee",
                      "conversionNote": "",
                      "routeSlug": "",
                      "name": "Kong AI Gateway",
                      "company": "kong",
                      "domain": "konghq.com",
                      "oneLine": "Set of AI plugins on the Kong API gateway that add multi-provider routing, load balancing, semantic caching, guardrails and token rate li...",
                      "markupPct": 0,
                      "markupNote": "Priced per model proxied, not per token; no token markup mentioned.",
                      "byok": false,
                      "byokFeePct": null,
                      "byokFreeUsd": null
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/changes": {
      "get": {
        "operationId": "list_price_changes",
        "summary": "Dated list-price changes, newest first",
        "description": "Dated list-price changes, newest first. Returns changes with model, route, field (input, output, cached), old and new price and the day it was first seen.",
        "parameters": [
          {
            "name": "all",
            "in": "query",
            "required": false,
            "description": "Set to 1 for every route, not only lab list prices",
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page, 1 to 200",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 200
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "description": "Items to skip, for the next page",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "changes with model, route, field (input, output, cached), old and new price and the day it was first seen",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "changes": [
                    {
                      "id": 3,
                      "modelId": "gemini-3-7-flash",
                      "modelName": "Gemini 3.7 Flash",
                      "creator": "google",
                      "creatorDomain": "ai.google.dev",
                      "route": "list",
                      "field": "cache_read",
                      "old": 0.0375,
                      "new": 0.075,
                      "seenOn": "2026-08-29",
                      "prevSeen": "2026-08-28",
                      "source": "wayback",
                      "sourceUrl": "https://web.archive.org/web/20260829163340/https://openrouter.ai/api/v1/models"
                    },
                    {
                      "id": 2,
                      "modelId": "gemini-3-7-flash",
                      "modelName": "Gemini 3.7 Flash",
                      "creator": "google",
                      "creatorDomain": "ai.google.dev",
                      "route": "list",
                      "field": "output",
                      "old": 1.875,
                      "new": 3.75,
                      "seenOn": "2026-08-29",
                      "prevSeen": "2026-08-28",
                      "source": "wayback",
                      "sourceUrl": "https://web.archive.org/web/20260829163340/https://openrouter.ai/api/v1/models"
                    }
                  ],
                  "total": 145,
                  "limit": 3,
                  "offset": 0,
                  "next": "/api/changes?limit=3&offset=3"
                }
              }
            }
          }
        }
      }
    },
    "/api/search": {
      "get": {
        "operationId": "search",
        "summary": "Search models, providers, gateways and pages",
        "description": "Search models, providers, gateways and pages. Returns up to 20 ranked results with title, link and one line.",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "description": "Model, lab, provider or gateway name",
            "schema": {
              "type": "string"
            },
            "example": "sonnet"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Results, 1 to 20",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 20,
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "up to 20 ranked results with title, link and one line",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "q": "sonnet",
                  "results": [
                    {
                      "id": "m:claude-sonnet-5",
                      "group": "items",
                      "title": "Claude Sonnet 5",
                      "subtitle": "Anthropic · $2 in, $10 out · 1M",
                      "href": "/models/claude-sonnet-5",
                      "keywords": [
                        "claude-sonnet-5",
                        "anthropic/claude-sonnet-5"
                      ],
                      "logo": "https://img.logo.dev/anthropic.com?token=...&size=64&format=png&theme=light&retina=true&fallback=404",
                      "boost": 28,
                      "score": 653
                    },
                    {
                      "id": "m:claude-sonnet-4-6",
                      "group": "items",
                      "title": "Claude Sonnet 4.6",
                      "subtitle": "Anthropic · $3 in, $15 out · 1M",
                      "href": "/models/claude-sonnet-4-6",
                      "keywords": [
                        "claude-sonnet-4-6",
                        "anthropic/claude-sonnet-4.6"
                      ],
                      "logo": "https://img.logo.dev/anthropic.com?token=...&size=64&format=png&theme=light&retina=true&fallback=404",
                      "boost": 23,
                      "score": 648
                    }
                  ]
                }
              }
            }
          }
        }
      }
    }
  }
}