Api Endpoint

Agent Extraction API

Token & cost calculator: estimate tokens for a text (or pass input_tokens/output_tokens) and price it across several models using provider list prices (LiteLLM price table, MIT). Params: models (comma list of model ids like gpt-4o-mini, claude-sonnet-4-5, gemini/gemini-2.5-flash or search words, max 15), text or input_tokens, output_tokens, calls.

Open interactive test console

Offering

Provider
freetier-agent-api.pages.dev
Method
GET
Offering type
Api Endpoint
Transport type
http
Category
Other
Delivery
Not provided
Pricing model
Not provided
x402 version
2

Endpoint context

URL
https://freetier-agent-api.pages.dev/api/llm-cost
MIME type
application/json
First seen
2026-10-26T22:16:55.441Z
Last seen
Tags
LLM, pricing, cost-estimate

Payment pricing

x402 payment terms are the authoritative price for calling this endpoint.

Payment option 1
0.005 USDC
Atomic price: 5000 · Network: eip155:8453 · Asset: USDC · Scheme: exact
Raw x402 terms
[
  {
    "scheme": "exact",
    "network": "eip155:8453",
    "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
    "amount": "5000",
    "payTo": "0x165Eb3dC3E98403ecB1141e90400F5e71806554B"
  }
]

Observed health

Status
Healthy
Latest latency
54 ms
Average latency
444 ms
HTTP status
402
Last checked
Reachability
100% over 14 checks

Latency is measured to the first response headers. A reachable result does not verify response accuracy or merchant identity.

Input schema

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "http"
    },
    "method": {
      "type": "string",
      "enum": [
        "GET"
      ]
    },
    "queryParams": {
      "type": "object",
      "properties": {
        "models": {
          "type": "string"
        },
        "text": {
          "type": "string"
        },
        "input_tokens": {
          "type": "string"
        },
        "output_tokens": {
          "type": "string"
        },
        "calls": {
          "type": "string"
        }
      },
      "required": []
    }
  },
  "required": [
    "type",
    "method"
  ]
}

Output schema

{
  "type": "object",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "required": [
    "input"
  ],
  "properties": {
    "input": {
      "type": "object",
      "required": [
        "type",
        "method"
      ],
      "properties": {
        "type": {
          "type": "string",
          "const": "http"
        },
        "method": {
          "enum": [
            "GET"
          ],
          "type": "string"
        },
        "queryParams": {
          "type": "object",
          "required": [],
          "properties": {
            "text": {
              "type": "string"
            },
            "calls": {
              "type": "string"
            },
            "models": {
              "type": "string"
            },
            "input_tokens": {
              "type": "string"
            },
            "output_tokens": {
              "type": "string"
            }
          }
        }
      }
    },
    "output": {
      "type": "object",
      "required": [
        "type"
      ],
      "properties": {
        "type": {
          "type": "string"
        },
        "example": {
          "type": "object",
          "properties": {
            "calls": {
              "type": [
                "number",
                "null"
              ]
            },
            "results": {
              "type": "array",
              "items": {
                "type": [
                  "object",
                  "null"
                ]
              }
            },
            "sources": {
              "type": "array",
              "items": {
                "type": [
                  "object",
                  "null"
                ]
              }
            },
            "input_tokens": {
              "type": [
                "number",
                "null"
              ]
            },
            "output_tokens": {
              "type": [
                "number",
                "null"
              ]
            },
            "estimate_method": {},
            "input_tokens_estimated": {
              "type": [
                "boolean",
                "null"
              ]
            }
          }
        }
      }
    }
  }
}