# Billing
Source: https://docs.mserve.ai/docs/resources/billing
Summary: Prepaid credits, paid by card. Every request debits the balance. Balance and spend are readable from your key.
Availability: available
Last reviewed: 2026-08-25

## Add credits

`POST /mserve/v1/billing/checkout` returns a checkout page for a one-time top-up between $5 and $1,000. Open the URL. The credit lands when the payment clears.

```bash
curl https://api.mserve.ai/mserve/v1/billing/checkout \
  -H "Authorization: Bearer $MSERVE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"amount": 25}'
```

```json title="Response"
{ "url": "https://checkout.stripe.com/c/pay/cs_…", "session_id": "cs_…", "amount": 25 }
```

`POST /mserve/v1/billing/card` returns a page to save a card for later top-ups.

## How a request is billed

### Before the request

Balance above zero and key spend under its limit. Otherwise `402`, and nothing runs.

### After the response

`usage` is priced and debited. A failed request bills nothing. A stream you disconnect from is billed for the prompt and the output already produced.

## Units

| Product                      | Unit                                                         |
| ---------------------------- | ------------------------------------------------------------ |
| Real-time, embeddings, batch | Input and output tokens. Reasoning tokens are output tokens. |
| Text to speech               | Input characters.                                            |
| Speech to text, translation  | Audio minutes.                                               |
| Speech to speech             | Audio seconds.                                               |
| Realtime WebSocket           | Audio minutes in, tokens, characters out.                    |

## Read your balance

`GET /mserve/v1/key` returns `balance`, `usage_daily`, and `usage_monthly`. See [Authentication](/docs/resources/authentication#inspect-a-key).

## Prices

| Model | Model id | Input per 1M tokens | Output per 1M tokens |
| --- | --- | --- | --- |
| Qwen3.8 27B | `qwen3.8-27b` | $0.30 | $2.50 |

Full tables on [Pricing](/docs/pricing).
