SOLWYN
Commands

costs

Aggregate project cost breakdown by model, provider, or day

costs reports a project's aggregate spend over a window, grouped by model, provider, or day. Alongside the priced total, each group carries an unpriced count and a local count — calls Solwyn recorded but did not cost, kept visible rather than settled as a fabricated $0.

Terminal
solwyn --project <project_id> costs [--range 7d|30d|90d|365d] [--group-by day|model|provider]

Resolve the project with --project, SOLWYN_PROJECT_ID, or a default_project in your config file.

Options

OptionTypeDefaultPurpose
--range7d | 30d | 90d | 365d7dAggregation window.
--group-byday | model | providermodelDimension to aggregate on.
Contract
Authany (project key or JWT)
Exit codes0 success · 1 generic/API · 2 usage · 3 auth · 5 not found
JSON schemasolwyn.costs.v1

Output

Each row is one group. Cost is the priced total in USD; Unpriced and Local count calls that were recorded without a price.

Terminal
$ solwyn --project proj_abc12345 costs --range 30d --group-by model
Group                     Provider      Cost  Input   Output  Calls  Unpriced  Local
gpt-4o                    openai    8.420000  420000   84000    312         0      0
gpt-4o-mini               openai    1.200000  600000  120000    480         0      0
claude-sonnet-4-5         anthropic 6.150000  205000   41000    156         2      0
llama-3.3-70b             ollama    0.000000   88000   17600     40         0     40
ColumnMeaning
GroupThe grouping key — a model name, provider, or day depending on --group-by
ProviderProvider for the group (- when grouping by day)
CostPriced total in USD for the group
Input / OutputTotal input and output tokens
CallsNumber of calls in the group
UnpricedCalls recorded with no observable billable quantity — never a fabricated $0
LocalCalls to zero-cost local providers (ollama, vllm, lmstudio), recorded for visibility

The Unpriced and Local lanes exist because Solwyn records only quantities and selectors, never content — so a call whose billable quantity is unobservable is shown, not invented. See Surface coverage for which calls land in each lane.

Grouped by provider

Terminal
$ solwyn --project proj_abc12345 costs --range 90d --group-by provider
Group      Provider       Cost    Input   Output  Calls  Unpriced  Local
openai     openai    38.240000  1920000  384000   1204         0      0
anthropic  anthropic 24.600000   820000  164000    387         2      0

JSON output

Terminal
$ solwyn --project proj_abc12345 --json costs --range 30d --group-by provider
{
  "schema": "solwyn.costs.v1",
  "project_id": "proj_abc12345",
  "range": "30d",
  "group_by": "provider",
  "groups": [
    {
      "group_key": "openai",
      "provider": "openai",
      "total_cost": 38.24,
      "total_input_tokens": 1920000,
      "total_output_tokens": 384000,
      "call_count": 1204,
      "unpriced_call_count": 0,
      "local_call_count": 0
    }
  ]
}

Pretty-printed here; the CLI emits the envelope as a single line. See Scripting for the envelope and exit-code contract.

  • status — budget usage and provider health at a glance
  • Privacy — the complete list of quantities Solwyn transmits, and the content it never does

On this page