Skip to main content

Token Cost Estimates

Every AI operation in Proseweave consumes tokens from your balance. The Token Cost Estimate dialog lets you see how many tokens an operation will use before it runs, so you can make informed decisions about your budget.

How It Works

When you click an AI action button (Continue Writing, Generate Scene, Rewrite, etc.), Proseweave:

  1. Builds the same prompt that the real operation would use.
  2. Calls the Anthropic token-counting API to measure the exact input size.
  3. Estimates the output size based on the operation type and historical averages.
  4. Shows a confirmation dialog with the full breakdown.

You can then Proceed to run the operation or Cancel to back out at no cost.

The Confirmation Dialog

The dialog displays:

FieldDescription
OperationThe AI action you triggered
ModelWhich Claude model will be used, with a cost tier badge ($ / $$ / $$$)
Input tokensTokens sent to the model (exact count when available)
Output tokensEstimated tokens the model will generate
Total estimateCombined input + output tokens
BalanceYour current balance and projected balance after the operation
info

Input token counts are exact when the Anthropic counting API is available. If the API is unreachable, Proseweave falls back to a character-based estimate and marks it as (est.).

Pipeline Operations

Some operations run multiple AI steps internally. For example, Generate Scene uses a 2- or 3-step pipeline:

  1. Expand Beat — turns the scene beat into detailed prose instructions
  2. Analyze Voice (conditional) — studies your existing prose style
  3. Generate Prose — writes the scene content

The estimate dialog shows the combined cost of all steps and notes the pipeline:

This operation uses a 3-step pipeline. The estimate includes all steps.

tip

Pipeline estimates include padding for intermediate outputs that can't be measured in advance. Actual costs are typically lower than the estimate.

Prompt Caching

Proseweave uses Anthropic's prompt caching for Story Bible context. When caching is active, the dialog shows a note:

Story Bible context may be cached, reducing actual cost.

Cached tokens cost significantly less than uncached tokens, so your actual usage will often be lower than the estimate.

Insufficient Balance

If your token balance is too low for the estimated cost, the dialog:

  • Highlights the projected balance in red
  • Shows an Insufficient token balance warning
  • Disables the Proceed button

You'll need to add tokens to your balance before running the operation.

Covered Operations

The following operations show a cost estimate before running:

LocationOperations
Manuscript toolbarContinue Writing, Rewrite Selection
Structured Rewrite panelStructured Rewrite
Scene cards (Outline view)Generate Scene
Act cards (Outline view)Expand Outline, Suggest Act Summary
Chapter cards (Outline view)Suggest Scene Beats

Low-cost operations like field rewrites and dialogue samples run without a confirmation step to keep the workflow smooth.

Error Handling

If the estimation endpoint fails (network issue, server error), the dialog shows the error message with two options:

  • Cancel — abort the operation
  • Proceed Anyway — run the operation without knowing the exact cost

This ensures you're never blocked from working, even if cost estimation is temporarily unavailable.