Skip to main content
Glama

RelaySwitch

Estimate what a request costs

estimate
Read-onlyIdempotent

The cost of a request on every chat model (or the ids given), cheapest first, with the developer's list cost and the saving. Give input_tokens, or a prompt / messages to count from. With the caller's key, prices are the key's own (price locks included). Live from POST /v1/estimate.

Input Schema

NameRequiredDescriptionDefault
modelsNoModel ids to price. Default: every chat model, cheapest first.
promptNoText to estimate the prompt tokens from, instead of input_tokens.
messagesNoChat messages to estimate from, instead of input_tokens.
input_tokensNoPrompt tokens. Give this or a prompt / messages to count from.
output_tokensNoCompletion tokens. Default 1000.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources