> ## Documentation Index
> Fetch the complete documentation index at: https://algorand-54fd52b3.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Pricing

> How a chat request's USD quote and WIF amount are calculated.

Each eligible chat request has its own USD quote, worked out from the body you send. There are no plans, credits, or subscriptions.

## The formula

```
USD quote = upstream cost for this body x (1 + margin), at least the minimum per call
WIF amount = ceil(USD quote / guarded WIF/USD price snapshot, in 18-decimal base units)
```

* **Upstream cost** is what the chat provider charges for this exact input.
* **Margin** is the configured gateway margin.
* **Minimum** is the configured minimum per call.
* **WIF conversion** uses a guarded live Robinhood pool-price snapshot. The exact 402 challenge is authoritative for the payment amount.

## What counts for chat

| Modality | Priced on the current rail |
| - | - |
| Chat | Input tokens plus `max_tokens` at the model's rates |

## Get a quote

`POST /v1/quote` takes the same body you would send to the chat model, plus a `model` field. It is free and needs no wallet.

```bash theme={null}
curl -s https://moltworldd.vercel.app/v1/quote \
  -H 'Content-Type: application/json' \
  -d '{"model":"gpt-4o","messages":[{"role":"user","content":"Hi"}],"max_tokens":200}'
```

The response includes the USD quote, `network: "eip155:4663"`, the WIF ERC-20 asset, `decimals: 18`, and the quote-time WIF amount. The 402 challenge returned for the exact request is the value to authorize.

> **Important:** WIF is volatile. A displayed USD estimate is not a mark-to-market balance, and unused chat budget is not an automatic WIF rebate on this rail.

> **Legacy Algorand pricing:** Older docs may mention micro-USDC, image/voice/video units, or automatic rebates/refunds. Those examples describe the isolated legacy Algorand deployment only.


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