Estimate a prepared job
Combine a survey with the agents, scenarios, and models you plan to use. For example:estimate_job_cost() to get a dictionary of estimated costs and token counts:
To inspect the breakdown as a table:
Estimate hosted execution in credits and USD
With Expected Parrot authentication configured, request the server’s estimate for the same job:usd and credits_hold, along with estimate metadata such as estimate_kind, assumptions, and warnings when available. remote_inference_cost() also accepts a Survey; pass a Jobs object when you want the estimate to use your selected agents, scenarios, and models.
The CLI equivalent is ep jobs cost jobs.ep --iterations 3. See Credits for account balances and usage.
Inspect prompts and their estimated costs
job.prompts() returns the rendered prompts and an estimated cost for each question in each planned interview:
estimated_cost is in USD for one question in one interview, before multiplying by iterations. The preview includes scenario values and agent instructions; answers to earlier questions become available when the survey runs. See Prompts and instructions for inspecting the prompts recorded with completed responses.
Detailed estimates
For a breakdown that accounts for question types, file inputs, and survey memory, useestimate_remote_job_cost():
price_lookup. It returns a JobCostEstimate for one iteration; it does not submit a remote job.
You can supply your own expected response lengths. For example, estimate a 100-token answer to the
favorite_flower question:
TokenOverride also accepts comment_tokens and thinking_tokens; omitted fields retain their estimates. Optional service and model fields restrict an override to a particular model. These values change the estimate, not the model’s output limits.
For surveys with branching, branch_weights={("from_question", "to_question"): probability} supplies expected transition probabilities. Without branch weights, the estimator assumes every question is reached. chars_per_token adjusts the text-to-token approximation.
Reuse a pricing table
Coop.fetch_prices() returns a pricing dictionary keyed by (inference_service, model). You can reuse that table across estimates:
input and output price entries. If a model is missing, the estimator falls back to available service prices or default rates; inspect the prices used in the breakdown.
Inspect recorded costs
Load completed results and compute the recorded job cost:include_cached_responses_in_cost=True includes their recorded costs for comparison; those costs are not necessarily new charges. Missing provider usage or pricing information can limit the estimate. Use your account or provider’s billing record to reconcile actual charges.
