Skip to main content
Glama

Estimate the USD cost of a Replicate prediction

replicate_estimate_cost
Read-onlyIdempotent

Estimate the dollar cost of a planned prediction on Replicate before execution. Provide model ID, number of outputs, or duration for per-second models.

Instructions

Return an approximate dollar-cost estimate for a planned prediction BEFORE running it. Prices are a hand-curated snapshot — actual billing comes from Replicate. Call this when the user asks "how much would X cost" or before launching a costly model.

Args:

  • model: Replicate "owner/name" id or a curated short key (e.g. "flux-schnell", "kling-pro").

  • num_outputs (1-20, optional): How many outputs to estimate. Default 1.

  • duration_seconds (1-600, optional): Required for per-second models (video, music, transcription, LLM).

Returns structuredContent: { resolved_model_id, num_outputs, duration_seconds, estimated_usd, pricing_basis, note }.

Examples:

  • model="flux-schnell", num_outputs=4 → ~$0.012 (4 × $0.003 per_run)

  • model="kling-pro", duration_seconds=5 → ~$0.45 (5 × $0.09 per_second)

  • model="meta/meta-llama-3-70b-instruct", duration_seconds=10 → ~$0.024 (10 × $0.0024 per_second)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modelYesReplicate model id ("owner/name") or a curated key (e.g. "flux-schnell").
num_outputsNoHow many outputs to estimate for. Default 1.
duration_secondsNoFor models priced per second (video, audio, LLM), the expected duration / token-equivalent.
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true and idempotentHint=true, indicating safe reads. The description adds valuable context: prices are a 'hand-curated snapshot' and 'actual billing comes from Replicate,' and it clarifies required parameters for per-second models. No contradictions with annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with clear sections for Args, Returns, and Examples. It front-loads the purpose in the first sentence. Every sentence adds value, and there is no redundancy or wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has 3 parameters and no output schema, the description explains the return structure (structuredContent with fields like resolved_model_id, estimated_usd, etc.) and provides multiple concrete examples. It covers the key aspects needed for an agent to understand and invoke the tool correctly. Minor gap: could mention that estimates are approximate, but that is already stated.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, but the description adds meaning beyond the schema by explaining parameter types (e.g., model can be owner/name or short key), providing examples of how parameters affect the estimate, and listing default values and ranges. This helps agents use parameters correctly.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it returns an approximate dollar-cost estimate for a planned prediction before running it. It uses specific verbs ('estimate cost') and identifies the resource ('Replicate prediction'), and it distinguishes from sibling tools which focus on running models, listing, etc.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly says when to call this tool: 'when the user asks "how much would X cost" or before launching a costly model.' While it doesn't list when not to use it or alternatives, the context makes it clear it's a unique cost estimation tool among many execution tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/sena-labs/replicate-mcp-server'

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