estimate_cost
Determine the credit cost of a model generation request before incurring charges, returning an estimated amount or a warning if cost cannot be computed.
Instructions
Estimate the credit cost of a generation BEFORE spending anything.
Call this after get_model_params and before generate (the three-call contract is list_models -> get_model_params -> generate; this tool is the recommended pre-flight between steps 2 and 3). Costs come from the gateway estimate endpoint when available ("source": "estimate"), else from the catalog-listed per-generation cost ("source": "catalog"), else the cost is reported as unknown.
Args: model_id: Catalog model id, e.g. "pixio/flux-1/schnell". params: The exact params object you intend to pass to generate(), built from the get_model_params response.
Returns: {"model_id": str, "estimated_credits": int | null, "source": "estimate" | "catalog" | "unknown"}, plus a "warning" string only when the cost could not be determined ("estimated_credits" is null and "source" is "unknown").
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| params | Yes | ||
| model_id | Yes |