Skip to main content
Glama

gpu_estimate

Estimate GPU compute service costs before execution to budget AI workloads across multiple providers.

Instructions

Estimate the cost of a GPU-Bridge service before running it. No authentication required.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
serviceYesService key (e.g. llm-4090, image-4090)
secondsNoEstimated runtime in seconds (optional)

Implementation Reference

  • The handler for the `gpu_estimate` tool in the switch block of the `CallToolRequestSchema` request handler.
          case "gpu_estimate": {
            const { service, seconds } = args;
            const qs = seconds ? `&seconds=${seconds}` : "";
            const est = await apiCall(`/catalog/estimate?service=${service}${qs}`, "GET");
            if (est.error) {
              return { content: [{ type: "text", text: `Error: ${est.error}${est.available_services ? `
    Available: ${est.available_services.join(", ")}` : ""}` }], isError: true };
            }
            return { content: [{ type: "text", text: `Service: ${est.service}
    Estimated cost: $${est.estimated_cost_usd}
    Rate: $${est.price_per_second}/sec
    ${est.note}` }] };
          }
  • index.js:62-72 (registration)
    Registration of the `gpu_estimate` tool within the `ListToolsRequestSchema` handler.
      name: "gpu_estimate",
      description: "Estimate the cost of a GPU-Bridge service before running it. No authentication required.",
      inputSchema: {
        type: "object",
        properties: {
          service: { type: "string", description: "Service key (e.g. llm-4090, image-4090)" },
          seconds: { type: "number", description: "Estimated runtime in seconds (optional)" }
        },
        required: ["service"]
      }
    }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/gpu-bridge/mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server