Pricing

Mixlayer charges for the model usage and hosted tools consumed by a request. Model rates vary, so the Models section of the console is the source of truth for current prices.

Generation models

Generation models can have three token rates:

UsageHow it is charged
Uncached inputInput tokens that were not served from the prompt cache, at the model’s input rate.
Cached inputCached input tokens, at the model’s cache-read rate.
OutputAll generated tokens, at the model’s output rate. Reasoning models may generate reasoning tokens in addition to the visible answer.

To estimate the token cost, convert each token count to millions and multiply it by the corresponding rate:

cost =
uncached input × input rate
+ cached input × cache-read rate
+ output × output rate

Uncached input is total input minus cached input.

The API response reports token usage. Chat Completions returns prompt_tokens, completion_tokens, and prompt_tokens_details.cached_tokens; Responses returns input_tokens, output_tokens, and input_tokens_details.cached_tokens.

Worked example

Suppose a model has these hypothetical rates:

  • Input: $0.20 per million tokens
  • Cached input: $0.05 per million tokens
  • Output: $0.80 per million tokens

A request uses 1,000,000 total input tokens, of which 200,000 are cached, and generates 100,000 output tokens:

UsageCalculationCost
Uncached input800,000 ÷ 1,000,000 × $0.20$0.16
Cached input200,000 ÷ 1,000,000 × $0.05$0.01
Output100,000 ÷ 1,000,000 × $0.80$0.08
Total model usage$0.25

These rates are illustrative. Always use the current rates shown in the Mixlayer console.

Embeddings

Embedding requests are charged only for the input tokens processed, at the embedding model’s input rate. There is no output-token charge because the returned vectors are not generated tokens.

For a batch, usage is the combined input tokens across all items. Changing the output dimensions changes the vector size, but not the number of input tokens billed. The response reports the billed token count in usage.prompt_tokens.

Hosted tools

Hosted-tool charges are added to model usage. A tool call that completes is billable even if the subsequent model generation fails. The response reports hosted-tool usage under usage.server_tool_use.

See Server-Side Tools for current web-search pricing and usage fields.

Interrupted and failed requests

  • Successful generation is billed from its recorded token usage.
  • Work already generated when the client disconnects may still be billable.
  • A failed generation is not billed for model tokens, but any hosted-tool calls that completed remain billable.

Set realistic output-token limits and stop streams you no longer need, but do not assume disconnecting cancels work that has already completed.

Billing accounts and credits

Organizations use either prepaid or post-paid billing. Prepaid usage draws from the billing account’s credit balance; post-paid usage is invoiced. See Credits & Limits for recharges, automatic top-up, billing errors, and spend controls.

Custom and fine-tuned models

Mixlayer can host custom, fine-tuned, and distilled models for you. Get in touch to discuss pricing.