Billing & Usage

1. Billing dimensions

mixgateway.io charges based on actual usage, primarily:

  • Prompt tokens (prompt_tokens)
  • Completion tokens (completion_tokens)
  • Total tokens (total_tokens)

Billing is based on the usage object returned by the upstream model whenever it is available.

2. Pricing model

  • Prices are typically quoted per 1K tokens; prompt and completion may have different unit rates (see the public pricing page and your [console](/dashboard) for the exact table).
  • A simplified mental model:
amount ≈ (prompt_tokens / 1000) * price_prompt_per_1k
       + (completion_tokens / 1000) * price_completion_per_1k
  • Internally, amounts are often tracked in the smallest currency unit with integer arithmetic to reduce floating-point rounding drift.

3. Usage for streaming vs non-streaming

  • Non-streaming (stream: false)
    When the upstream response includes a usage object, the gateway uses those token counts for metering.

  • Streaming (stream: true)

    • The upstream sends multiple data: {...} SSE chunks.
    • The last chunk often includes usage.
    • The gateway parses that usage for billing and analytics without changing what the client sees in the stream.

4. Viewing usage and bills

In the [console](/dashboard) Usage / Billing areas (names may vary by product version), you can typically find:

  • Request counts and token totals per API key
  • Breakdowns by model
  • Per-call cost detail and remaining balance / quota when prepaid or quota modes apply

Console layouts may change; metrics such as call volume, token usage, and cost remain the primary signals.

5. FAQ

Q: Is streaming more expensive than non-streaming?
A: No. Both are billed from the final usage (especially total_tokens) when the upstream provides it. Splitting output into many SSE frames does not by itself increase tokens.

Q: Do all models cost the same?
A: No. Rates differ by provider and by model. Check the pricing page and the console.

Q: What if balance or quota is insufficient?
A: New requests may be rejected with an error such as insufficient_quota (or a product-specific code). Whether overdraft or grace modes exist depends on your account settings.

Q: Monthly plans or volume packages?
A: If offered, they are configured on the business side—contact sales or operations for custom plans aligned to your expected usage.

See also