> For the complete documentation index, see [llms.txt](https://docs.mediafier.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mediafier.ai/overview/credits-and-billing.md).

# Credits & Billing

Per-call metering governed at the gateway: engagement shapes, what is billed, wallets, spend controls, and what happens at zero balance.

> **Per-call metering, governed at the gateway.** Chargeable tool calls are priced, attributed to the calling organization, and paid for before the runtime executes, and every charge is recorded in an auditable ledger.

***

## The shape of platform billing

Billing is per call, per organization. The unit is the tool call rather than a seat; the account is the organization rather than an individual user. Payment is taken before dispatch, so a call the wallet cannot cover is refused rather than billed later.

That structure shows up the same whether the call comes from an agent-first integration, a Slack/Teams surface, or Pippa chat. The gateway's billing stage is one chain; every surface walks it.

***

## Prices

* **Every tool call is priced in credits.** You see the price before the call runs: each tool's page in the Toolbox lists it, and `mediaclaw_inspect` quotes a MediaClaw run up front. Refused calls are free.
* **Credit packs:** 100 credits for $5, 500 for $25, 1,000 for $50. Pack credits last 365 days.
* **Plans:** Free. Pro, $59/mo with 400 credits included. Teams, $249/mo with 2,200 credits included.
* **Bring your own key:** a flat 0.1 credit per call. The vendor bills you directly for usage.
* **No minimums, no contract required.** Auto top-up and spending limits are self-serve.

***

## Engagement shapes

Billing sits inside one of three commercial shapes; a typical engagement spans more than one.

| Shape             | What it covers                                                                               | How customers pay             |
| ----------------- | -------------------------------------------------------------------------------------------- | ----------------------------- |
| **Project**       | Design, integration, customization for a specific customer or partner engagement.            | Upfront and ongoing services. |
| **Transactional** | Operating the control plane, tuning governed resources and models, metering each call.       | Per call, scales with usage.  |
| **Outcome**       | Vertical IP — MediaClaws, tools and skills where the completed operation is the deliverable. | Priced per completed outcome. |

***

## What gets billed

| Billable event                                     | Notes                                                                                         |
| -------------------------------------------------- | --------------------------------------------------------------------------------------------- |
| Tool call dispatched through the gateway           | Rates come from call-time responses, never from cached documentation.                         |
| MediaClaw step                                     | Each step is a tool call — same metering, evidence-card linked.                               |
| Marketplace resource call                          | Same metering posture; the publisher's earning split is recorded against the same call event. |
| Asynchronous follow-on work the platform initiates | Metered when the platform charges for the artefact the agent asked for (e.g. transcription).  |

**Refused and failed calls.** A refusal that happens before payment is taken is not charged. Where a charge was already recorded, Mediafier attempts to reverse it with a compensating ledger entry under the same trace ID. If a charged call fails after dispatch, any refund appears as its own ledger entry against that trace ID. If a charge you expected to be reversed remains, quote the trace ID to support.

***

## Wallets and ledgers

Every organization has a credit wallet. Before dispatch, Mediafier verifies that the organization has enough spendable credits for the call. Expired or otherwise ineligible credits are not treated as available, even if they have not yet disappeared from a displayed balance.

Every charge carries the trace ID of the call that produced it, so the chain from "where did this charge come from?" to the underlying tool call is always reconstructable.

***

## What organizations can configure

Organizations get controls over how spend behaves at scale, not over whether the gateway enforces:

* **Per-tool spend visibility.** Owners, admins, and billing admins see which tools are spending, and how much, in the billing statements.
* **Spending limits and auto top-up.** Owners, admins, and billing admins set them in the billing settings. With auto top-up on, Mediafier buys the credit pack you chose whenever the balance falls below your refill point, so agents keep running without anyone stopping to buy credits. Spending limits cap the total.
* **Low-balance email.** Owners and admins are emailed when the balance runs low or runs out.

Rate limits are set by the platform; they are not an organization setting.

What organizations don't configure: whether billing runs. Every governed call goes through the billing stage. Bypassing it isn't a configuration option.

***

## When the wallet runs dry

If a call would exceed the organization's available credits, the gateway returns a deterministic billing-failure response before the runtime sees the request. The agent receives a structured envelope with a trace ID. Two things follow:

1. The agent (or the agent's harness) knows the call did not run, why it did not run, and how to re-plan or escalate.
2. Owners and admins see the same state on the billing page and by email.

There is no after-the-fact bill for a call the wallet could not cover: such calls are refused before dispatch.

***

## What credits are not

* Credits are not transferable across organizations. The wallet is organization-bound.
* Credits are not tied to a specific runtime. The same credit can pay for a first-party MCP, a Marketplace resource, a MediaClaw step, or a workflow call.

***

## Why per-call metering matters

A few practical effects:

* **Cost transparency.** Customers can see which tools consumed which credits.
* **Contract flexibility.** The same metering supports per-call pricing, capped budgets, and outcome-priced engagements.
* **Early visibility.** A misbehaving agent's spend shows up in the ledger as it happens, not on a monthly invoice.
* **Partner economics.** Marketplace publishers earn against the same per-call metering — see [Provider Earnings & Marketplace Economics](https://docs.mediafier.ai/partners/provider-earnings-and-marketplace-economics.md).

***

## Where to go next

| If you're…                                             | Read next                                                                                                                      |
| ------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ |
| Deciding which engagement shape fits                   | [Use Cases](https://docs.mediafier.ai/overview/use-cases.md)                                                                   |
| Looking at marketplace economics for publishers        | [Provider Earnings & Marketplace Economics](https://docs.mediafier.ai/partners/provider-earnings-and-marketplace-economics.md) |
| Studying how audit and billing share trace correlation | [Audit, Observability & Compliance](https://docs.mediafier.ai/trust/audit-observability-and-compliance.md)                     |
| Studying the gateway's billing stage in context        | [The Gateway](https://docs.mediafier.ai/platform/gateway.md)                                                                   |
