CLI Credits

mkpdfs runs on prepaid credits: $10 = 1,000 credits, 1 credit = 1 PDF page. Credits never expire. When your balance hits zero, PDF generation returns a 402 until you top up.

The mkp credits command lets you manage everything from the terminal.

Browser login required. All credits commands authenticate with your Cognito session. They do not work with --api-key. Run mkp auth login first if you have not already.

Check your balance

mkp credits

Prints your current credit balance and auto-recharge status at a glance.

View the ledger

mkp credits ledger

Shows the 50 most recent ledger entries — purchases, page debits, refunds, and welcome credits. Use --json to parse the output programmatically:

mkp credits ledger --json | jq '.[] | select(.kind == "debit")'

Auto-recharge

Auto-recharge tops up your balance automatically when it falls below a threshold, so you never get blocked mid-batch.

View current setting

mkp credits auto-recharge

Enable auto-recharge

mkp credits auto-recharge --enable

Enables auto-recharge with the default threshold of 100 credits. When your balance drops below the threshold, mkpdfs charges your saved card for 1,000 credits ($10) and adds them to your account.

Set a custom threshold:

mkp credits auto-recharge --enable --threshold 250

The threshold can be any integer from 1 to 1,000.

Disable auto-recharge

mkp credits auto-recharge --disable

What happens on a card decline

If the auto-recharge payment fails, mkpdfs disables auto-recharge and sets an error flag on your account. The dashboard shows a banner prompting you to update your payment method. Re-enable auto-recharge after updating your card.

Buy credits

mkp credits buy

Opens the Stripe checkout page in your browser. After a successful purchase, 1,000 credits ($10) are added to your balance immediately. You can run mkp credits again to confirm the new balance.

Usage stats

For a broader view of the current month (API calls, templates created, AI generations used):

mkp usage

usage is stats-only and does not affect your credit balance.

Next steps