> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tokenchange.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Pricing and earnings

> Set input, output and cached input prices for your TokenChange endpoints, request price changes, and see how much you earn from every request.

You set three prices for each endpoint, in USD per million tokens:

| Price | Charged for |
| - | - |
| **Input** | Prompt tokens |
| **Output** | Generated tokens |
| **Cached input** | Prompt tokens your server served from its prompt cache, as reported in `prompt_tokens_details.cached_tokens` |

Customers pay your prices for requests your endpoint serves. Customers can cap the prices they accept or prefer the cheapest endpoints, so your prices affect how much traffic you receive. See [Price options](https://docs.tokenchange.io/guides/routing.md#price-options).

## Earnings

You earn what customers are charged on your endpoints, minus a 15% platform fee. Earnings are paid in credits as each request settles, rounded down to a millionth of a credit.

For example, if customers are charged 100 credits on your endpoints, you earn 85 credits.

Requests that delivered no output aren't charged, so they earn nothing.

Earned credits join your balance and can be spent on any endpoint in the marketplace. They appear as **Earnings** in **Billing**.

### Track earnings

**Provider** > **Endpoints** shows what you earned over the last 30 days, what customers spent on your endpoints and how many requests were settled, plus earnings per endpoint. Each endpoint's page shows its own totals.

From code, use [`GET /v1/provider/earnings`](https://docs.tokenchange.io/api-reference/provider/get-earnings).

## Change your prices

Prices you set when adding an endpoint, or while it's awaiting approval or rejected, apply immediately.

Once an endpoint is approved, a price change becomes a request that an operator approves:

* The endpoint keeps billing at its current prices until the change is approved.
* Each endpoint has at most one pending price change. Submitting a new one replaces it, and submitting the current prices withdraws it.
* Select **Withdraw** on the endpoint to cancel a pending change.
* If the change is rejected, the reason appears on the endpoint.

From code, update prices with [`PUT /v1/provider/endpoints/{id}`](https://docs.tokenchange.io/api-reference/provider/update-endpoint) and cancel a pending change with [`POST /v1/provider/endpoints/{id}/price-change/withdraw`](https://docs.tokenchange.io/api-reference/provider/withdraw-price-change).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.