Words and billing
The API is billed by word count. Requests are charged for the words submitted, and only when the request succeeds. Plan words are consumed first, followed by top-up words.
Request cost#
Words are charged only on a 200 response. Errors, timeouts reported by the API and blocked content are not charged. The only exception is 500 billing_failed.
How words are counted#
- Text is split on whitespace, and each resulting token counts as one word.
- For languages written without spaces between words, such as Chinese, Japanese, Korean and Thai, the count is estimated from the number of characters.
- The applicable rule is determined by the value of
language, or by the detected language iflanguageis omitted. - On accounts with freezing enabled,
<freeze>tags are removed before counting.
The count does not need to be reproduced on the client side. input_words in every humanize response is the exact number of words charged, and the same count is used for the words-per-request limit.
Plan words and top-ups#
- Each plan includes a fixed number of words per billing cycle. The allowance resets when the plan renews, and unused plan words do not carry over.
- Each top-up pack adds 100,000 words. Top-ups are purchased on the Billing tab of the API dashboard and require an active plan.
- Top-up words do not expire and carry over between cycles. They are consumed only after the plan words for the cycle are exhausted.
- A top-up balance can hold up to 1,000,000 words.
- A top-up takes effect immediately and is available to the next request.
Auto top-up#
On Premium plans, the account owner can enable auto top-up on the Billing tab. When the remaining balance falls below a configured threshold, the configured number of packs is purchased automatically, up to a configured spending limit per 30 days. Auto top-up is disabled by default.
Checking the balance#
- In a response.
words_remainingin every humanize response is the balance after that request. - Through the API. /v1/usage returns the plan allowance, the words used in the current cycle and the top-up balance. These values can lag by up to two minutes.
- In the dashboard. The Overview tab shows the remaining words, the days until the next reset, daily activity and a log of recent requests.
Insufficient balance#
- A request that exceeds the balance is rejected with 402
insufficient_balance. No words are charged, and the response includeswords_remaining. - WriteHuman emails the account owner when 20% of the monthly words remain, and again when the balance is exhausted or a request is rejected for insufficient balance. Each email is sent once per cycle.
- To continue, purchase a top-up, enable auto top-up, or upgrade to a larger plan.