Estimate a task's credit cost
Estimate what a scheduled task costs before you create or change it, and whether the credit balance still lasts until the next refill with it running. Pass task_id to price an existing task (any schedule field you also pass overrides the task's), or describe a new one with trigger_type and its schedule. credits_per_run is the median of the task's own recent completed runs, else of the account's tasks on the same model, else a typical agent run (basis says which). Runs per day come from the cron expression or interval; for an event trigger pass runs_per_day, or task_id to use the task's observed rate. burn_rate_per_day, runs_out_at and runs_out_before_refill describe the account with the task running at that rate (an active task_id replaces its own recent spend rather than adding to it). A condition script that skips runs makes the real cost lower.
Request
- Base URL: https://api.crevio.co/v1
- URL: https://api.crevio.co/v1/tasks/cost_estimate
- Auth: API key in header Authorization
Query parameters
An existing task to price (task_...).
How the task fires.
Five-field cron schedule, for trigger_type: cron.
IANA time zone the cron expression is read in.
Seconds between runs, for trigger_type: interval.
Expected runs per day; overrides the schedule. Use it for event triggers.
Model tier (fast, balanced, quality) or model id the task runs on.
agent (a model turn per run, the default) or script (no model).
Response
Cost estimate
Changes
No recorded changes to this operation across all 2 revisions of this API.