Get a Wiro task price
get_task_priceRetrieve a task's billed cost and compare it with the model's list price when a discount applies, for tasks whose result is unavailable or shows only list price.
Instructions
Get one task’s cost: the amount charged once Wiro has billed it, with the model's list price beside it when a discount made them differ. Successful tasks are billed; failed tasks and tasks cancelled while queued are not, and a task stopped while running can still be charged once its work ends. A finished task's result already shows its cost, so use this for a task whose result you do not have, or whose result shows only the list price. If the task is active, follow the returned wait_for_task next action.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| taskid | No | The task ID (alternative to tasktoken). | |
| tasktoken | No | The task token returned from run_model. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| task | Yes | ||
| state | Yes | ||
| billed | Yes | ||
| costUsd | Yes | The amount charged so far; null while the task is active or a successful task's charge is not recorded yet. While billed is null, a later charge is still possible. | |
| nextAction | No |