一键导入
output-dev-workflow-cost
// Calculate and display the cost of an Output SDK workflow execution run. Use when checking LLM token costs, API service costs, or total spend for a specific workflow run.
// Calculate and display the cost of an Output SDK workflow execution run. Use when checking LLM token costs, API service costs, or total spend for a specific workflow run.
Implement an Output SDK workflow from a plan document. Use when the user asks to build, implement, or code a workflow from an existing plan, or after output-plan-workflow has produced a plan and the user is ready to build.
Create offline evaluation tests for Output SDK workflows using @outputai/evals. Use when implementing test evaluators with verify(), creating dataset YAML files, building eval workflows, or running workflow tests via CLI.
Create shared HTTP clients in src/shared/clients/ for Output SDK workflows. Use when integrating external APIs, creating service wrappers, or standardizing HTTP operations.
Pick the right LLM model for an Output SDK prompt file. Use when writing a new .prompt file, reviewing a model choice, or upgrading a stale model. Walks through priority (reasoning/balance/speed/cost), provider selection, and a live lookup against the Vercel AI Gateway model index.
Create .prompt files for LLM operations in Output SDK workflows. Use when designing prompts, configuring LLM providers, or using Liquid.js templating.
Create .md skill files for Output framework's lazy-loaded instruction system. Use when adding skills to prompts, configuring skill loading, or debugging skill resolution.
| name | output-dev-workflow-cost |
| description | Calculate and display the cost of an Output SDK workflow execution run. Use when checking LLM token costs, API service costs, or total spend for a specific workflow run. |
| allowed-tools | ["Bash"] |
This skill helps you calculate the cost of a completed workflow execution using the Output CLI. It breaks down costs by LLM model (token usage) and external API service calls.
The workflow cost command requires a workflow run ID — not the workflow name.
A run ID looks like: process_transcripts_2026-03-23-19-35-17-000Z_c2biRk_F9rYktF-wagBf5
Option A — List recent runs (use skill: output-workflow-runs-list):
npx output workflow runs list <workflowName> --limit 5
Copy the run ID from the most recent completed run.
Option B — Run the workflow now and capture the ID:
If you know the input, run it synchronously and the run ID will be in the output:
npx output workflow run <workflowName> --input '{"key": "value"}'
Or asynchronously (use skill: output-workflow-start):
npx output workflow start <workflowName> --input '{"key": "value"}'
# Returns: Workflow ID: <runId>
If you don't know the input, check for a scenario file (use skill: output-dev-scenario-file) or the workflow's inputSchema in its types.ts.
Note: The workflow name (e.g.
process_transcripts) identifies the workflow type. The workflow run ID (e.g.process_transcripts_2026-03-23T19:35:17.000Z_abc123) identifies a specific execution.workflow costrequires the run ID.
npx output workflow cost <runId>
npx output workflow cost <runId> path/to/trace.json
npx output workflow cost <runId> --format json
npx output workflow cost <runId> --verbose
| Flag | Description | Default |
|---|---|---|
--format <type> | Output format: text or json | text |
--verbose | Show detailed per-LLM-call breakdown | false |
Pricing values are illustrative — the model and per-token rates shown below were current as of 2026-05-04. Live pricing comes from models.dev. For current model IDs, see
output-dev-model-selection.
Workflow: process_transcripts
Duration: 12.3s
LLM Costs:
claude-sonnet-4-6 — 1,234 in / 567 out tokens — $0.0123
Services:
jina — 2 requests — $0.004
Total Cost: $0.0163
{
"workflowName": "process_transcripts",
"durationMs": 12300,
"llmTotalCost": 0.0123,
"totalInputTokens": 1234,
"totalOutputTokens": 567,
"services": [{ "serviceName": "jina", "totalCost": 0.004 }],
"totalCost": 0.0163
}
Get cost of the last run:
# First get the run ID
npx output workflow runs list process_transcripts --limit 1 --format json
# Then get the cost
npx output workflow cost process_transcripts_2026-03-23T19:35:17.000Z_abc123
Get cost as JSON and extract total:
npx output workflow cost <runId> --format json | jq '.totalCost'
Show full per-call breakdown:
npx output workflow cost <runId> --verbose
output-workflow-runs-list — Find run IDs from execution historyoutput-workflow-start — Start a workflow and capture its run IDoutput-workflow-run — Run a workflow synchronouslyoutput-dev-scenario-file — Create or find scenario files for workflow input