Cost Calculation

TradingGoose meters workflow execution, model usage, and Function/custom-tool runtime. Charges use the configuration and effective tier of the workspace's user or organization billing owner.

How Costs Are Calculated

When billing is enabled, usage can include three cost components:

  • Execution charge: the configured workflow charge multiplied by the tier execution multiplier, as captured in the execution's pricing quote.
  • AI model usage: the provider-model cost recorded by each execution span, multiplied by the tier model-cost multiplier captured in that quote.
  • Function runtime: the configured per-second Function charge multiplied by execution time in seconds and the tier's Function execution multiplier. This is accrued separately for Function/custom-tool execution, including runtime attempts that fail.
executionCost = configuredWorkflowCharge * tierWorkflowExecutionMultiplier
adjustedModelCost = recordedModelCost * tierWorkflowModelCostMultiplier
workflowLogSubtotal = executionCost + sum(adjustedModelCost)
functionCost = (executionTimeMs / 1000) * configuredFunctionChargePerSecond * tierFunctionExecutionMultiplier
totalMeteredCost = workflowLogSubtotal + sum(functionCost)

This formula is illustrative. Each Function runtime charge is rounded to six decimal places. The workflow log's cost total is its execution/model subtotal; separately accrued Function charges also contribute to the billing owner's usage. They are not an AI-model charge and can apply to non-AI workflows.

Completed model work is accounted for when a human-in-the-loop checkpoint is saved. Resuming or cancelling does not charge that same work again: each logical execution reuses its captured execution/model pricing quote and incurs its base execution charge only once. Child workflow costs are accounted for in the child's own log, not charged again through the parent's nested traces.

For executions whose pricing quote is first captured while billing is disabled, the base execution charge is zero and recorded model costs use a multiplier of one. Disabled billing accrues no additional billed workflow or Function usage; it does not rewrite previously captured quotes. Billing configuration, rather than fixed values in this guide, is the source of truth for charges and multipliers.

Model Breakdown in Logs

For workflows using AI blocks, you can view detailed cost information in the logs:

The log detail sidebar includes a model breakdown section that shows:

  • Token Usage: Input and output token counts for each model
  • Cost Breakdown: Input, output, and total cost for each model
  • Models Used: Which models contributed to the execution cost
  • Total Cost: The workflow log's execution/model subtotal; check usage for separately accrued Function runtime charges

Pricing and Limits

The available billing tiers and model catalog are configured by the TradingGoose deployment and can change independently of this documentation. Use Settings → Subscription for current usage, the usage limit, and the available plans, prices, and advertised features. The usage-limits API below reports rate, storage, retention, and multiplier values for the authenticated user's personal billing scope; it does not resolve an organization's effective tier for a workspace. Use the Agent block's model selector for the models currently available to your workspace.

If you receive an access code for a private tier, enter it in Settings → Subscription. Codes are case-sensitive, although surrounding whitespace is ignored. A valid code makes the corresponding private plan available to your user.

A billing tier can also impose a maximum duration on each queued workflow execution. An execution that reaches that limit is terminated and recorded with the error Workflow execution time limit exceeded.

Cost Optimization Strategies

Usage Monitoring

Monitor your usage and billing in Settings → Subscription:

  • Current Usage: Usage and costs accumulated in the current period
  • Usage Limit: The effective spending limit and percentage consumed
  • Plan Management: Available subscription actions when billing is enabled

Programmatic Personal Usage Tracking

You can query the authenticated user's personal usage and limits programmatically using the API:

Endpoint:

GET /api/users/me/usage-limits

Authentication:

  • Include your API key in the X-API-Key header

Example Request:

curl -X GET -H "X-API-Key: YOUR_API_KEY" -H "Content-Type: application/json" https://www.tradinggoose.ai/api/users/me/usage-limits

Example Response:

{
  "success": true,
  "rateLimit": {
    "sync": { "isLimited": false, "limit": 10, "remaining": 10, "resetAt": "2025-09-08T22:51:55.999Z" },
    "async": { "isLimited": false, "limit": 50, "remaining": 50, "resetAt": "2025-09-08T22:51:56.155Z" },
    "authType": "api"
  },
  "usage": {
    "currentPeriodCost": 12.34,
    "limit": 100,
    "tier": {
      "id": "tier_example",
      "displayName": "Example Tier",
      "ownerType": "user",
      "usageScope": "individual",
      "syncRateLimitPerMinute": 10,
      "asyncRateLimitPerMinute": 50,
      "apiEndpointRateLimitPerMinute": 60,
      "logRetentionDays": 30,
      "workflowExecutionMultiplier": 1,
      "workflowModelCostMultiplier": 1
      // The response includes the remaining BillingTierSummary fields.
    }
  },
  "storage": {
    "usedBytes": 5242880,
    "limitBytes": 1073741824,
    "percentUsed": 0.48828125
  }
}

Response Fields:

  • currentPeriodCost reflects usage in the current billing period
  • limit is the effective usage limit for the authenticated user's billing scope
  • tier is the complete billing-tier summary, including its configured rate limits, retention, and cost multipliers
  • storage reports the current byte usage, byte limit, and percentage used

The example values are illustrative. Read the response returned for your account instead of relying on fixed plan names or limits.

Cost Management Best Practices

  1. Monitor Regularly: Check your usage dashboard frequently to avoid surprises
  2. Set Budgets: Where your tier permits it, use the editable usage limit as a spending guardrail
  3. Optimize Workflows: Review high-cost executions and optimize prompts or model selection
  4. Use Appropriate Models: Match model complexity to task requirements
  5. Batch Similar Tasks: Combine multiple requests when possible to reduce overhead

Next Steps