Get a Wiro task price
get_task_priceRetrieves the amount charged for a task and its model list price when a discount makes them differ, helping you verify billing when a task result lacks cost details.
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. Tell a person a task's status as its Status line or task.statusText says it, never the task.status code.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "get_task_price"
}
}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 |