Estimate the USD cost of a Replicate prediction
replicate_estimate_costEstimate 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
| Name | Required | Description | Default |
|---|---|---|---|
| model | Yes | Replicate model id ("owner/name") or a curated key (e.g. "flux-schnell"). | |
| num_outputs | No | How many outputs to estimate for. Default 1. | |
| duration_seconds | No | For models priced per second (video, audio, LLM), the expected duration / token-equivalent. |