Plan and monitor X Credits

Estimate managed-X usage, inspect the live monthly allowance, understand reset and safety caps, and handle hard-limit exhaustion without confusing X Credits with posts/month.

Managed X onlyResets each billing periodBYO does not consume UniPost Credits20 X posts/account/day still applies

1. Estimate the operation mix

Start from the final X text. A conclusively URL-free X post uses 15 Credits; a post containing a URL or domain-like candidate is conservatively counted at 200 Credits. A complete future Inbox comment interaction combines one received comment and one reply. A complete DM interaction combines one received DM and one sent DM.

PlanIncludedNormal postsURL postsComplete commentsComplete DMs
Free000Inbox not includedInbox not included
API1,5001007Inbox not includedInbox not included
Basic4,00026620200160
Growth12,00080060600480
Team30,0002,0001501,5001,200
EnterpriseCustomCustomCustomCustomCustom

Each operation column assumes the entire shared allowance is used for that operation. Real workloads mix operations, so calculate against the weighted total rather than adding the columns together.

2. Inspect the live allowance

Call GET /v1/billing/x-credits before large managed-X batches and display monthly_remaining plus billing_period_end in operator-facing UI.

curl "https://api.unipost.dev/v1/billing/x-credits" \
  -H "Authorization: Bearer $UNIPOST_API_KEY"

3. Validate before publishing

Use POST /v1/posts/validate to catch request and platform validation errors before publishing. Validation does not consume X Credits. For the final publish contract, see POST /v1/posts.

4. Handle exhaustion

  1. Branch on x_monthly_usage_limit_exceeded; do not parse the message.
  2. Stop retry loops for the same managed-X operation.
  3. Show the reset date and the current plan's upgrade or Enterprise contact path.
  4. Keep BYO X operations separate because they do not consume UniPost X Credits.

Managed-X work stops at the hard limit. The allowance does not override the independent safety cap of 20 X posts per connected account per UTC day, X rate limits, spam controls, or content-policy enforcement.